--- a/.hgtags Mon Oct 12 16:26:58 2015 +0300
+++ b/.hgtags Mon Oct 12 14:41:36 2015 -0700
@@ -326,3 +326,5 @@
2050b3a0aadcb0e024bf798197421d58e54ec8bf jdk9-b81
6521875cb63e1d0121b30af56ebbc36db078c4c6 jdk9-b82
f61a63b7d1e52e307abc0bfc751203155d362ec4 jdk9-b83
+51b2db2fa04c16d767b66113dbf08c5349ce382a jdk9-b84
+8392405ab038b22e69a3728e17dbdd9e3d3a22ed jdk9-b85
--- a/.hgtags-top-repo Mon Oct 12 16:26:58 2015 +0300
+++ b/.hgtags-top-repo Mon Oct 12 14:41:36 2015 -0700
@@ -326,3 +326,5 @@
b8afcf91331d78626a583ec1b63164468d6f4181 jdk9-b81
42b56d1f418523ecb61a49d7493302c80c8009cc jdk9-b82
ce5c14d97d95084504c32b9320cb33cce4235588 jdk9-b83
+1c8134475511ffe6726677e1418a89a7a45e92d6 jdk9-b84
+1f345217c9bab05f192d00cf1665b3286c49ccdb jdk9-b85
--- a/common/autoconf/basics.m4 Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/basics.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -288,7 +288,7 @@
# Publish this variable in the help.
AC_ARG_VAR($1, [Override default value for $1])
- if test "x[$]$1" = x; then
+ if [[ -z "${$1+x}" ]]; then
# The variable is not set by user, try to locate tool using the code snippet
$2
else
@@ -312,25 +312,32 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="[$]$1"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- AC_MSG_NOTICE([Will search for user supplied tool $1=$tool_basename])
- AC_PATH_PROG($1, $tool_basename)
- if test "x[$]$1" = x; then
- AC_MSG_ERROR([User supplied tool $tool_basename could not be found])
+ # Check if we try to supply an empty value
+ if test "x[$]$1" = x; then
+ AC_MSG_NOTICE([Setting user supplied tool $1= (no value)])
+ AC_MSG_CHECKING([for $1])
+ AC_MSG_RESULT([disabled])
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="[$]$1"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ AC_MSG_NOTICE([Will search for user supplied tool $1=$tool_basename])
+ AC_PATH_PROG($1, $tool_basename)
+ if test "x[$]$1" = x; then
+ AC_MSG_ERROR([User supplied tool $tool_basename could not be found])
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ AC_MSG_NOTICE([Will use user supplied tool $1=$tool_specified])
+ AC_MSG_CHECKING([for $1])
+ if test ! -x "$tool_specified"; then
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([User supplied tool $1=$tool_specified does not exist or is not executable])
+ fi
+ AC_MSG_RESULT([$tool_specified])
fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- AC_MSG_NOTICE([Will use user supplied tool $1=$tool_specified])
- AC_MSG_CHECKING([for $1])
- if test ! -x "$tool_specified"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([User supplied tool $1=$tool_specified does not exist or is not executable])
- fi
- AC_MSG_RESULT([$tool_specified])
fi
fi
fi
@@ -376,9 +383,7 @@
[
# 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
- # used by configure. Nor are these tools expected to be found in the
- # devkit from the builddeps server either, since they are
- # needed to download the devkit.
+ # used by configure.
# First are all the simple required tools.
BASIC_REQUIRE_PROGS(BASENAME, basename)
@@ -437,6 +442,7 @@
BASIC_PATH_PROGS(READLINK, [greadlink readlink])
BASIC_PATH_PROGS(DF, df)
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
+ BASIC_PATH_PROGS(NICE, nice)
])
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
--- a/common/autoconf/boot-jdk.m4 Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/boot-jdk.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -108,12 +108,6 @@
fi
])
-# Test: Is bootjdk available from builddeps?
-AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS],
-[
- BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no])
-])
-
# Test: Is $JAVA_HOME set?
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
[
@@ -276,9 +270,6 @@
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
fi
- # Test: Is bootjdk available from builddeps?
- BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
-
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
--- a/common/autoconf/builddeps.conf.example Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-#
-# 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.
-#
-# 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.
-#
-
-# This is a configuration example using builddeps
-# that are downloaded from an ftp server.
-# This is how you use it:
-
-#configure --with-builddeps-server=ftp://builddeps.server/adir \
-# --with-builddeps-conf=..../builddeps.conf.example
-# --with-builddeps-dir=/localdisk/mybuilddeps
-
-# Translate a configuration triplet/quadruplet into something
-# known by this configuration file.
-# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
-REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
-REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
-
-# The needed cups builddeps are platform independent header files.
-# I.e. they need not be part of the devkit.
-builddep_cups=lib/cups_1_3_9.zip
-builddep_cups_CFLAGS=-I${depdir}
-
-# The devkit is the cross compiler tools and sys-roots
-# for the build platform.
-builddep_devkit=sdk/sdk-${rewritten_build}-20110921.tar.gz
-
-# The freetype dependency is partly platform dependent.
-# It is stored inside the sys-root.
-builddep_freetype2=sdk/sdk-${rewritten_build}-20110921.tar.gz
-builddep_freetype2_CFLAGS=-I${depdir}/${rewritten_target}/sys-root/usr/include/freetype2
-builddep_freetype2_LIBS=-lfreetype
-
-# There are many other build dependencies, but they are implicitly
-# found inside the devkit sys-root.
-
-# The boot jdk runs on the build system and is used to compile and run
-# Java build tools and of course, the bootstrap javac.
-builddep_bootjdk_BUILD_i386_pc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-i586-17_nov_2011.zip
-builddep_bootjdk_BUILD_x86_64_pc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-x64-17_nov_2011.zip
-builddep_bootjdk_BUILD_i686_unknown_linux_gnu=java/jdk-7u2-fcs-bin-b13-linux-i586-17_nov_2011.zip
-builddep_bootjdk_BUILD_x86_64_unknown_linux_gnu=java/jdk-7u2-fcs-bin-b13-linux-x64-17_nov_2011.zip
-builddep_bootjdk_BUILD_sparc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-sparc-17_nov_2011.zip
-builddep_bootjdk_BUILD_sparcv9_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-sparcv9-17_nov_2011.zip
-builddep_bootjdk_BUILD_i386_pc_windows=java/jdk-7u2-fcs-bin-b13-windows-i586-17_nov_2011.zip
-builddep_bootjdk_BUILD_x86_64_pc_windows=java/jdk-7u2-fcs-bin-b13-windows-x64-17_nov_2011.zip
-builddep_bootjdk_ROOT=${depdir}/jdk7_02/jdk1.7.0_02
--- a/common/autoconf/builddeps.conf.nfs.example Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 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.
-#
-# 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.
-#
-
-# This is a configuration example using an nfs-mount /java
-# it will use the builddeps directly from the nfs mounted directory.
-# This is how you use it:
-
-#configure --with-builddeps-conf=..../builddeps.conf.nfs.example
-
-REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
-REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
-
-DEVTOOLS=/java/devtools
-
-builddep_cups=${DEVTOOLS}/linux/cups/include
-builddep_cups_CFLAGS=-I${depdir}
-
-JDK_ROOT=/java/re/jdk/7u4/latest/binaries
-builddep_bootjdk_BUILD_i386_pc_solaris2=${JDK_ROOT}/solaris-i586
-builddep_bootjdk_BUILD_x86_64_pc_solaris2=${JDK_ROOT}/solaris-amd64
-builddep_bootjdk_BUILD_i686_unknown_linux_gnu=${JDK_ROOT}/linux-i586
-builddep_bootjdk_BUILD_x86_64_unknown_linux_gnu=${JDK_ROOT}/linux-amd64
-builddep_bootjdk_ROOT=
--- a/common/autoconf/builddeps.m4 Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-#
-# 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.
-#
-
-AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
-[
- define(LIST_OF_BUILD_DEPENDENCIES,)
- if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
- if test "x$with_builddeps_conf" != x; then
- AC_MSG_CHECKING([for supplied builddeps configuration file])
- builddepsfile=$with_builddeps_conf
- if test -s $builddepsfile; then
- . $builddepsfile
- AC_MSG_RESULT([loaded!])
- else
- AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
- fi
- else
- AC_MSG_CHECKING([for builddeps.conf files in sources...])
- 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
- AC_MSG_RESULT([found at least one!])
- else
- AC_MSG_ERROR([Could not find any builddeps.conf at all!])
- 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
- AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
- if test "x$BDEPS_UNZIP" = x7z; then
- BDEPS_UNZIP="7z x"
- fi
-
- AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp])
-])
-
-AC_DEFUN([BDEPS_FTPGET],
-[
- # $1 is the ftp://abuilddeps.server.com/libs/cups.zip
- # $2 is the local file name for the downloaded file.
- VALID_TOOL=no
- if test "x$BDEPS_FTP" = xwget; then
- VALID_TOOL=yes
- wget -O $2 $1
- fi
- if test "x$BDEPS_FTP" = xlftp; then
- VALID_TOOL=yes
- lftp -c "get $1 -o $2"
- fi
- if test "x$BDEPS_FTP" = xftp; then
- VALID_TOOL=yes
- FTPSERVER=`echo $1 | cut -f 3 -d '/'`
- FTPPATH=`echo $1 | cut -f 4- -d '/'`
- FTPUSERPWD=${FTPSERVER%%@*}
- if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
- FTPUSER=${userpwd%%:*}
- FTPPWD=${userpwd#*@}
- FTPSERVER=${FTPSERVER#*@}
- else
- FTPUSER=ftp
- FTPPWD=ftp
- fi
- # the "pass" command does not work on some
- # ftp clients (read ftp.exe) but if it works,
- # passive mode is better!
- ( \
- echo "user $FTPUSER $FTPPWD" ; \
- echo "pass" ; \
- echo "bin" ; \
- echo "get $FTPPATH $2" ; \
- ) | ftp -in $FTPSERVER
- fi
- if test "x$VALID_TOOL" != xyes; then
- AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
- fi
-])
-
-AC_DEFUN([BDEPS_CHECK_MODULE],
-[
- define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n'])
- if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
- # Source the builddeps file again, to make sure it uses the latest variables!
- . $builddepsfile
- # Look for a target and build machine specific resource!
- eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a target specific resource
- eval resource=\${builddep_$2_TARGET_${rewritten_target_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The $2 comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_$2}
- fi
- if test "x$resource" != x; then
- AC_MSG_NOTICE([Using builddeps $resource for $2])
- # If the resource in the builddeps.conf file is an existing directory,
- # for example /java/linux/cups
- if test -d ${resource}; then
- depdir=${resource}
- else
- BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
- fi
- # Source the builddeps file again, because in the previous command, the depdir
- # was updated to point at the current build dependency install directory.
- . $builddepsfile
- # Now extract variables from the builddeps.conf files.
- theroot=${builddep_$2_ROOT}
- thecflags=${builddep_$2_CFLAGS}
- thelibs=${builddep_$2_LIBS}
- if test "x$depdir" = x; then
- AC_MSG_ERROR([Could not download build dependency $2])
- fi
- $1=$depdir
- if test "x$theroot" != x; then
- $1="$theroot"
- fi
- if test "x$thecflags" != x; then
- $1_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- $1_LIBS="$thelibs"
- fi
- m4_default([$4], [:])
- m4_ifvaln([$5], [else $5])
- fi
- m4_ifvaln([$5], [else $5])
- fi
-])
-
-AC_DEFUN([BDEPS_FETCH],
-[
- # $1 is for example mymodule
- # $2 is for example libs/general/libmymod_1_2_3.zip
- # $3 is for example ftp://mybuilddeps.myserver.com/builddeps
- # $4 is for example /localhome/builddeps
- # $5 is the name of the variable into which we store the depdir, eg MYMOD
- # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
- # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
- filename=`basename $2`
- filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
- filebase=${filename%%.*}
- extension=${filename#*.}
- installdir=$4/$filebase
- if test ! -f $installdir/$filename.unpacked; then
- AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
- if test ! -d $installdir; then
- mkdir -p $installdir
- fi
- if test ! -d $installdir; then
- AC_MSG_ERROR([Could not create directory $installdir])
- fi
- tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
- touch $tmpfile
- if test ! -f $tmpfile; then
- AC_MSG_ERROR([Could not create files in directory $installdir])
- fi
- BDEPS_FTPGET([$3/$2] , [$tmpfile])
- mv $tmpfile $installdir/$filename
- if test ! -s $installdir/$filename; then
- AC_MSG_ERROR([Could not download $3/$2])
- fi
- case "$extension" in
- zip) echo "Unzipping $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
- ;;
- tar.gz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- tgz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- *) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
- ;;
- esac
- fi
- if test -f $installdir/$filename.unpacked; then
- $5=$installdir
- fi
-])
-
-AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS],
-[
- AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
- [use this configuration file for the builddeps])])
-
- AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
- [download and use build dependencies from this server url])])
-
- AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
- [store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
- [],
- [with_builddeps_dir=/localhome/builddeps])
-
- AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
- [chgrp the downloaded build dependencies to this group])])
-])
--- a/common/autoconf/compare.sh.in Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/compare.sh.in Mon Oct 12 14:41:36 2015 -0700
@@ -62,7 +62,7 @@
export SED="@SED@"
export SORT="@SORT@"
export STAT="@STAT@"
-export STRIP="@POST_STRIP_CMD@"
+export STRIP="@STRIP@ @STRIPFLAGS@"
export TEE="@TEE@"
export UNIQ="@UNIQ@"
export UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200"
--- a/common/autoconf/configure.ac Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/configure.ac Mon Oct 12 14:41:36 2015 -0700
@@ -39,7 +39,6 @@
# Include these first...
m4_include([basics.m4])
m4_include([basics_windows.m4])
-m4_include([builddeps.m4])
# ... then the rest
m4_include([boot-jdk.m4])
m4_include([build-performance.m4])
@@ -121,12 +120,6 @@
# After basic tools have been setup, we can check build os specific details.
PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
-# 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.
-BDEPS_CONFIGURE_BUILDDEPS
-BDEPS_SCAN_FOR_BUILDDEPS
-
###############################################################################
#
# Determine OpenJDK variants, options and version numbers.
@@ -165,6 +158,11 @@
# First determine the toolchain type (compiler family)
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
+# User supplied flags should be used when configure detects compilers
+FLAGS_SETUP_USER_SUPPLIED_FLAGS
+# The sysroot cflags are needed for configure to be able to run the compilers
+FLAGS_SETUP_SYSROOT_FLAGS
+
# Then detect the actual binaries needed
TOOLCHAIN_PRE_DETECTION
TOOLCHAIN_DETECT_TOOLCHAIN_CORE
@@ -206,14 +204,8 @@
# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
BASIC_COMPILE_FIXPATH
-LIB_SETUP_INIT
-LIB_SETUP_X11
-LIB_SETUP_CUPS
-LIB_SETUP_FREETYPE
-LIB_SETUP_ALSA
-LIB_SETUP_MISC_LIBS
-LIB_SETUP_STATIC_LINK_LIBSTDCPP
-LIB_SETUP_ON_WINDOWS
+LIB_DETERMINE_DEPENDENCIES
+LIB_SETUP_LIBRARIES
###############################################################################
#
--- a/common/autoconf/flags.m4 Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/flags.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -23,6 +23,100 @@
# questions.
#
+# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
+# corresponding configure arguments instead
+AC_DEFUN_ONCE([FLAGS_SETUP_USER_SUPPLIED_FLAGS],
+[
+ if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+ AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
+ fi
+
+ if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+ AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
+ fi
+
+ if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+ AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
+ fi
+
+ AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
+ [extra flags to be used when compiling jdk c-files])])
+
+ AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
+ [extra flags to be used when compiling jdk c++-files])])
+
+ AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
+ [extra flags to be used when linking jdk])])
+
+ EXTRA_CFLAGS="$with_extra_cflags"
+ EXTRA_CXXFLAGS="$with_extra_cxxflags"
+ EXTRA_LDFLAGS="$with_extra_ldflags"
+
+ # Hotspot needs these set in their legacy form
+ LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
+ LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
+ LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
+
+ AC_SUBST(LEGACY_EXTRA_CFLAGS)
+ AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
+ AC_SUBST(LEGACY_EXTRA_LDFLAGS)
+
+ # The global CFLAGS and LDLAGS variables are used by configure tests and
+ # should include the extra parameters
+ CFLAGS="$EXTRA_CFLAGS"
+ CXXFLAGS="$EXTRA_CXXFLAGS"
+ LDFLAGS="$EXTRA_LDFLAGS"
+ CPPFLAGS=""
+])
+
+# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
+# that configure can use them while detecting compilers.
+# TOOLCHAIN_TYPE is available here.
+AC_DEFUN_ONCE([FLAGS_SETUP_SYSROOT_FLAGS],
+[
+ if test "x$SYSROOT" != "x"; then
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ # Solaris Studio does not have a concept of sysroot. Instead we must
+ # make sure the default include and lib dirs are appended to each
+ # compile and link command line.
+ SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
+ SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+ SYSROOT_CFLAGS="--sysroot=$SYSROOT"
+ SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ SYSROOT_CFLAGS="-isysroot $SYSROOT"
+ SYSROOT_LDFLAGS="-isysroot $SYSROOT"
+ fi
+ # Propagate the sysroot args to hotspot
+ LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
+ LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
+ LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
+ # The global CFLAGS and LDFLAGS variables need these for configure to function
+ CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
+ LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # We also need -iframework<path>/System/Library/Frameworks
+ SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+ SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+ # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
+ # set this here so it doesn't have to be peppered throughout the forest
+ SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+ SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+ fi
+
+ AC_SUBST(SYSROOT_CFLAGS)
+ AC_SUBST(SYSROOT_LDFLAGS)
+])
+
AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
[
# Option used to tell the compiler whether to create 32- or 64-bit executables
@@ -60,10 +154,7 @@
STRIPFLAGS="-X32_64"
fi
- if test "x$OPENJDK_TARGET_OS" != xwindows; then
- POST_STRIP_CMD="$STRIP $STRIPFLAGS"
- fi
- AC_SUBST(POST_STRIP_CMD)
+ AC_SUBST(STRIPFLAGS)
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
CC_OUT_OPTION=-Fo
@@ -113,44 +204,6 @@
# silence copyright notice and other headers.
COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
fi
-
- if test "x$SYSROOT" != "x"; then
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- # Solaris Studio does not have a concept of sysroot. Instead we must
- # make sure the default include and lib dirs are appended to each
- # compile and link command line.
- SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
- SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
- -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
- -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
- fi
- elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
- SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
- SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
- elif test "x$TOOLCHAIN_TYPE" = xgcc; then
- SYSROOT_CFLAGS="--sysroot=$SYSROOT"
- SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
- SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
- fi
- # Propagate the sysroot args to hotspot
- LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
- LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
- LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
- fi
-
- # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
- # set this here so it doesn't have to be peppered throughout the forest
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
- SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
- fi
-
- AC_SUBST(SYSROOT_CFLAGS)
- AC_SUBST(SYSROOT_LDFLAGS)
])
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
@@ -480,39 +533,9 @@
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
fi
- if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
- AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
- fi
-
- if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
- AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
- fi
-
- if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
- AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
- fi
-
- AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
- [extra flags to be used when compiling jdk c-files])])
-
- AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
- [extra flags to be used when compiling jdk c++-files])])
-
- AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
- [extra flags to be used when linking jdk])])
-
- CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
- CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
- LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
-
- # Hotspot needs these set in their legacy form
- LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
- LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
- LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
-
- AC_SUBST(LEGACY_EXTRA_CFLAGS)
- AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
- AC_SUBST(LEGACY_EXTRA_LDFLAGS)
+ CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
+ LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
###############################################################################
#
--- a/common/autoconf/generated-configure.sh Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/generated-configure.sh Mon Oct 12 14:41:36 2015 -0700
@@ -645,28 +645,24 @@
ENABLE_INTREE_EC
SALIB_NAME
HOTSPOT_MAKE_ARGS
-MSVCP_DLL
-MSVCR_DLL
-LIBCXX
+LIBZIP_CAN_USE_MMAP
+LIBDL
+LIBM
+USE_EXTERNAL_LCMS
+LCMS_LIBS
+LCMS_CFLAGS
+USE_EXTERNAL_LIBZ
+USE_EXTERNAL_LIBPNG
+PNG_LIBS
+PNG_CFLAGS
+USE_EXTERNAL_LIBGIF
+USE_EXTERNAL_LIBJPEG
LLVM_LIBS
LLVM_LDFLAGS
LLVM_CFLAGS
LLVM_CONFIG
LIBFFI_LIBS
LIBFFI_CFLAGS
-STATIC_CXX_SETTING
-LIBDL
-LIBM
-LIBZIP_CAN_USE_MMAP
-USE_EXTERNAL_LIBZ
-USE_EXTERNAL_LIBPNG
-PNG_LIBS
-PNG_CFLAGS
-USE_EXTERNAL_LCMS
-LCMS_LIBS
-LCMS_CFLAGS
-USE_EXTERNAL_LIBGIF
-USE_EXTERNAL_LIBJPEG
ALSA_LIBS
ALSA_CFLAGS
FREETYPE_BUNDLE_LIB_PATH
@@ -678,6 +674,10 @@
X_PRE_LIBS
X_CFLAGS
XMKMF
+MSVCP_DLL
+MSVCR_DLL
+LIBCXX
+STATIC_CXX_SETTING
FIXPATH
GCOV_ENABLED
ZIP_DEBUGINFO_FILES
@@ -705,9 +705,6 @@
CFLAGS_JDKEXE
CFLAGS_JDKLIB
MACOSX_VERSION_MIN
-LEGACY_EXTRA_LDFLAGS
-LEGACY_EXTRA_CXXFLAGS
-LEGACY_EXTRA_CFLAGS
CXX_O_FLAG_NONE
CXX_O_FLAG_DEBUG
CXX_O_FLAG_NORM
@@ -728,14 +725,12 @@
SET_EXECUTABLE_ORIGIN
CXX_FLAG_REORDER
C_FLAG_REORDER
-SYSROOT_LDFLAGS
-SYSROOT_CFLAGS
RC_FLAGS
AR_OUT_OPTION
LD_OUT_OPTION
EXE_OUT_OPTION
CC_OUT_OPTION
-POST_STRIP_CMD
+STRIPFLAGS
ARFLAGS
COMPILER_TARGET_BITS_FLAG
JT_HOME
@@ -747,6 +742,8 @@
HOTSPOT_CXX
HOTSPOT_RC
HOTSPOT_MT
+BUILD_SYSROOT_LDFLAGS
+BUILD_SYSROOT_CFLAGS
BUILD_LD
BUILD_CXX
BUILD_CC
@@ -793,6 +790,11 @@
VS_INCLUDE
VS_PATH
CYGWIN_LINK
+SYSROOT_LDFLAGS
+SYSROOT_CFLAGS
+LEGACY_EXTRA_LDFLAGS
+LEGACY_EXTRA_CXXFLAGS
+LEGACY_EXTRA_CFLAGS
EXE_SUFFIX
OBJ_SUFFIX
STATIC_LIBRARY
@@ -847,8 +849,6 @@
BUILD_HEADLESS
SUPPORT_HEADFUL
SUPPORT_HEADLESS
-BDEPS_FTP
-BDEPS_UNZIP
OS_VERSION_MICRO
OS_VERSION_MINOR
OS_VERSION_MAJOR
@@ -946,6 +946,7 @@
build_vendor
build_cpu
build
+NICE
CPIO
DF
READLINK
@@ -1052,10 +1053,6 @@
with_sdk_name
with_conf_name
with_output_sync
-with_builddeps_conf
-with_builddeps_server
-with_builddeps_dir
-with_builddeps_group
enable_headful
enable_hotspot_test_in_build
with_cacerts_file
@@ -1078,15 +1075,18 @@
with_override_jdk
with_import_hotspot
with_toolchain_type
-with_toolchain_version
-with_jtreg
with_extra_cflags
with_extra_cxxflags
with_extra_ldflags
+with_toolchain_version
+with_jtreg
enable_warnings_as_errors
enable_debug_symbols
enable_zip_debug_info
enable_native_coverage
+with_stdc__lib
+with_msvcr_dll
+with_msvcp_dll
with_x
with_cups
with_cups_include
@@ -1098,14 +1098,14 @@
with_alsa
with_alsa_include
with_alsa_lib
+with_libffi
+with_libffi_include
+with_libffi_lib
with_libjpeg
with_giflib
-with_lcms
with_libpng
with_zlib
-with_stdc__lib
-with_msvcr_dll
-with_msvcp_dll
+with_lcms
with_dxsdk
with_dxsdk_lib
with_dxsdk_include
@@ -1167,6 +1167,7 @@
READLINK
DF
CPIO
+NICE
UNZIP
ZIP
LDD
@@ -1213,12 +1214,12 @@
FREETYPE_LIBS
ALSA_CFLAGS
ALSA_LIBS
+LIBFFI_CFLAGS
+LIBFFI_LIBS
+PNG_CFLAGS
+PNG_LIBS
LCMS_CFLAGS
LCMS_LIBS
-PNG_CFLAGS
-PNG_LIBS
-LIBFFI_CFLAGS
-LIBFFI_LIBS
CCACHE'
@@ -1896,13 +1897,6 @@
from important configuration options]
--with-output-sync set make output sync type if supported by make.
[recurse]
- --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-milestone Set milestone value for build [internal]
--with-update-version Set update version value for build [b00]
@@ -1937,14 +1931,22 @@
source
--with-toolchain-type the toolchain type (or family) to use, use '--help'
to show possible values [platform dependent]
+ --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-toolchain-version
the version of the toolchain to look for, use
'--help' to show possible values [platform
dependent]
--with-jtreg Regression Test Harness [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-stdc++lib=<static>,<dynamic>,<default>
+ force linking of the C++ runtime on Linux to either
+ static or dynamic, default is static with dynamic as
+ fallback
+ --with-msvcr-dll path to microsoft C runtime dll (msvcr*.dll)
+ (Windows only) [probed]
+ --with-msvcp-dll path to microsoft C++ runtime dll (msvcp*.dll)
+ (Windows only) [probed]
--with-x use the X Window System
--with-cups specify prefix directory for the cups package
(expecting the headers under PATH/include)
@@ -1962,24 +1964,21 @@
headers under PATH/include)
--with-alsa-include specify directory for the alsa include files
--with-alsa-lib specify directory for the alsa library
+ --with-libffi specify prefix directory for the libffi package
+ (expecting the libraries under PATH/lib and the
+ headers under PATH/include)
+ --with-libffi-include specify directory for the libffi include files
+ --with-libffi-lib specify directory for the libffi library
--with-libjpeg use libjpeg from build system or OpenJDK source
(system, bundled) [bundled]
--with-giflib use giflib from build system or OpenJDK source
(system, bundled) [bundled]
- --with-lcms use lcms2 from build system or OpenJDK source
- (system, bundled) [bundled]
--with-libpng use libpng from build system or OpenJDK source
(system, bundled) [bundled]
--with-zlib use zlib from build system or OpenJDK source
(system, bundled) [bundled]
- --with-stdc++lib=<static>,<dynamic>,<default>
- force linking of the C++ runtime on Linux to either
- static or dynamic, default is static with dynamic as
- fallback
- --with-msvcr-dll path to microsoft C runtime dll (msvcr*.dll)
- (Windows only) [probed]
- --with-msvcp-dll path to microsoft C++ runtime dll (msvcp*.dll)
- (Windows only) [probed]
+ --with-lcms use lcms2 from build system or OpenJDK source
+ (system, bundled) [bundled]
--with-dxsdk Deprecated. Option is kept for backwards
compatibility and is ignored
--with-dxsdk-lib Deprecated. Option is kept for backwards
@@ -2047,6 +2046,7 @@
READLINK Override default value for READLINK
DF Override default value for DF
CPIO Override default value for CPIO
+ NICE Override default value for NICE
UNZIP Override default value for UNZIP
ZIP Override default value for ZIP
LDD Override default value for LDD
@@ -2096,13 +2096,13 @@
linker flags for FREETYPE, overriding pkg-config
ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
ALSA_LIBS linker flags for ALSA, overriding pkg-config
- LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
- LCMS_LIBS linker flags for LCMS, overriding pkg-config
- PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
- PNG_LIBS linker flags for PNG, overriding pkg-config
LIBFFI_CFLAGS
C compiler flags for LIBFFI, overriding pkg-config
LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
+ PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
+ PNG_LIBS linker flags for PNG, overriding pkg-config
+ LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
+ LCMS_LIBS linker flags for LCMS, overriding pkg-config
CCACHE Override default value for CCACHE
Use these variables to override the choices made by `configure' or to help
@@ -3557,41 +3557,6 @@
-#
-# 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.
-#
-
-
-
-
-
-
-
-
-
-
-
# ... then the rest
#
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
@@ -3654,9 +3619,6 @@
# Test: Is bootjdk explicitely set by command line arguments?
-# Test: Is bootjdk available from builddeps?
-
-
# Test: Is $JAVA_HOME set?
@@ -3767,6 +3729,15 @@
# questions.
#
+# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
+# corresponding configure arguments instead
+
+
+# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
+# that configure can use them while detecting compilers.
+# TOOLCHAIN_TYPE is available here.
+
+
@@ -3821,7 +3792,7 @@
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, 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
@@ -3886,6 +3857,8 @@
apt_help() {
case $1 in
+ reduced)
+ PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
devkit)
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
openjdk)
@@ -3896,8 +3869,8 @@
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
freetype)
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
- pulse)
- PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
+ ffi)
+ PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
x11)
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ccache)
@@ -3917,8 +3890,6 @@
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
freetype)
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
- pulse)
- PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11)
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
ccache)
@@ -4007,7 +3978,122 @@
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, 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.
+#
+
+# Major library component reside in separate files.
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup alsa (Advanced Linux Sound Architecture)
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup bundled libraries.
+#
+# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
+# OpenJDK repository. Default is to use these libraries as bundled, but they
+# might be replaced by en external version by the user.
+################################################################################
+
+
+################################################################################
+# Setup libjpeg
+################################################################################
+
+
+################################################################################
+# Setup giflib
+################################################################################
+
+
+################################################################################
+# Setup libpng
+################################################################################
+
+
+################################################################################
+# Setup zlib
+################################################################################
+
+
+################################################################################
+# Setup lcms (Little CMS)
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, 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
@@ -4031,24 +4117,163 @@
# questions.
#
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+################################################################################
+# Setup cups (Common Unix Printing System)
+################################################################################
+
+
+#
+# Copyright (c) 2015, 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.
+#
+
+################################################################################
+# Setup libffi (Foreign Function Interface)
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Build the freetype lib from source
+################################################################################
+
+
+################################################################################
+# Check if a potential freeype library match is correct and usable
+################################################################################
+
+
+################################################################################
+# Setup freetype (The FreeType2 font rendering library)
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup the standard C/C++ runtime libraries.
+#
+# Most importantly, determine if stdc++ should be linked statically or
+# dynamically.
+################################################################################
+
+
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup X11 Windows system
+################################################################################
+
+
+
+################################################################################
+# Determine which libraries are needed for this configuration
+################################################################################
+
+
+################################################################################
+# Parse library options, and setup needed libraries
+################################################################################
+
+
+################################################################################
+# Setup llvm (Low-Level VM)
+################################################################################
+
+
+################################################################################
+# Setup various libraries, typically small system libraries
+################################################################################
#
@@ -4362,7 +4587,7 @@
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1442820958
+DATE_WHEN_GENERATED=1444224363
###############################################################################
#
@@ -4408,9 +4633,7 @@
# 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
- # used by configure. Nor are these tools expected to be found in the
- # devkit from the builddeps server either, since they are
- # needed to download the devkit.
+ # used by configure.
# First are all the simple required tools.
@@ -4419,7 +4642,7 @@
# Publish this variable in the help.
- if test "x$BASENAME" = x; then
+ if [ -z "${BASENAME+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in basename
do
@@ -4532,14 +4755,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$BASENAME"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$BASENAME" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
+$as_echo_n "checking for BASENAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$BASENAME"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -4579,22 +4811,23 @@
fi
- if test "x$BASENAME" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
+ if test "x$BASENAME" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
$as_echo_n "checking for BASENAME... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -4612,7 +4845,7 @@
# Publish this variable in the help.
- if test "x$BASH" = x; then
+ if [ -z "${BASH+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in bash
do
@@ -4725,14 +4958,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$BASH"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$BASH" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
+$as_echo_n "checking for BASH... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$BASH"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -4772,22 +5014,23 @@
fi
- if test "x$BASH" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
+ if test "x$BASH" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
$as_echo_n "checking for BASH... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -4805,7 +5048,7 @@
# Publish this variable in the help.
- if test "x$CAT" = x; then
+ if [ -z "${CAT+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cat
do
@@ -4918,14 +5161,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CAT"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CAT" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
+$as_echo_n "checking for CAT... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CAT"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -4965,22 +5217,23 @@
fi
- if test "x$CAT" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
+ if test "x$CAT" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
$as_echo_n "checking for CAT... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -4998,7 +5251,7 @@
# Publish this variable in the help.
- if test "x$CHMOD" = x; then
+ if [ -z "${CHMOD+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in chmod
do
@@ -5111,14 +5364,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CHMOD"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CHMOD" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
+$as_echo_n "checking for CHMOD... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CHMOD"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -5158,22 +5420,23 @@
fi
- if test "x$CHMOD" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
+ if test "x$CHMOD" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
$as_echo_n "checking for CHMOD... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -5191,7 +5454,7 @@
# Publish this variable in the help.
- if test "x$CMP" = x; then
+ if [ -z "${CMP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cmp
do
@@ -5304,14 +5567,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CMP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CMP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
+$as_echo_n "checking for CMP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CMP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -5351,22 +5623,23 @@
fi
- if test "x$CMP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
+ if test "x$CMP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
$as_echo_n "checking for CMP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -5384,7 +5657,7 @@
# Publish this variable in the help.
- if test "x$COMM" = x; then
+ if [ -z "${COMM+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in comm
do
@@ -5497,14 +5770,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$COMM"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$COMM" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
+$as_echo_n "checking for COMM... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$COMM"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -5544,22 +5826,23 @@
fi
- if test "x$COMM" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
+ if test "x$COMM" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
$as_echo_n "checking for COMM... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -5577,7 +5860,7 @@
# Publish this variable in the help.
- if test "x$CP" = x; then
+ if [ -z "${CP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cp
do
@@ -5690,14 +5973,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
+$as_echo_n "checking for CP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -5737,22 +6029,23 @@
fi
- if test "x$CP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
+ if test "x$CP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
$as_echo_n "checking for CP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -5770,7 +6063,7 @@
# Publish this variable in the help.
- if test "x$CUT" = x; then
+ if [ -z "${CUT+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cut
do
@@ -5883,14 +6176,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CUT"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CUT" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
+$as_echo_n "checking for CUT... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CUT"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -5930,22 +6232,23 @@
fi
- if test "x$CUT" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
+ if test "x$CUT" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
$as_echo_n "checking for CUT... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -5963,7 +6266,7 @@
# Publish this variable in the help.
- if test "x$DATE" = x; then
+ if [ -z "${DATE+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in date
do
@@ -6076,14 +6379,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$DATE"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$DATE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
+$as_echo_n "checking for DATE... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$DATE"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -6123,22 +6435,23 @@
fi
- if test "x$DATE" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
+ if test "x$DATE" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
$as_echo_n "checking for DATE... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -6156,7 +6469,7 @@
# Publish this variable in the help.
- if test "x$DIFF" = x; then
+ if [ -z "${DIFF+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in gdiff diff
do
@@ -6269,14 +6582,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$DIFF"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$DIFF" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
+$as_echo_n "checking for DIFF... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$DIFF"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -6316,22 +6638,23 @@
fi
- if test "x$DIFF" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
+ if test "x$DIFF" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
$as_echo_n "checking for DIFF... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -6349,7 +6672,7 @@
# Publish this variable in the help.
- if test "x$DIRNAME" = x; then
+ if [ -z "${DIRNAME+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in dirname
do
@@ -6462,14 +6785,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$DIRNAME"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$DIRNAME" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
+$as_echo_n "checking for DIRNAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$DIRNAME"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -6509,22 +6841,23 @@
fi
- if test "x$DIRNAME" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
+ if test "x$DIRNAME" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
$as_echo_n "checking for DIRNAME... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -6542,7 +6875,7 @@
# Publish this variable in the help.
- if test "x$ECHO" = x; then
+ if [ -z "${ECHO+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in echo
do
@@ -6655,14 +6988,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$ECHO"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$ECHO" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
+$as_echo_n "checking for ECHO... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$ECHO"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -6702,22 +7044,23 @@
fi
- if test "x$ECHO" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
+ if test "x$ECHO" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
$as_echo_n "checking for ECHO... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -6735,7 +7078,7 @@
# Publish this variable in the help.
- if test "x$EXPR" = x; then
+ if [ -z "${EXPR+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in expr
do
@@ -6848,14 +7191,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$EXPR"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$EXPR" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
+$as_echo_n "checking for EXPR... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$EXPR"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -6895,22 +7247,23 @@
fi
- if test "x$EXPR" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
+ if test "x$EXPR" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
$as_echo_n "checking for EXPR... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -6928,7 +7281,7 @@
# Publish this variable in the help.
- if test "x$FILE" = x; then
+ if [ -z "${FILE+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in file
do
@@ -7041,14 +7394,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$FILE"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$FILE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
+$as_echo_n "checking for FILE... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$FILE"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -7088,22 +7450,23 @@
fi
- if test "x$FILE" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
+ if test "x$FILE" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
$as_echo_n "checking for FILE... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -7121,7 +7484,7 @@
# Publish this variable in the help.
- if test "x$FIND" = x; then
+ if [ -z "${FIND+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in find
do
@@ -7234,14 +7597,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$FIND"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$FIND" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
+$as_echo_n "checking for FIND... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$FIND"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -7281,22 +7653,23 @@
fi
- if test "x$FIND" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
+ if test "x$FIND" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
$as_echo_n "checking for FIND... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -7314,7 +7687,7 @@
# Publish this variable in the help.
- if test "x$HEAD" = x; then
+ if [ -z "${HEAD+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in head
do
@@ -7427,14 +7800,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$HEAD"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$HEAD" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
+$as_echo_n "checking for HEAD... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$HEAD"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -7474,22 +7856,23 @@
fi
- if test "x$HEAD" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
+ if test "x$HEAD" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
$as_echo_n "checking for HEAD... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -7507,7 +7890,7 @@
# Publish this variable in the help.
- if test "x$LN" = x; then
+ if [ -z "${LN+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in ln
do
@@ -7620,14 +8003,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$LN"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$LN" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
+$as_echo_n "checking for LN... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$LN"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -7667,22 +8059,23 @@
fi
- if test "x$LN" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
+ if test "x$LN" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
$as_echo_n "checking for LN... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -7700,7 +8093,7 @@
# Publish this variable in the help.
- if test "x$LS" = x; then
+ if [ -z "${LS+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in ls
do
@@ -7813,14 +8206,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$LS"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$LS" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
+$as_echo_n "checking for LS... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$LS"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -7860,22 +8262,23 @@
fi
- if test "x$LS" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
+ if test "x$LS" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
$as_echo_n "checking for LS... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -7893,7 +8296,7 @@
# Publish this variable in the help.
- if test "x$MKDIR" = x; then
+ if [ -z "${MKDIR+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in mkdir
do
@@ -8006,14 +8409,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$MKDIR"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$MKDIR" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
+$as_echo_n "checking for MKDIR... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$MKDIR"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -8053,22 +8465,23 @@
fi
- if test "x$MKDIR" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
+ if test "x$MKDIR" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
$as_echo_n "checking for MKDIR... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -8086,7 +8499,7 @@
# Publish this variable in the help.
- if test "x$MKTEMP" = x; then
+ if [ -z "${MKTEMP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in mktemp
do
@@ -8199,14 +8612,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$MKTEMP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$MKTEMP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
+$as_echo_n "checking for MKTEMP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$MKTEMP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -8246,22 +8668,23 @@
fi
- if test "x$MKTEMP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
+ if test "x$MKTEMP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
$as_echo_n "checking for MKTEMP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -8279,7 +8702,7 @@
# Publish this variable in the help.
- if test "x$MV" = x; then
+ if [ -z "${MV+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in mv
do
@@ -8392,14 +8815,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$MV"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$MV" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
+$as_echo_n "checking for MV... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$MV"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -8439,22 +8871,23 @@
fi
- if test "x$MV" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
+ if test "x$MV" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
$as_echo_n "checking for MV... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -8472,7 +8905,7 @@
# Publish this variable in the help.
- if test "x$NAWK" = x; then
+ if [ -z "${NAWK+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in nawk gawk awk
do
@@ -8585,14 +9018,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$NAWK"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$NAWK" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
+$as_echo_n "checking for NAWK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$NAWK"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -8632,22 +9074,23 @@
fi
- if test "x$NAWK" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
+ if test "x$NAWK" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
$as_echo_n "checking for NAWK... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -8665,7 +9108,7 @@
# Publish this variable in the help.
- if test "x$PRINTF" = x; then
+ if [ -z "${PRINTF+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in printf
do
@@ -8778,14 +9221,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$PRINTF"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$PRINTF" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
+$as_echo_n "checking for PRINTF... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$PRINTF"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -8825,22 +9277,23 @@
fi
- if test "x$PRINTF" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
+ if test "x$PRINTF" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
$as_echo_n "checking for PRINTF... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -8858,7 +9311,7 @@
# Publish this variable in the help.
- if test "x$RM" = x; then
+ if [ -z "${RM+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in rm
do
@@ -8971,14 +9424,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$RM"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$RM" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
+$as_echo_n "checking for RM... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$RM"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -9018,22 +9480,23 @@
fi
- if test "x$RM" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
+ if test "x$RM" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
$as_echo_n "checking for RM... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -9051,7 +9514,7 @@
# Publish this variable in the help.
- if test "x$SH" = x; then
+ if [ -z "${SH+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in sh
do
@@ -9164,14 +9627,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$SH"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$SH" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
+$as_echo_n "checking for SH... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$SH"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -9211,22 +9683,23 @@
fi
- if test "x$SH" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
+ if test "x$SH" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
$as_echo_n "checking for SH... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -9244,7 +9717,7 @@
# Publish this variable in the help.
- if test "x$SORT" = x; then
+ if [ -z "${SORT+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in sort
do
@@ -9357,14 +9830,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$SORT"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$SORT" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
+$as_echo_n "checking for SORT... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$SORT"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -9404,22 +9886,23 @@
fi
- if test "x$SORT" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
+ if test "x$SORT" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
$as_echo_n "checking for SORT... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -9437,7 +9920,7 @@
# Publish this variable in the help.
- if test "x$TAIL" = x; then
+ if [ -z "${TAIL+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in tail
do
@@ -9550,14 +10033,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$TAIL"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$TAIL" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
+$as_echo_n "checking for TAIL... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$TAIL"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -9597,22 +10089,23 @@
fi
- if test "x$TAIL" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
+ if test "x$TAIL" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
$as_echo_n "checking for TAIL... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -9630,7 +10123,7 @@
# Publish this variable in the help.
- if test "x$TAR" = x; then
+ if [ -z "${TAR+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in tar
do
@@ -9743,14 +10236,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$TAR"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$TAR" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
+$as_echo_n "checking for TAR... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$TAR"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -9790,22 +10292,23 @@
fi
- if test "x$TAR" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
+ if test "x$TAR" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
$as_echo_n "checking for TAR... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -9823,7 +10326,7 @@
# Publish this variable in the help.
- if test "x$TEE" = x; then
+ if [ -z "${TEE+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in tee
do
@@ -9936,14 +10439,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$TEE"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$TEE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
+$as_echo_n "checking for TEE... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$TEE"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -9983,22 +10495,23 @@
fi
- if test "x$TEE" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
+ if test "x$TEE" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
$as_echo_n "checking for TEE... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -10016,7 +10529,7 @@
# Publish this variable in the help.
- if test "x$TOUCH" = x; then
+ if [ -z "${TOUCH+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in touch
do
@@ -10129,14 +10642,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$TOUCH"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$TOUCH" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
+$as_echo_n "checking for TOUCH... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$TOUCH"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -10176,22 +10698,23 @@
fi
- if test "x$TOUCH" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
+ if test "x$TOUCH" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
$as_echo_n "checking for TOUCH... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -10209,7 +10732,7 @@
# Publish this variable in the help.
- if test "x$TR" = x; then
+ if [ -z "${TR+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in tr
do
@@ -10322,14 +10845,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$TR"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$TR" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
+$as_echo_n "checking for TR... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$TR"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -10369,22 +10901,23 @@
fi
- if test "x$TR" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
+ if test "x$TR" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
$as_echo_n "checking for TR... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -10402,7 +10935,7 @@
# Publish this variable in the help.
- if test "x$UNAME" = x; then
+ if [ -z "${UNAME+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in uname
do
@@ -10515,14 +11048,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$UNAME"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$UNAME" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
+$as_echo_n "checking for UNAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$UNAME"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -10562,22 +11104,23 @@
fi
- if test "x$UNAME" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
+ if test "x$UNAME" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
$as_echo_n "checking for UNAME... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -10595,7 +11138,7 @@
# Publish this variable in the help.
- if test "x$UNIQ" = x; then
+ if [ -z "${UNIQ+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in uniq
do
@@ -10708,14 +11251,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$UNIQ"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$UNIQ" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
+$as_echo_n "checking for UNIQ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$UNIQ"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -10755,22 +11307,23 @@
fi
- if test "x$UNIQ" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
+ if test "x$UNIQ" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
$as_echo_n "checking for UNIQ... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -10788,7 +11341,7 @@
# Publish this variable in the help.
- if test "x$WC" = x; then
+ if [ -z "${WC+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in wc
do
@@ -10901,14 +11454,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$WC"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$WC" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
+$as_echo_n "checking for WC... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$WC"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -10948,22 +11510,23 @@
fi
- if test "x$WC" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
+ if test "x$WC" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
$as_echo_n "checking for WC... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -10981,7 +11544,7 @@
# Publish this variable in the help.
- if test "x$WHICH" = x; then
+ if [ -z "${WHICH+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in which
do
@@ -11094,14 +11657,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$WHICH"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$WHICH" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
+$as_echo_n "checking for WHICH... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$WHICH"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -11141,22 +11713,23 @@
fi
- if test "x$WHICH" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
+ if test "x$WHICH" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
$as_echo_n "checking for WHICH... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -11174,7 +11747,7 @@
# Publish this variable in the help.
- if test "x$XARGS" = x; then
+ if [ -z "${XARGS+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in xargs
do
@@ -11287,14 +11860,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$XARGS"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$XARGS" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
+$as_echo_n "checking for XARGS... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$XARGS"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -11334,22 +11916,23 @@
fi
- if test "x$XARGS" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
+ if test "x$XARGS" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
$as_echo_n "checking for XARGS... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -11368,7 +11951,7 @@
# Publish this variable in the help.
- if test "x$AWK" = x; then
+ if [ -z "${AWK+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in gawk mawk nawk awk
do
@@ -11475,14 +12058,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$AWK"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$AWK" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
+$as_echo_n "checking for AWK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$AWK"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -11522,22 +12114,23 @@
fi
- if test "x$AWK" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
+ if test "x$AWK" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
$as_echo_n "checking for AWK... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -11553,7 +12146,7 @@
# Publish this variable in the help.
- if test "x$GREP" = x; then
+ if [ -z "${GREP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
@@ -11702,14 +12295,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$GREP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$GREP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
+$as_echo_n "checking for GREP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$GREP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -11749,22 +12351,23 @@
fi
- if test "x$GREP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
+ if test "x$GREP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
$as_echo_n "checking for GREP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -11780,7 +12383,7 @@
# Publish this variable in the help.
- if test "x$EGREP" = x; then
+ if [ -z "${EGREP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
@@ -11937,14 +12540,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$EGREP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$EGREP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
+$as_echo_n "checking for EGREP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$EGREP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -11984,22 +12596,23 @@
fi
- if test "x$EGREP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
+ if test "x$EGREP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
$as_echo_n "checking for EGREP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -12015,7 +12628,7 @@
# Publish this variable in the help.
- if test "x$FGREP" = x; then
+ if [ -z "${FGREP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
$as_echo_n "checking for fgrep... " >&6; }
@@ -12172,14 +12785,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$FGREP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$FGREP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
+$as_echo_n "checking for FGREP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$FGREP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -12219,22 +12841,23 @@
fi
- if test "x$FGREP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
+ if test "x$FGREP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
$as_echo_n "checking for FGREP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -12250,7 +12873,7 @@
# Publish this variable in the help.
- if test "x$SED" = x; then
+ if [ -z "${SED+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
@@ -12411,14 +13034,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$SED"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$SED" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
+$as_echo_n "checking for SED... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$SED"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -12458,22 +13090,23 @@
fi
- if test "x$SED" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
+ if test "x$SED" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
$as_echo_n "checking for SED... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -12498,7 +13131,7 @@
# Publish this variable in the help.
- if test "x$CYGPATH" = x; then
+ if [ -z "${CYGPATH+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cygpath
do
@@ -12611,14 +13244,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CYGPATH"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CYGPATH" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
+$as_echo_n "checking for CYGPATH... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CYGPATH"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -12658,33 +13300,34 @@
fi
- if test "x$CYGPATH" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
+ if test "x$CYGPATH" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
$as_echo_n "checking for CYGPATH... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
- fi
- fi
- fi
-
-
-
-
- # Publish this variable in the help.
-
-
- if test "x$READLINK" = x; then
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${READLINK+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in greadlink readlink
do
@@ -12797,14 +13440,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$READLINK"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$READLINK" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
+$as_echo_n "checking for READLINK... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$READLINK"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -12844,33 +13496,34 @@
fi
- if test "x$READLINK" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
+ if test "x$READLINK" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
$as_echo_n "checking for READLINK... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
- fi
- fi
- fi
-
-
-
-
- # Publish this variable in the help.
-
-
- if test "x$DF" = x; then
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${DF+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in df
do
@@ -12983,14 +13636,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$DF"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$DF" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
+$as_echo_n "checking for DF... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$DF"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -13030,33 +13692,34 @@
fi
- if test "x$DF" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
+ if test "x$DF" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
$as_echo_n "checking for DF... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
- fi
- fi
- fi
-
-
-
-
- # Publish this variable in the help.
-
-
- if test "x$CPIO" = x; then
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${CPIO+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cpio bsdcpio
do
@@ -13169,14 +13832,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CPIO"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CPIO" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
+$as_echo_n "checking for CPIO... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CPIO"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -13216,22 +13888,219 @@
fi
- if test "x$CPIO" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
+ if test "x$CPIO" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
$as_echo_n "checking for CPIO... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${NICE+x}" ]; then
+ # The variable is not set by user, try to locate tool using the code snippet
+ for ac_prog in nice
+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 ${ac_cv_path_NICE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $NICE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_NICE="$NICE" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_NICE="$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
+NICE=$ac_cv_path_NICE
+if test -n "$NICE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
+$as_echo "$NICE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$NICE" && break
+done
+
+ else
+ # The variable is set, but is it from the command line or the environment?
+
+ # Try to remove the string !NICE! from our list.
+ try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
+ if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+ # If it failed, the variable was not from the command line. Ignore it,
+ # but warn the user (except for BASH, which is always set by the calling BASH).
+ if test "xNICE" != xBASH; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
+ fi
+ # Try to locate tool using the code snippet
+ for ac_prog in nice
+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 ${ac_cv_path_NICE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $NICE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_NICE="$NICE" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_NICE="$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
+NICE=$ac_cv_path_NICE
+if test -n "$NICE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
+$as_echo "$NICE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$NICE" && break
+done
+
+ else
+ # If it succeeded, then it was overridden by the user. We will use it
+ # for the tool.
+
+ # First remove it from the list of overridden variables, so we can test
+ # for unknown variables in the end.
+ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+ # Check if we try to supply an empty value
+ if test "x$NICE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
+$as_echo_n "checking for NICE... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$NICE"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_NICE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $NICE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_NICE="$NICE" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_NICE="$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
+NICE=$ac_cv_path_NICE
+if test -n "$NICE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
+$as_echo "$NICE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$NICE" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
+$as_echo_n "checking for NICE... " >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -17370,7 +18239,7 @@
# Publish this variable in the help.
- if test "x$UNZIP" = x; then
+ if [ -z "${UNZIP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in unzip
do
@@ -17483,14 +18352,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$UNZIP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$UNZIP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
+$as_echo_n "checking for UNZIP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$UNZIP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -17530,22 +18408,23 @@
fi
- if test "x$UNZIP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
+ if test "x$UNZIP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
$as_echo_n "checking for UNZIP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -17563,7 +18442,7 @@
# Publish this variable in the help.
- if test "x$ZIP" = x; then
+ if [ -z "${ZIP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in zip
do
@@ -17676,14 +18555,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$ZIP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$ZIP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
+$as_echo_n "checking for ZIP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$ZIP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -17723,22 +18611,23 @@
fi
- if test "x$ZIP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
+ if test "x$ZIP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
$as_echo_n "checking for ZIP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -17758,7 +18647,7 @@
# Publish this variable in the help.
- if test "x$LDD" = x; then
+ if [ -z "${LDD+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in ldd
do
@@ -17871,14 +18760,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$LDD"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$LDD" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
+$as_echo_n "checking for LDD... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$LDD"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -17918,22 +18816,23 @@
fi
- if test "x$LDD" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
+ if test "x$LDD" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
$as_echo_n "checking for LDD... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -17950,7 +18849,7 @@
# Publish this variable in the help.
- if test "x$OTOOL" = x; then
+ if [ -z "${OTOOL+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in otool
do
@@ -18063,14 +18962,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$OTOOL"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$OTOOL" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
+$as_echo_n "checking for OTOOL... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$OTOOL"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -18110,22 +19018,23 @@
fi
- if test "x$OTOOL" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
+ if test "x$OTOOL" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
$as_echo_n "checking for OTOOL... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -18139,7 +19048,7 @@
# Publish this variable in the help.
- if test "x$READELF" = x; then
+ if [ -z "${READELF+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in greadelf readelf
do
@@ -18252,14 +19161,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$READELF"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$READELF" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
+$as_echo_n "checking for READELF... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$READELF"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -18299,33 +19217,34 @@
fi
- if test "x$READELF" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
+ if test "x$READELF" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
$as_echo_n "checking for READELF... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
- fi
- fi
- fi
-
-
-
-
- # Publish this variable in the help.
-
-
- if test "x$HG" = x; then
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${HG+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in hg
do
@@ -18438,14 +19357,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$HG"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$HG" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
+$as_echo_n "checking for HG... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$HG"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -18485,33 +19413,34 @@
fi
- if test "x$HG" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
+ if test "x$HG" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
$as_echo_n "checking for HG... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
- fi
- fi
- fi
-
-
-
-
- # Publish this variable in the help.
-
-
- if test "x$STAT" = x; then
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${STAT+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in stat
do
@@ -18624,14 +19553,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$STAT"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$STAT" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
+$as_echo_n "checking for STAT... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$STAT"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -18671,33 +19609,34 @@
fi
- if test "x$STAT" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
+ if test "x$STAT" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
$as_echo_n "checking for STAT... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
- fi
- fi
- fi
-
-
-
-
- # Publish this variable in the help.
-
-
- if test "x$TIME" = x; then
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${TIME+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in time
do
@@ -18810,14 +19749,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$TIME"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$TIME" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
+$as_echo_n "checking for TIME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$TIME"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -18857,33 +19805,34 @@
fi
- if test "x$TIME" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
+ if test "x$TIME" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
$as_echo_n "checking for TIME... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
- fi
- fi
- fi
-
-
-
-
- # Publish this variable in the help.
-
-
- if test "x$PATCH" = x; then
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+ # Publish this variable in the help.
+
+
+ if [ -z "${PATCH+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in gpatch patch
do
@@ -18996,14 +19945,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$PATCH"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$PATCH" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
+$as_echo_n "checking for PATCH... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$PATCH"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -19043,22 +20001,23 @@
fi
- if test "x$PATCH" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
+ if test "x$PATCH" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
$as_echo_n "checking for PATCH... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -19080,7 +20039,7 @@
# Publish this variable in the help.
- if test "x$DSYMUTIL" = x; then
+ if [ -z "${DSYMUTIL+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in dsymutil
do
@@ -19193,14 +20152,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$DSYMUTIL"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$DSYMUTIL" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
+$as_echo_n "checking for DSYMUTIL... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$DSYMUTIL"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -19240,22 +20208,23 @@
fi
- if test "x$DSYMUTIL" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
+ if test "x$DSYMUTIL" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
$as_echo_n "checking for DSYMUTIL... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -19273,7 +20242,7 @@
# Publish this variable in the help.
- if test "x$XATTR" = x; then
+ if [ -z "${XATTR+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in xattr
do
@@ -19386,14 +20355,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$XATTR"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$XATTR" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
+$as_echo_n "checking for XATTR... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$XATTR"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -19433,22 +20411,23 @@
fi
- if test "x$XATTR" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
+ if test "x$XATTR" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
$as_echo_n "checking for XATTR... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -19465,7 +20444,7 @@
# Publish this variable in the help.
- if test "x$CODESIGN" = x; then
+ if [ -z "${CODESIGN+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in codesign
do
@@ -19578,14 +20557,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CODESIGN"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CODESIGN" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
+$as_echo_n "checking for CODESIGN... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CODESIGN"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -19625,22 +20613,23 @@
fi
- if test "x$CODESIGN" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
+ if test "x$CODESIGN" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
$as_echo_n "checking for CODESIGN... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -19668,7 +20657,7 @@
# Publish this variable in the help.
- if test "x$SETFILE" = x; then
+ if [ -z "${SETFILE+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in SetFile
do
@@ -19781,14 +20770,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$SETFILE"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$SETFILE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
+$as_echo_n "checking for SETFILE... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$SETFILE"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -19828,22 +20826,23 @@
fi
- if test "x$SETFILE" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
+ if test "x$SETFILE" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
$as_echo_n "checking for SETFILE... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -20017,182 +21016,6 @@
-# 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 ${ac_cv_prog_BDEPS_UNZIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_BDEPS_FTP+:} false; 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 as_fn_executable_p "$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.
@@ -20624,330 +21447,6 @@
as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
fi
- # Test: Is bootjdk available from builddeps?
-
- if test "x$BOOT_JDK_FOUND" = xno; then
- # Now execute the test
-
-
-
- if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
- # Source the builddeps file again, to make sure it uses the latest variables!
- . $builddepsfile
- # Look for a target and build machine specific resource!
- eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a target specific resource
- eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_bootjdk}
- fi
- if test "x$resource" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
-$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
- # If the resource in the builddeps.conf file is an existing directory,
- # for example /java/linux/cups
- if test -d ${resource}; then
- depdir=${resource}
- else
-
- # bootjdk is for example mymodule
- # $resource is for example libs/general/libmymod_1_2_3.zip
- # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
- # $with_builddeps_dir is for example /localhome/builddeps
- # depdir is the name of the variable into which we store the depdir, eg MYMOD
- # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
- # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
- filename=`basename $resource`
- filebase=`echo $filename | sed 's/\.[^\.]*$//'`
- filebase=${filename%%.*}
- extension=${filename#*.}
- installdir=$with_builddeps_dir/$filebase
- if test ! -f $installdir/$filename.unpacked; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
- if test ! -d $installdir; then
- mkdir -p $installdir
- fi
- if test ! -d $installdir; then
- as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
- fi
- tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
- touch $tmpfile
- if test ! -f $tmpfile; then
- as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
- fi
-
- # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
- # $tmpfile is the local file name for the downloaded file.
- VALID_TOOL=no
- if test "x$BDEPS_FTP" = xwget; then
- VALID_TOOL=yes
- wget -O $tmpfile $with_builddeps_server/$resource
- fi
- if test "x$BDEPS_FTP" = xlftp; then
- VALID_TOOL=yes
- lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
- fi
- if test "x$BDEPS_FTP" = xftp; then
- VALID_TOOL=yes
- FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
- FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
- FTPUSERPWD=${FTPSERVER%%@*}
- if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
- FTPUSER=${userpwd%%:*}
- FTPPWD=${userpwd#*@}
- FTPSERVER=${FTPSERVER#*@}
- else
- FTPUSER=ftp
- FTPPWD=ftp
- fi
- # the "pass" command does not work on some
- # ftp clients (read ftp.exe) but if it works,
- # passive mode is better!
- ( \
- echo "user $FTPUSER $FTPPWD" ; \
- echo "pass" ; \
- echo "bin" ; \
- echo "get $FTPPATH $tmpfile" ; \
- ) | ftp -in $FTPSERVER
- fi
- if test "x$VALID_TOOL" != xyes; then
- as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
- fi
-
- mv $tmpfile $installdir/$filename
- if test ! -s $installdir/$filename; then
- as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
- fi
- case "$extension" in
- zip) echo "Unzipping $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
- ;;
- tar.gz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- tgz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
- ;;
- esac
- fi
- if test -f $installdir/$filename.unpacked; then
- depdir=$installdir
- fi
-
- fi
- # Source the builddeps file again, because in the previous command, the depdir
- # was updated to point at the current build dependency install directory.
- . $builddepsfile
- # Now extract variables from the builddeps.conf files.
- theroot=${builddep_bootjdk_ROOT}
- thecflags=${builddep_bootjdk_CFLAGS}
- thelibs=${builddep_bootjdk_LIBS}
- if test "x$depdir" = x; then
- as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
- fi
- BOOT_JDK=$depdir
- if test "x$theroot" != x; then
- BOOT_JDK="$theroot"
- fi
- if test "x$thecflags" != x; then
- BOOT_JDK_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- BOOT_JDK_LIBS="$thelibs"
- fi
- BOOT_JDK_FOUND=maybe
- else BOOT_JDK_FOUND=no
-
- fi
- else BOOT_JDK_FOUND=no
-
- 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
- # 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_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
- if test "x$FOUND_CORRECT_VERSION" = 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 8 or 9)" >&5
-$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
- BOOT_JDK_FOUND=no
- else
- # We're done! :-)
- BOOT_JDK_FOUND=yes
-
- # Only process if variable expands to non-empty
-
- if test "x$BOOT_JDK" != x; then
- 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-style (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 unix platform. Hooray! :)
- path="$BOOT_JDK"
- 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
-
- # Use eval to expand a potential ~
- eval path="$path"
- 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
-
- BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
- 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 javac
- fi # end check java
- fi # end check boot jdk found
- fi
-
-
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
if test "x$BOOT_JDK_FOUND" = xno; then
@@ -25690,7 +26189,7 @@
if test "x$BOOT_JDK_FOUND" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
- # openjdk is the help tag: freetype, cups, pulse, alsa etc
+ # openjdk is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=openjdk
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -25734,7 +26233,7 @@
# Publish this variable in the help.
- if test "x$JAVA" = x; then
+ if [ -z "${JAVA+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
@@ -25787,14 +26286,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$JAVA"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$JAVA" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
+$as_echo_n "checking for JAVA... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$JAVA"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -25834,22 +26342,23 @@
fi
- if test "x$JAVA" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
+ if test "x$JAVA" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
$as_echo_n "checking for JAVA... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -25861,7 +26370,7 @@
# Publish this variable in the help.
- if test "x$JAVAC" = x; then
+ if [ -z "${JAVAC+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
@@ -25914,14 +26423,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$JAVAC"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$JAVAC" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
+$as_echo_n "checking for JAVAC... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$JAVAC"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -25961,22 +26479,23 @@
fi
- if test "x$JAVAC" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
+ if test "x$JAVAC" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
$as_echo_n "checking for JAVAC... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -25988,7 +26507,7 @@
# Publish this variable in the help.
- if test "x$JAVAH" = x; then
+ if [ -z "${JAVAH+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
@@ -26041,14 +26560,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$JAVAH"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$JAVAH" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
+$as_echo_n "checking for JAVAH... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$JAVAH"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -26088,22 +26616,23 @@
fi
- if test "x$JAVAH" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
+ if test "x$JAVAH" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
$as_echo_n "checking for JAVAH... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -26115,7 +26644,7 @@
# Publish this variable in the help.
- if test "x$JAR" = x; then
+ if [ -z "${JAR+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
@@ -26168,14 +26697,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$JAR"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$JAR" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
+$as_echo_n "checking for JAR... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$JAR"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -26215,22 +26753,23 @@
fi
- if test "x$JAR" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
+ if test "x$JAR" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
$as_echo_n "checking for JAR... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -26242,7 +26781,7 @@
# Publish this variable in the help.
- if test "x$JARSIGNER" = x; then
+ if [ -z "${JARSIGNER+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
@@ -26295,14 +26834,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$JARSIGNER"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$JARSIGNER" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
+$as_echo_n "checking for JARSIGNER... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$JARSIGNER"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -26342,22 +26890,23 @@
fi
- if test "x$JARSIGNER" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
+ if test "x$JARSIGNER" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
$as_echo_n "checking for JARSIGNER... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -26825,6 +27374,109 @@
fi
+# User supplied flags should be used when configure detects compilers
+
+ if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
+$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
+ fi
+
+ if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
+$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
+ fi
+
+ if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
+$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
+ fi
+
+
+# Check whether --with-extra-cflags was given.
+if test "${with_extra_cflags+set}" = set; then :
+ withval=$with_extra_cflags;
+fi
+
+
+
+# Check whether --with-extra-cxxflags was given.
+if test "${with_extra_cxxflags+set}" = set; then :
+ withval=$with_extra_cxxflags;
+fi
+
+
+
+# Check whether --with-extra-ldflags was given.
+if test "${with_extra_ldflags+set}" = set; then :
+ withval=$with_extra_ldflags;
+fi
+
+
+ EXTRA_CFLAGS="$with_extra_cflags"
+ EXTRA_CXXFLAGS="$with_extra_cxxflags"
+ EXTRA_LDFLAGS="$with_extra_ldflags"
+
+ # Hotspot needs these set in their legacy form
+ LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
+ LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
+ LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
+
+
+
+
+
+ # The global CFLAGS and LDLAGS variables are used by configure tests and
+ # should include the extra parameters
+ CFLAGS="$EXTRA_CFLAGS"
+ CXXFLAGS="$EXTRA_CXXFLAGS"
+ LDFLAGS="$EXTRA_LDFLAGS"
+ CPPFLAGS=""
+
+# The sysroot cflags are needed for configure to be able to run the compilers
+
+ if test "x$SYSROOT" != "x"; then
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ # Solaris Studio does not have a concept of sysroot. Instead we must
+ # make sure the default include and lib dirs are appended to each
+ # compile and link command line.
+ SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
+ SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
+ fi
+ elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+ SYSROOT_CFLAGS="--sysroot=$SYSROOT"
+ SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
+ elif test "x$TOOLCHAIN_TYPE" = xclang; then
+ SYSROOT_CFLAGS="-isysroot $SYSROOT"
+ SYSROOT_LDFLAGS="-isysroot $SYSROOT"
+ fi
+ # Propagate the sysroot args to hotspot
+ LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
+ LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
+ LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
+ # The global CFLAGS and LDFLAGS variables need these for configure to function
+ CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
+ LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # We also need -iframework<path>/System/Library/Frameworks
+ SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+ SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
+ # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
+ # set this here so it doesn't have to be peppered throughout the forest
+ SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+ SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
+ fi
+
+
+
+
+
# Then detect the actual binaries needed
# FIXME: Is this needed?
@@ -28491,7 +29143,7 @@
if test "x$CC" = x; then
# Print a helpful message on how to acquire the necessary build dependency.
- # devkit is the help tag: freetype, cups, pulse, alsa etc
+ # devkit is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=devkit
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -30239,7 +30891,7 @@
if test "x$CXX" = x; then
# Print a helpful message on how to acquire the necessary build dependency.
- # devkit is the help tag: freetype, cups, pulse, alsa etc
+ # devkit is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=devkit
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -32684,7 +33336,7 @@
# Publish this variable in the help.
- if test "x$AS" = x; then
+ if [ -z "${AS+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in as
do
@@ -32797,14 +33449,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$AS"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$AS" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
+$as_echo_n "checking for AS... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$AS"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -32844,22 +33505,23 @@
fi
- if test "x$AS" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
+ if test "x$AS" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
$as_echo_n "checking for AS... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -33205,7 +33867,7 @@
# Publish this variable in the help.
- if test "x$AR" = x; then
+ if [ -z "${AR+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
@@ -33428,14 +34090,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$AR"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$AR" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
+$as_echo_n "checking for AR... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$AR"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -33475,22 +34146,23 @@
fi
- if test "x$AR" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
+ if test "x$AR" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
$as_echo_n "checking for AR... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -33791,7 +34463,7 @@
# Publish this variable in the help.
- if test "x$LIPO" = x; then
+ if [ -z "${LIPO+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in lipo
do
@@ -33904,14 +34576,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$LIPO"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$LIPO" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
+$as_echo_n "checking for LIPO... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$LIPO"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -33951,22 +34632,23 @@
fi
- if test "x$LIPO" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
+ if test "x$LIPO" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
$as_echo_n "checking for LIPO... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -35317,7 +35999,7 @@
# Publish this variable in the help.
- if test "x$STRIP" = x; then
+ if [ -z "${STRIP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in strip
do
@@ -35430,14 +36112,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$STRIP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$STRIP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
+$as_echo_n "checking for STRIP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$STRIP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -35477,22 +36168,23 @@
fi
- if test "x$STRIP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
+ if test "x$STRIP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
$as_echo_n "checking for STRIP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -35789,7 +36481,7 @@
# Publish this variable in the help.
- if test "x$NM" = x; then
+ if [ -z "${NM+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in nm
do
@@ -35902,14 +36594,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$NM"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$NM" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+$as_echo_n "checking for NM... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$NM"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -35949,22 +36650,23 @@
fi
- if test "x$NM" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
+ if test "x$NM" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
$as_echo_n "checking for NM... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -36261,7 +36963,7 @@
# Publish this variable in the help.
- if test "x$GNM" = x; then
+ if [ -z "${GNM+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in gnm
do
@@ -36374,14 +37076,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$GNM"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$GNM" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
+$as_echo_n "checking for GNM... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$GNM"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -36421,22 +37132,23 @@
fi
- if test "x$GNM" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
+ if test "x$GNM" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
$as_echo_n "checking for GNM... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -36735,7 +37447,7 @@
# Publish this variable in the help.
- if test "x$STRIP" = x; then
+ if [ -z "${STRIP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
if test -n "$ac_tool_prefix"; then
for ac_prog in strip
@@ -36958,14 +37670,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$STRIP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$STRIP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
+$as_echo_n "checking for STRIP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$STRIP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -37005,22 +37726,23 @@
fi
- if test "x$STRIP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
+ if test "x$STRIP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
$as_echo_n "checking for STRIP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -37317,7 +38039,7 @@
# Publish this variable in the help.
- if test "x$NM" = x; then
+ if [ -z "${NM+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
if test -n "$ac_tool_prefix"; then
for ac_prog in nm
@@ -37540,14 +38262,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$NM"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$NM" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+$as_echo_n "checking for NM... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$NM"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -37587,22 +38318,23 @@
fi
- if test "x$NM" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
+ if test "x$NM" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
$as_echo_n "checking for NM... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -37906,7 +38638,7 @@
# Publish this variable in the help.
- if test "x$OBJCOPY" = x; then
+ if [ -z "${OBJCOPY+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
if test -n "$ac_tool_prefix"; then
for ac_prog in gobjcopy objcopy
@@ -38129,14 +38861,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$OBJCOPY"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$OBJCOPY" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
+$as_echo_n "checking for OBJCOPY... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$OBJCOPY"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -38176,22 +38917,23 @@
fi
- if test "x$OBJCOPY" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
+ if test "x$OBJCOPY" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
$as_echo_n "checking for OBJCOPY... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -38535,7 +39277,7 @@
# Publish this variable in the help.
- if test "x$OBJDUMP" = x; then
+ if [ -z "${OBJDUMP+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
if test -n "$ac_tool_prefix"; then
for ac_prog in gobjdump objdump
@@ -38758,14 +39500,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$OBJDUMP"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$OBJDUMP" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
+$as_echo_n "checking for OBJDUMP... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$OBJDUMP"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -38805,22 +39556,23 @@
fi
- if test "x$OBJDUMP" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
+ if test "x$OBJDUMP" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
$as_echo_n "checking for OBJDUMP... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -39144,7 +39896,7 @@
# Publish this variable in the help.
- if test "x$BUILD_CC" = x; then
+ if [ -z "${BUILD_CC+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cl cc gcc
do
@@ -39257,14 +40009,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$BUILD_CC"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$BUILD_CC" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
+$as_echo_n "checking for BUILD_CC... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$BUILD_CC"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -39304,22 +40065,23 @@
fi
- if test "x$BUILD_CC" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
+ if test "x$BUILD_CC" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
$as_echo_n "checking for BUILD_CC... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -39616,7 +40378,7 @@
# Publish this variable in the help.
- if test "x$BUILD_CXX" = x; then
+ if [ -z "${BUILD_CXX+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cl CC g++
do
@@ -39729,14 +40491,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$BUILD_CXX"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$BUILD_CXX" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
+$as_echo_n "checking for BUILD_CXX... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$BUILD_CXX"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -39776,22 +40547,23 @@
fi
- if test "x$BUILD_CXX" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
+ if test "x$BUILD_CXX" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
$as_echo_n "checking for BUILD_CXX... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -40088,7 +40860,7 @@
# Publish this variable in the help.
- if test "x$BUILD_LD" = x; then
+ if [ -z "${BUILD_LD+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in ld
do
@@ -40201,14 +40973,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$BUILD_LD"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$BUILD_LD" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_LD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BUILD_LD= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
+$as_echo_n "checking for BUILD_LD... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$BUILD_LD"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -40248,22 +41029,23 @@
fi
- if test "x$BUILD_LD" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
+ if test "x$BUILD_LD" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
$as_echo_n "checking for BUILD_LD... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -40555,13 +41337,19 @@
fi
fi
+ BUILD_SYSROOT_CFLAGS=""
+ BUILD_SYSROOT_LDFLAGS=""
else
# If we are not cross compiling, use the normal target compilers for
# building the build platform executables.
BUILD_CC="$CC"
BUILD_CXX="$CXX"
BUILD_LD="$LD"
- fi
+ BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
+ BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
+ fi
+
+
@@ -41021,7 +41809,7 @@
# Publish this variable in the help.
- if test "x$JTREGEXE" = x; then
+ if [ -z "${JTREGEXE+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in jtreg
do
@@ -41134,14 +41922,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$JTREGEXE"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$JTREGEXE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
+$as_echo_n "checking for JTREGEXE... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$JTREGEXE"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -41181,22 +41978,23 @@
fi
- if test "x$JTREGEXE" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
+ if test "x$JTREGEXE" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
$as_echo_n "checking for JTREGEXE... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
@@ -41252,9 +42050,6 @@
STRIPFLAGS="-X32_64"
fi
- if test "x$OPENJDK_TARGET_OS" != xwindows; then
- POST_STRIP_CMD="$STRIP $STRIPFLAGS"
- fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -41306,44 +42101,6 @@
COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
fi
- if test "x$SYSROOT" != "x"; then
- if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- # Solaris Studio does not have a concept of sysroot. Instead we must
- # make sure the default include and lib dirs are appended to each
- # compile and link command line.
- SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
- SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
- -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
- -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
- fi
- elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
- # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
- SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
- SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
- elif test "x$TOOLCHAIN_TYPE" = xgcc; then
- SYSROOT_CFLAGS="--sysroot=$SYSROOT"
- SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
- elif test "x$TOOLCHAIN_TYPE" = xclang; then
- SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
- SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
- fi
- # Propagate the sysroot args to hotspot
- LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
- LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
- LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
- fi
-
- # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
- # set this here so it doesn't have to be peppered throughout the forest
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
- SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
- fi
-
-
-
-
# FIXME: Currently we must test this after toolchain but before flags. Fix!
@@ -41543,8 +42300,38 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
if test "x$COMPILE_TYPE" = xreduced; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
-$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # reduced is the help tag: freetype, cups, alsa etc
+ MISSING_DEPENDENCY=reduced
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ cygwin_help $MISSING_DEPENDENCY
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ msys_help $MISSING_DEPENDENCY
+ else
+ 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 ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
+$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
elif test "x$COMPILE_TYPE" = xcross; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
@@ -41603,8 +42390,8 @@
# Let's try to implicitely set the compilers target architecture and retry the test
{ $as_echo "$as_me:${as_lineno-$LINENO}: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&5
$as_echo "$as_me: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
-$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
+$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
# When we add flags to the "official" CFLAGS etc, we need to
# keep track of these additions in ADDED_CFLAGS etc. These
@@ -41667,7 +42454,46 @@
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
- as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" >&5
+$as_echo "$as_me: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" >&6;}
+ if test "x$COMPILE_TYPE" = xreduced; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # reduced is the help tag: freetype, cups, alsa etc
+ MISSING_DEPENDENCY=reduced
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ cygwin_help $MISSING_DEPENDENCY
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ msys_help $MISSING_DEPENDENCY
+ else
+ 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 ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
+$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
+ elif test "x$COMPILE_TYPE" = xcross; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
+$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
+ fi
+ as_fn_error $? "Cannot continue." "$LINENO" 5
fi
fi
fi
@@ -42267,54 +43093,9 @@
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
fi
- if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
-$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
- fi
-
- if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
-$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
- fi
-
- if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
-$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
- fi
-
-
-# Check whether --with-extra-cflags was given.
-if test "${with_extra_cflags+set}" = set; then :
- withval=$with_extra_cflags;
-fi
-
-
-
-# Check whether --with-extra-cxxflags was given.
-if test "${with_extra_cxxflags+set}" = set; then :
- withval=$with_extra_cxxflags;
-fi
-
-
-
-# Check whether --with-extra-ldflags was given.
-if test "${with_extra_ldflags+set}" = set; then :
- withval=$with_extra_ldflags;
-fi
-
-
- CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
- CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
- LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
-
- # Hotspot needs these set in their legacy form
- LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
- LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
- LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
-
-
-
-
+ CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
+ LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
###############################################################################
#
@@ -43082,83 +43863,2814 @@
-
- ###############################################################################
- #
- # OS specific settings that we never will need to probe.
- #
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
-$as_echo_n "checking what is not needed on Linux?... " >&6; }
- PULSE_NOT_NEEDED=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
-$as_echo "pulse" >&6; }
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
-$as_echo_n "checking what is not needed on Solaris?... " >&6; }
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
-$as_echo "alsa pulse" >&6; }
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xaix; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
-$as_echo_n "checking what is not needed on AIX?... " >&6; }
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
-$as_echo "alsa pulse" >&6; }
- fi
-
-
+ # Check if X11 is needed
+ if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # No X11 support on windows or macosx
+ NEEDS_LIB_X11=false
+ else
+ if test "x$SUPPORT_HEADFUL" = xno; then
+ # No X11 support if building headless-only
+ NEEDS_LIB_X11=false
+ else
+ # All other instances need X11
+ NEEDS_LIB_X11=true
+ fi
+ fi
+
+ # Check if cups is needed
if test "x$OPENJDK_TARGET_OS" = xwindows; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
-$as_echo_n "checking what is not needed on Windows?... " >&6; }
- CUPS_NOT_NEEDED=yes
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- X11_NOT_NEEDED=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
-$as_echo "alsa cups pulse x11" >&6; }
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
-$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- X11_NOT_NEEDED=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
-$as_echo "alsa pulse x11" >&6; }
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xbsd; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
-$as_echo_n "checking what is not needed on bsd?... " >&6; }
- ALSA_NOT_NEEDED=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
-$as_echo "alsa" >&6; }
- fi
-
- if test "x$OPENJDK" = "xfalse"; then
- FREETYPE_NOT_NEEDED=yes
- fi
-
- if test "x$SUPPORT_HEADFUL" = xno; then
- X11_NOT_NEEDED=yes
- fi
-
-
-
- ###############################################################################
- #
- # Check for X Windows
- #
-
- if test "x$X11_NOT_NEEDED" = xyes; then
+ # Windows have a separate print system
+ NEEDS_LIB_CUPS=false
+ else
+ NEEDS_LIB_CUPS=true
+ fi
+
+ # Check if freetype is needed
+ if test "x$OPENJDK" = "xtrue"; then
+ NEEDS_LIB_FREETYPE=true
+ else
+ NEEDS_LIB_FREETYPE=false
+ fi
+
+ # Check if alsa is needed
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ NEEDS_LIB_ALSA=true
+ else
+ NEEDS_LIB_ALSA=false
+ fi
+
+ # Check if ffi is needed
+ if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+ NEEDS_LIB_FFI=true
+ else
+ NEEDS_LIB_FFI=false
+ fi
+
+
+ # statically link libstdc++ before C++ ABI is stablized on Linux unless
+ # dynamic build is configured on command line.
+
+# Check whether --with-stdc++lib was given.
+if test "${with_stdc__lib+set}" = set; then :
+ withval=$with_stdc__lib;
+ if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
+ && test "x$with_stdc__lib" != xdefault; then
+ as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
+ fi
+
+else
+ with_stdc__lib=default
+
+fi
+
+
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ # Test if -lstdc++ works.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
+$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ OLD_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -lstdc++"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ has_dynamic_libstdcxx=yes
+else
+ has_dynamic_libstdcxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXFLAGS="$OLD_CXXFLAGS"
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
+$as_echo "$has_dynamic_libstdcxx" >&6; }
+
+ # Test if stdc++ can be linked statically.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
+$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
+ STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ OLD_LIBS="$LIBS"
+ OLD_CXX="$CXX"
+ LIBS="$STATIC_STDCXX_FLAGS"
+ CXX="$CC"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ has_static_libstdcxx=yes
+else
+ has_static_libstdcxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$OLD_LIBS"
+ CXX="$OLD_CXX"
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
+$as_echo "$has_static_libstdcxx" >&6; }
+
+ if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
+ as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
+ fi
+
+ if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
+ as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
+ fi
+
+ if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
+ as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
+ fi
+
+ # If dynamic was requested, it's available since it would fail above otherwise.
+ # If dynamic wasn't requested, go with static unless it isn't available.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
+$as_echo_n "checking how to link with libstdc++... " >&6; }
+ if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+ 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; }
+ else
+ 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; }
+ fi
+ fi
+
+
+ # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
+ LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
+ fi
+
+ # TODO better (platform agnostic) test
+ if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
+ LIBCXX="-lstdc++"
+ fi
+
+
+ # Setup Windows runtime dlls
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+
+
+# 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
+ # If given explicitely by user, do not probe. If not present, fail directly.
+
+ DLL_NAME="$MSVCR_NAME"
+ POSSIBLE_MSVC_DLL="$with_msvcr_dll"
+ METHOD="--with-msvcr-dll"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
+ fi
+ MSVCR_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_MSVCR_DLL" != x; then
+
+ DLL_NAME="$MSVCR_NAME"
+ POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
+ METHOD="devkit"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
+ fi
+ MSVCR_DLL="$MSVC_DLL"
+ else
+
+ DLL_NAME="${MSVCR_NAME}"
+ MSVC_DLL=
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Using well-known location from Visual Studio 10.0
+ if test "x$VCINSTALLDIR" != x; then
+ CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
+
+ windows_path="$CYGWIN_VC_INSTALL_DIR"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ CYGWIN_VC_INSTALL_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'`
+ CYGWIN_VC_INSTALL_DIR="$unix_path"
+ fi
+
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+ else
+ POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+ fi
+ $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="well-known location in VCINSTALLDIR"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Check in the Boot JDK directory.
+ POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="well-known location in Boot JDK"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Look in the Windows system32 directory
+ CYGWIN_SYSTEMROOT="$SYSTEMROOT"
+
+ windows_path="$CYGWIN_SYSTEMROOT"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ CYGWIN_SYSTEMROOT="$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'`
+ CYGWIN_SYSTEMROOT="$unix_path"
+ fi
+
+ POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="well-known location in SYSTEMROOT"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: If Visual Studio Express is installed, there is usually one with the debugger
+ if test "x$VS100COMNTOOLS" != x; then
+ CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
+
+ windows_path="$CYGWIN_VS_TOOLS_DIR"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ CYGWIN_VS_TOOLS_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'`
+ CYGWIN_VS_TOOLS_DIR="$unix_path"
+ fi
+
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
+ | $GREP -i /x64/ | $HEAD --lines 1`
+ else
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
+ | $GREP -i /x86/ | $HEAD --lines 1`
+ fi
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="search of VS100COMNTOOLS"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
+ # (This was the original behaviour; kept since it might turn something up)
+ if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+ | $GREP x64 | $HEAD --lines 1`
+ else
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+ | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
+ if test "x$POSSIBLE_MSVC_DLL" = x; then
+ # We're grasping at straws now...
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+ | $HEAD --lines 1`
+ fi
+ fi
+
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="search of VCINSTALLDIR"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
+ fi
+
+ MSVCR_DLL="$MSVC_DLL"
+ fi
+
+
+
+# Check whether --with-msvcp-dll was given.
+if test "${with_msvcp_dll+set}" = set; then :
+ withval=$with_msvcp_dll;
+fi
+
+
+ if test "x$MSVCP_NAME" != "x"; then
+ if test "x$with_msvcp_dll" != x; then
+ # If given explicitely by user, do not probe. If not present, fail directly.
+
+ DLL_NAME="$MSVCP_NAME"
+ POSSIBLE_MSVC_DLL="$with_msvcp_dll"
+ METHOD="--with-msvcp-dll"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
+ fi
+ MSVCP_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_MSVCP_DLL" != x; then
+
+ DLL_NAME="$MSVCP_NAME"
+ POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
+ METHOD="devkit"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
+ fi
+ MSVCP_DLL="$MSVC_DLL"
+ else
+
+ DLL_NAME="${MSVCP_NAME}"
+ MSVC_DLL=
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Using well-known location from Visual Studio 10.0
+ if test "x$VCINSTALLDIR" != x; then
+ CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
+
+ windows_path="$CYGWIN_VC_INSTALL_DIR"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ CYGWIN_VC_INSTALL_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'`
+ CYGWIN_VC_INSTALL_DIR="$unix_path"
+ fi
+
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+ else
+ POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
+ fi
+ $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="well-known location in VCINSTALLDIR"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Check in the Boot JDK directory.
+ POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="well-known location in Boot JDK"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Look in the Windows system32 directory
+ CYGWIN_SYSTEMROOT="$SYSTEMROOT"
+
+ windows_path="$CYGWIN_SYSTEMROOT"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ CYGWIN_SYSTEMROOT="$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'`
+ CYGWIN_SYSTEMROOT="$unix_path"
+ fi
+
+ POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="well-known location in SYSTEMROOT"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: If Visual Studio Express is installed, there is usually one with the debugger
+ if test "x$VS100COMNTOOLS" != x; then
+ CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
+
+ windows_path="$CYGWIN_VS_TOOLS_DIR"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ CYGWIN_VS_TOOLS_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'`
+ CYGWIN_VS_TOOLS_DIR="$unix_path"
+ fi
+
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
+ | $GREP -i /x64/ | $HEAD --lines 1`
+ else
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
+ | $GREP -i /x86/ | $HEAD --lines 1`
+ fi
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="search of VS100COMNTOOLS"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
+ # (This was the original behaviour; kept since it might turn something up)
+ if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+ | $GREP x64 | $HEAD --lines 1`
+ else
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+ | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
+ if test "x$POSSIBLE_MSVC_DLL" = x; then
+ # We're grasping at straws now...
+ POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
+ | $HEAD --lines 1`
+ fi
+ fi
+
+
+ DLL_NAME="$DLL_NAME"
+ POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ METHOD="search of VCINSTALLDIR"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_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
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
+ fi
+
+ MSVCP_DLL="$MSVC_DLL"
+ fi
+
+ fi
+
+ fi
+
+
+ if test "x$NEEDS_LIB_X11" = xfalse; then
if test "x${with_x}" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
@@ -43884,7 +47396,7 @@
if test "x$no_x" = xyes; then
# Print a helpful message on how to acquire the necessary build dependency.
- # x11 is the help tag: freetype, cups, pulse, alsa etc
+ # x11 is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=x11
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -43958,7 +47470,7 @@
if test "x$X11_HEADERS_OK" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
- # x11 is the help tag: freetype, cups, pulse, alsa etc
+ # x11 is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=x11
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -44021,17 +47533,12 @@
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- fi # X11_NOT_NEEDED
-
-
-
-
-
-
- ###############################################################################
- #
- # The common unix printing system cups is used to print from java.
- #
+ fi # NEEDS_LIB_X11
+
+
+
+
+
# Check whether --with-cups was given.
if test "${with_cups+set}" = set; then :
@@ -44045,7 +47552,7 @@
fi
- if test "x$CUPS_NOT_NEEDED" = xyes; then
+ if test "x$NEEDS_LIB_CUPS" = xfalse; 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;}
@@ -44067,151 +47574,6 @@
CUPS_FOUND=yes
fi
if test "x$CUPS_FOUND" = xno; then
-
-
- if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
- # Source the builddeps file again, to make sure it uses the latest variables!
- . $builddepsfile
- # Look for a target and build machine specific resource!
- eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a target specific resource
- eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The cups comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_cups}
- fi
- if test "x$resource" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
-$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
- # If the resource in the builddeps.conf file is an existing directory,
- # for example /java/linux/cups
- if test -d ${resource}; then
- depdir=${resource}
- else
-
- # cups is for example mymodule
- # $resource is for example libs/general/libmymod_1_2_3.zip
- # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
- # $with_builddeps_dir is for example /localhome/builddeps
- # depdir is the name of the variable into which we store the depdir, eg MYMOD
- # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
- # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
- filename=`basename $resource`
- filebase=`echo $filename | sed 's/\.[^\.]*$//'`
- filebase=${filename%%.*}
- extension=${filename#*.}
- installdir=$with_builddeps_dir/$filebase
- if test ! -f $installdir/$filename.unpacked; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
- if test ! -d $installdir; then
- mkdir -p $installdir
- fi
- if test ! -d $installdir; then
- as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
- fi
- tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
- touch $tmpfile
- if test ! -f $tmpfile; then
- as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
- fi
-
- # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
- # $tmpfile is the local file name for the downloaded file.
- VALID_TOOL=no
- if test "x$BDEPS_FTP" = xwget; then
- VALID_TOOL=yes
- wget -O $tmpfile $with_builddeps_server/$resource
- fi
- if test "x$BDEPS_FTP" = xlftp; then
- VALID_TOOL=yes
- lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
- fi
- if test "x$BDEPS_FTP" = xftp; then
- VALID_TOOL=yes
- FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
- FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
- FTPUSERPWD=${FTPSERVER%%@*}
- if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
- FTPUSER=${userpwd%%:*}
- FTPPWD=${userpwd#*@}
- FTPSERVER=${FTPSERVER#*@}
- else
- FTPUSER=ftp
- FTPPWD=ftp
- fi
- # the "pass" command does not work on some
- # ftp clients (read ftp.exe) but if it works,
- # passive mode is better!
- ( \
- echo "user $FTPUSER $FTPPWD" ; \
- echo "pass" ; \
- echo "bin" ; \
- echo "get $FTPPATH $tmpfile" ; \
- ) | ftp -in $FTPSERVER
- fi
- if test "x$VALID_TOOL" != xyes; then
- as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
- fi
-
- mv $tmpfile $installdir/$filename
- if test ! -s $installdir/$filename; then
- as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
- fi
- case "$extension" in
- zip) echo "Unzipping $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
- ;;
- tar.gz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- tgz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
- ;;
- esac
- fi
- if test -f $installdir/$filename.unpacked; then
- depdir=$installdir
- fi
-
- fi
- # Source the builddeps file again, because in the previous command, the depdir
- # was updated to point at the current build dependency install directory.
- . $builddepsfile
- # Now extract variables from the builddeps.conf files.
- theroot=${builddep_cups_ROOT}
- thecflags=${builddep_cups_CFLAGS}
- thelibs=${builddep_cups_LIBS}
- if test "x$depdir" = x; then
- as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
- fi
- CUPS=$depdir
- if test "x$theroot" != x; then
- CUPS="$theroot"
- fi
- if test "x$thecflags" != x; then
- CUPS_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- CUPS_LIBS="$thelibs"
- fi
- CUPS_FOUND=yes
-
- fi
-
- fi
-
- fi
- if test "x$CUPS_FOUND" = xno; then
# Are the cups headers installed in the default /usr/include location?
for ac_header in cups/cups.h cups/ppd.h
do :
@@ -44222,10 +47584,9 @@
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- CUPS_FOUND=yes
- CUPS_CFLAGS=
- DEFAULT_CUPS=yes
-
+ CUPS_FOUND=yes
+ CUPS_CFLAGS=
+ DEFAULT_CUPS=yes
fi
@@ -44252,7 +47613,7 @@
if test "x$CUPS_FOUND" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
- # cups is the help tag: freetype, cups, pulse, alsa etc
+ # cups is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=cups
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -44288,12 +47649,6 @@
-
- ###############################################################################
- #
- # The ubiquitous freetype library is used to render fonts.
- #
-
# Check whether --with-freetype was given.
if test "${with_freetype+set}" = set; then :
withval=$with_freetype;
@@ -44329,7 +47684,7 @@
FREETYPE_LIBS=
FREETYPE_BUNDLE_LIB_PATH=
- if test "x$FREETYPE_NOT_NEEDED" = xyes; then
+ if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
@@ -44352,15 +47707,15 @@
# Check if the freetype sources are acessible..
if ! test -d $FREETYPE_SRC_PATH; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
-$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
+$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
BUILD_FREETYPE=no
fi
# ..and contain a vc2010 project file
vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
-$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
+$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
BUILD_FREETYPE=no
fi
# Now check if configure found a version of 'msbuild.exe'
@@ -44372,7 +47727,6 @@
# Ready to go..
if test "x$BUILD_FREETYPE" = xyes; then
-
# msbuild requires trailing slashes for output directories
freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
freetype_lib_path_unix="$freetype_lib_path"
@@ -44422,37 +47776,37 @@
# First we try to build the freetype.dll
$ECHO -e "@echo off\n"\
- "$MSBUILD $vcxproj_path "\
- "/p:PlatformToolset=$PLATFORM_TOOLSET "\
- "/p:Configuration=\"Release Multithreaded\" "\
- "/p:Platform=$freetype_platform "\
- "/p:ConfigurationType=DynamicLibrary "\
- "/p:TargetName=freetype "\
- "/p:OutDir=\"$freetype_lib_path\" "\
- "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
+ "$MSBUILD $vcxproj_path "\
+ "/p:PlatformToolset=$PLATFORM_TOOLSET "\
+ "/p:Configuration=\"Release Multithreaded\" "\
+ "/p:Platform=$freetype_platform "\
+ "/p:ConfigurationType=DynamicLibrary "\
+ "/p:TargetName=freetype "\
+ "/p:OutDir=\"$freetype_lib_path\" "\
+ "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
cmd /c freetype.bat
if test -s "$freetype_lib_path_unix/freetype.dll"; then
# If that succeeds we also build freetype.lib
$ECHO -e "@echo off\n"\
- "$MSBUILD $vcxproj_path "\
- "/p:PlatformToolset=$PLATFORM_TOOLSET "\
- "/p:Configuration=\"Release Multithreaded\" "\
- "/p:Platform=$freetype_platform "\
- "/p:ConfigurationType=StaticLibrary "\
- "/p:TargetName=freetype "\
- "/p:OutDir=\"$freetype_lib_path\" "\
- "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
+ "$MSBUILD $vcxproj_path "\
+ "/p:PlatformToolset=$PLATFORM_TOOLSET "\
+ "/p:Configuration=\"Release Multithreaded\" "\
+ "/p:Platform=$freetype_platform "\
+ "/p:ConfigurationType=StaticLibrary "\
+ "/p:TargetName=freetype "\
+ "/p:OutDir=\"$freetype_lib_path\" "\
+ "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
cmd /c freetype.bat
if test -s "$freetype_lib_path_unix/freetype.lib"; then
- # Once we build both, lib and dll, set freetype lib and include path appropriately
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
- POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
+ # Once we build both, lib and dll, set freetype lib and include path appropriately
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
else
- BUILD_FREETYPE=no
+ BUILD_FREETYPE=no
fi
else
BUILD_FREETYPE=no
@@ -45173,168 +48527,6 @@
fi
fi
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check builddeps
-
-
- if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
- # Source the builddeps file again, to make sure it uses the latest variables!
- . $builddepsfile
- # Look for a target and build machine specific resource!
- eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a target specific resource
- eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_freetype2}
- fi
- if test "x$resource" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
-$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
- # If the resource in the builddeps.conf file is an existing directory,
- # for example /java/linux/cups
- if test -d ${resource}; then
- depdir=${resource}
- else
-
- # freetype2 is for example mymodule
- # $resource is for example libs/general/libmymod_1_2_3.zip
- # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
- # $with_builddeps_dir is for example /localhome/builddeps
- # depdir is the name of the variable into which we store the depdir, eg MYMOD
- # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
- # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
- filename=`basename $resource`
- filebase=`echo $filename | sed 's/\.[^\.]*$//'`
- filebase=${filename%%.*}
- extension=${filename#*.}
- installdir=$with_builddeps_dir/$filebase
- if test ! -f $installdir/$filename.unpacked; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
- if test ! -d $installdir; then
- mkdir -p $installdir
- fi
- if test ! -d $installdir; then
- as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
- fi
- tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
- touch $tmpfile
- if test ! -f $tmpfile; then
- as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
- fi
-
- # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
- # $tmpfile is the local file name for the downloaded file.
- VALID_TOOL=no
- if test "x$BDEPS_FTP" = xwget; then
- VALID_TOOL=yes
- wget -O $tmpfile $with_builddeps_server/$resource
- fi
- if test "x$BDEPS_FTP" = xlftp; then
- VALID_TOOL=yes
- lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
- fi
- if test "x$BDEPS_FTP" = xftp; then
- VALID_TOOL=yes
- FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
- FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
- FTPUSERPWD=${FTPSERVER%%@*}
- if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
- FTPUSER=${userpwd%%:*}
- FTPPWD=${userpwd#*@}
- FTPSERVER=${FTPSERVER#*@}
- else
- FTPUSER=ftp
- FTPPWD=ftp
- fi
- # the "pass" command does not work on some
- # ftp clients (read ftp.exe) but if it works,
- # passive mode is better!
- ( \
- echo "user $FTPUSER $FTPPWD" ; \
- echo "pass" ; \
- echo "bin" ; \
- echo "get $FTPPATH $tmpfile" ; \
- ) | ftp -in $FTPSERVER
- fi
- if test "x$VALID_TOOL" != xyes; then
- as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
- fi
-
- mv $tmpfile $installdir/$filename
- if test ! -s $installdir/$filename; then
- as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
- fi
- case "$extension" in
- zip) echo "Unzipping $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
- ;;
- tar.gz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- tgz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
- ;;
- esac
- fi
- if test -f $installdir/$filename.unpacked; then
- depdir=$installdir
- fi
-
- fi
- # Source the builddeps file again, because in the previous command, the depdir
- # was updated to point at the current build dependency install directory.
- . $builddepsfile
- # Now extract variables from the builddeps.conf files.
- theroot=${builddep_freetype2_ROOT}
- thecflags=${builddep_freetype2_CFLAGS}
- thelibs=${builddep_freetype2_LIBS}
- if test "x$depdir" = x; then
- as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
- fi
- FREETYPE=$depdir
- if test "x$theroot" != x; then
- FREETYPE="$theroot"
- fi
- if test "x$thecflags" != x; then
- FREETYPE_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- FREETYPE_LIBS="$thelibs"
- fi
- FOUND_FREETYPE=yes
- else FOUND_FREETYPE=no
-
- fi
- else FOUND_FREETYPE=no
-
- fi
-
- # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
- if test "x$FOUND_FREETYPE" = xyes; then
- if test "x$BUNDLE_FREETYPE" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
-$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
- FOUND_FREETYPE=no
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
-$as_echo_n "checking for freetype... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
-$as_echo "yes (using builddeps)" >&6; }
- fi
- fi
- fi
-
# If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
if test "x$SYSROOT" = x; then
if test "x$FOUND_FREETYPE" != xyes; then
@@ -45414,7 +48606,7 @@
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
fi
- # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
+ # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
if test "x$BUNDLE_FREETYPE" = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
@@ -48074,7 +51266,7 @@
if test "x$FOUND_FREETYPE" != xyes; then
# Print a helpful message on how to acquire the necessary build dependency.
- # freetype is the help tag: freetype, cups, pulse, alsa etc
+ # freetype is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=freetype
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -48417,7 +51609,7 @@
# Print a helpful message on how to acquire the necessary build dependency.
- # freetype is the help tag: freetype, cups, pulse, alsa etc
+ # freetype is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=freetype
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -48478,11 +51670,6 @@
- ###############################################################################
- #
- # Check for alsa headers and libraries. Used on Linux/GNU systems.
- #
-
# Check whether --with-alsa was given.
if test "${with_alsa+set}" = set; then :
withval=$with_alsa;
@@ -48501,7 +51688,7 @@
fi
- if test "x$ALSA_NOT_NEEDED" = xyes; then
+ if test "x$NEEDS_LIB_ALSA" = xfalse; then
if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
@@ -48528,153 +51715,6 @@
ALSA_LIBS="-L${with_alsa_lib} -lasound"
ALSA_FOUND=yes
fi
- if test "x$ALSA_FOUND" = xno; then
-
-
- if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
- # Source the builddeps file again, to make sure it uses the latest variables!
- . $builddepsfile
- # Look for a target and build machine specific resource!
- eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a target specific resource
- eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The alsa comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_alsa}
- fi
- if test "x$resource" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
-$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
- # If the resource in the builddeps.conf file is an existing directory,
- # for example /java/linux/cups
- if test -d ${resource}; then
- depdir=${resource}
- else
-
- # alsa is for example mymodule
- # $resource is for example libs/general/libmymod_1_2_3.zip
- # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
- # $with_builddeps_dir is for example /localhome/builddeps
- # depdir is the name of the variable into which we store the depdir, eg MYMOD
- # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
- # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
- filename=`basename $resource`
- filebase=`echo $filename | sed 's/\.[^\.]*$//'`
- filebase=${filename%%.*}
- extension=${filename#*.}
- installdir=$with_builddeps_dir/$filebase
- if test ! -f $installdir/$filename.unpacked; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
- if test ! -d $installdir; then
- mkdir -p $installdir
- fi
- if test ! -d $installdir; then
- as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
- fi
- tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
- touch $tmpfile
- if test ! -f $tmpfile; then
- as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
- fi
-
- # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
- # $tmpfile is the local file name for the downloaded file.
- VALID_TOOL=no
- if test "x$BDEPS_FTP" = xwget; then
- VALID_TOOL=yes
- wget -O $tmpfile $with_builddeps_server/$resource
- fi
- if test "x$BDEPS_FTP" = xlftp; then
- VALID_TOOL=yes
- lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
- fi
- if test "x$BDEPS_FTP" = xftp; then
- VALID_TOOL=yes
- FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
- FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
- FTPUSERPWD=${FTPSERVER%%@*}
- if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
- FTPUSER=${userpwd%%:*}
- FTPPWD=${userpwd#*@}
- FTPSERVER=${FTPSERVER#*@}
- else
- FTPUSER=ftp
- FTPPWD=ftp
- fi
- # the "pass" command does not work on some
- # ftp clients (read ftp.exe) but if it works,
- # passive mode is better!
- ( \
- echo "user $FTPUSER $FTPPWD" ; \
- echo "pass" ; \
- echo "bin" ; \
- echo "get $FTPPATH $tmpfile" ; \
- ) | ftp -in $FTPSERVER
- fi
- if test "x$VALID_TOOL" != xyes; then
- as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
- fi
-
- mv $tmpfile $installdir/$filename
- if test ! -s $installdir/$filename; then
- as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
- fi
- case "$extension" in
- zip) echo "Unzipping $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
- ;;
- tar.gz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- tgz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
- ;;
- esac
- fi
- if test -f $installdir/$filename.unpacked; then
- depdir=$installdir
- fi
-
- fi
- # Source the builddeps file again, because in the previous command, the depdir
- # was updated to point at the current build dependency install directory.
- . $builddepsfile
- # Now extract variables from the builddeps.conf files.
- theroot=${builddep_alsa_ROOT}
- thecflags=${builddep_alsa_CFLAGS}
- thelibs=${builddep_alsa_LIBS}
- if test "x$depdir" = x; then
- as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
- fi
- ALSA=$depdir
- if test "x$theroot" != x; then
- ALSA="$theroot"
- fi
- if test "x$thecflags" != x; then
- ALSA_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- ALSA_LIBS="$thelibs"
- fi
- ALSA_FOUND=yes
- else ALSA_FOUND=no
-
- fi
- else ALSA_FOUND=no
-
- fi
-
- fi
# Do not try pkg-config if we have a sysroot set.
if test "x$SYSROOT" = x; then
if test "x$ALSA_FOUND" = xno; then
@@ -48763,6 +51803,7 @@
else
ALSA_FOUND=no
+
fi
done
@@ -48771,7 +51812,7 @@
if test "x$ALSA_FOUND" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
- # alsa is the help tag: freetype, cups, pulse, alsa etc
+ # alsa is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=alsa
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -48799,19 +51840,355 @@
fi
fi
- as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
- fi
- fi
-
-
-
-
-
-
- ###############################################################################
- #
- # Check for the jpeg library
- #
+ as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
+ fi
+ fi
+
+
+
+
+
+
+# Check whether --with-libffi was given.
+if test "${with_libffi+set}" = set; then :
+ withval=$with_libffi;
+fi
+
+
+# Check whether --with-libffi-include was given.
+if test "${with_libffi_include+set}" = set; then :
+ withval=$with_libffi_include;
+fi
+
+
+# Check whether --with-libffi-lib was given.
+if test "${with_libffi_lib+set}" = set; then :
+ withval=$with_libffi_lib;
+fi
+
+
+ if test "x$NEEDS_LIB_FFI" = xfalse; then
+ if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi is ignored" >&5
+$as_echo "$as_me: WARNING: libffi not used, so --with-libffi is ignored" >&2;}
+ fi
+ LIBFFI_CFLAGS=
+ LIBFFI_LIBS=
+ else
+ LIBFFI_FOUND=no
+
+ if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
+ as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
+ fi
+
+ if test "x${with_libffi}" != x; then
+ LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
+ LIBFFI_CFLAGS="-I${with_libffi}/include"
+ LIBFFI_FOUND=yes
+ fi
+ if test "x${with_libffi_include}" != x; then
+ LIBFFI_CFLAGS="-I${with_libffi_include}"
+ LIBFFI_FOUND=yes
+ fi
+ if test "x${with_libffi_lib}" != x; then
+ LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
+ LIBFFI_FOUND=yes
+ fi
+ # Do not try pkg-config if we have a sysroot set.
+ if test "x$SYSROOT" = x; then
+ if test "x$LIBFFI_FOUND" = xno; then
+ # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
+$as_echo_n "checking for LIBFFI... " >&6; }
+
+if test -n "$LIBFFI_CFLAGS"; then
+ pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBFFI_LIBS"; then
+ pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
+ else
+ LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBFFI_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ LIBFFI_FOUND=no
+elif test $pkg_failed = untried; then
+ LIBFFI_FOUND=no
+else
+ LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
+ LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ LIBFFI_FOUND=yes
+fi
+ fi
+ fi
+ if test "x$LIBFFI_FOUND" = xno; then
+ for ac_header in ffi.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
+if test "x$ac_cv_header_ffi_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FFI_H 1
+_ACEOF
+
+ LIBFFI_FOUND=yes
+ LIBFFI_CFLAGS=
+ LIBFFI_LIBS=-lffi
+
+else
+ LIBFFI_FOUND=no
+
+fi
+
+done
+
+ fi
+ if test "x$LIBFFI_FOUND" = xno; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # ffi is the help tag: freetype, cups, alsa etc
+ MISSING_DEPENDENCY=ffi
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ cygwin_help $MISSING_DEPENDENCY
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ msys_help $MISSING_DEPENDENCY
+ else
+ 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 ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+ fi
+
+ as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
+$as_echo_n "checking if libffi works... " >&6; }
+ 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
+
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ OLD_LIBS="$LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ffi.h>
+int
+main ()
+{
+
+ ffi_call(NULL, NULL, NULL, NULL);
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBFFI_WORKS=yes
+else
+ LIBFFI_WORKS=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$OLD_CFLAGS"
+ LIBS="$OLD_LIBS"
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
+$as_echo "$LIBFFI_WORKS" >&6; }
+
+ if test "x$LIBFFI_WORKS" = xno; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # ffi is the help tag: freetype, cups, alsa etc
+ MISSING_DEPENDENCY=ffi
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ cygwin_help $MISSING_DEPENDENCY
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ msys_help $MISSING_DEPENDENCY
+ else
+ 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 ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+ fi
+
+ as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
+ fi
+ fi
+
+
+
+
+
+ if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-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 ${ac_cv_prog_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LLVM_CONFIG"; then
+ ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LLVM_CONFIG="llvm-config"
+ $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
+LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ if test "x$LLVM_CONFIG" != xllvm-config; then
+ as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
+ fi
+
+ llvm_components="jit mcjit engine nativecodegen native"
+ unset LLVM_CFLAGS
+ for flag in $("$LLVM_CONFIG" --cxxflags); do
+ if echo "${flag}" | grep -q '^-[ID]'; then
+ if test "${flag}" != "-D_DEBUG" ; then
+ if test "${LLVM_CFLAGS}" != "" ; then
+ LLVM_CFLAGS="${LLVM_CFLAGS} "
+ fi
+ LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
+ fi
+ fi
+ done
+ llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
+ LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
+
+ unset LLVM_LDFLAGS
+ for flag in $("${LLVM_CONFIG}" --ldflags); do
+ if echo "${flag}" | grep -q '^-L'; then
+ if test "${LLVM_LDFLAGS}" != ""; then
+ LLVM_LDFLAGS="${LLVM_LDFLAGS} "
+ fi
+ LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
+ fi
+ done
+
+ unset LLVM_LIBS
+ for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
+ if echo "${flag}" | grep -q '^-l'; then
+ if test "${LLVM_LIBS}" != ""; then
+ LLVM_LIBS="${LLVM_LIBS} "
+ fi
+ LLVM_LIBS="${LLVM_LIBS}${flag}"
+ fi
+ done
+
+
+
+
+ fi
+
# Check whether --with-libjpeg was given.
@@ -48822,17 +52199,12 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
$as_echo_n "checking for which libjpeg to use... " >&6; }
-
# default is bundled
DEFAULT_LIBJPEG=bundled
-
- #
# if user didn't specify, use DEFAULT_LIBJPEG
- #
if test "x${with_libjpeg}" = "x"; then
with_libjpeg=${DEFAULT_LIBJPEG}
fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
$as_echo "${with_libjpeg}" >&6; }
@@ -48902,10 +52274,6 @@
- ###############################################################################
- #
- # Check for the gif library
- #
# Check whether --with-giflib was given.
@@ -48914,20 +52282,14 @@
fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
$as_echo_n "checking for which giflib to use... " >&6; }
-
# default is bundled
DEFAULT_GIFLIB=bundled
-
- #
# if user didn't specify, use DEFAULT_GIFLIB
- #
if test "x${with_giflib}" = "x"; then
with_giflib=${DEFAULT_GIFLIB}
fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
$as_echo "${with_giflib}" >&6; }
@@ -48996,119 +52358,7 @@
fi
- ###############################################################################
- #
- # Check for the lcms2 library
- #
-
-
-# Check whether --with-lcms was given.
-if test "${with_lcms+set}" = set; then :
- withval=$with_lcms;
-fi
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
-$as_echo_n "checking for which lcms to use... " >&6; }
-
- DEFAULT_LCMS=bundled
-
- #
- # If user didn't specify, use DEFAULT_LCMS
- #
- if test "x${with_lcms}" = "x"; then
- with_lcms=${DEFAULT_LCMS}
- fi
-
- if test "x${with_lcms}" = "xbundled"; then
- USE_EXTERNAL_LCMS=false
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
-$as_echo "bundled" >&6; }
- elif test "x${with_lcms}" = "xsystem"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
-$as_echo "system" >&6; }
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
-$as_echo_n "checking for LCMS... " >&6; }
-
-if test -n "$LCMS_CFLAGS"; then
- pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$LCMS_LIBS"; then
- pkg_cv_LCMS_LIBS="$LCMS_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
- else
- LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$LCMS_PKG_ERRORS" >&5
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- LCMS_FOUND=no
-elif test $pkg_failed = untried; then
- LCMS_FOUND=no
-else
- LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
- LCMS_LIBS=$pkg_cv_LCMS_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- LCMS_FOUND=yes
-fi
- if test "x${LCMS_FOUND}" = "xyes"; then
- USE_EXTERNAL_LCMS=true
- else
- as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
- fi
- else
- as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
- fi
-
-
-
- ###############################################################################
- #
- # Check for the png library
- #
+
# Check whether --with-libpng was given.
@@ -49117,16 +52367,12 @@
fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
$as_echo_n "checking for which libpng to use... " >&6; }
# default is bundled
DEFAULT_LIBPNG=bundled
-
- #
# if user didn't specify, use DEFAULT_LIBPNG
- #
if test "x${with_libpng}" = "x"; then
with_libpng=${DEFAULT_LIBPNG}
fi
@@ -49217,10 +52463,7 @@
fi
- ###############################################################################
- #
- # Check for the zlib library
- #
+
# Check whether --with-zlib was given.
@@ -49277,22 +52520,16 @@
DEFAULT_ZLIB=bundled
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- #
- # On macosx default is system...on others default is
- #
+ # On macosx default is system...on others default is bundled
DEFAULT_ZLIB=system
fi
if test "x${ZLIB_FOUND}" != "xyes"; then
- #
# If we don't find any system...set default to bundled
- #
DEFAULT_ZLIB=bundled
fi
- #
# If user didn't specify, use DEFAULT_ZLIB
- #
if test "x${with_zlib}" = "x"; then
with_zlib=${DEFAULT_ZLIB}
fi
@@ -49317,45 +52554,117 @@
- ###############################################################################
- LIBZIP_CAN_USE_MMAP=true
-
-
-
- ###############################################################################
- #
- # Check if altzone exists in time.h
- #
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <time.h>
-int
-main ()
-{
-return (int)altzone;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- has_altzone=yes
-else
- has_altzone=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "x$has_altzone" = xyes; then
-
-$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
-
- fi
-
- ###############################################################################
- #
- # Check the maths library
- #
-
+
+
+# Check whether --with-lcms was given.
+if test "${with_lcms+set}" = set; then :
+ withval=$with_lcms;
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
+$as_echo_n "checking for which lcms to use... " >&6; }
+
+ DEFAULT_LCMS=bundled
+ # If user didn't specify, use DEFAULT_LCMS
+ if test "x${with_lcms}" = "x"; then
+ with_lcms=${DEFAULT_LCMS}
+ fi
+
+ if test "x${with_lcms}" = "xbundled"; then
+ USE_EXTERNAL_LCMS=false
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
+$as_echo "bundled" >&6; }
+ elif test "x${with_lcms}" = "xsystem"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
+$as_echo "system" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
+$as_echo_n "checking for LCMS... " >&6; }
+
+if test -n "$LCMS_CFLAGS"; then
+ pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LCMS_LIBS"; then
+ pkg_cv_LCMS_LIBS="$LCMS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
+ else
+ LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LCMS_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ LCMS_FOUND=no
+elif test $pkg_failed = untried; then
+ LCMS_FOUND=no
+else
+ LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
+ LCMS_LIBS=$pkg_cv_LCMS_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ LCMS_FOUND=yes
+fi
+ if test "x${LCMS_FOUND}" = "xyes"; then
+ USE_EXTERNAL_LCMS=true
+ else
+ as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
+ fi
+ else
+ as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ # Setup libm (the maths library)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
$as_echo_n "checking for cos in -lm... " >&6; }
if ${ac_cv_lib_m_cos+:} false; then :
@@ -49401,18 +52710,15 @@
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
$as_echo "$as_me: Maths library was not found" >&6;}
-
-fi
-
-
-
- ###############################################################################
- #
- # Check for libdl.so
-
+fi
+
+ LIBM=-lm
+
+
+ # Setup libdl (for dynamic library loading)
save_LIBS="$LIBS"
LIBS=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
@@ -49464,2947 +52770,10 @@
LIBS="$save_LIBS"
-
- ###############################################################################
- #
- # statically link libstdc++ before C++ ABI is stablized on Linux unless
- # dynamic build is configured on command line.
- #
-
-# Check whether --with-stdc++lib was given.
-if test "${with_stdc__lib+set}" = set; then :
- withval=$with_stdc__lib;
- if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
- && test "x$with_stdc__lib" != xdefault; then
- as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
- fi
-
-else
- with_stdc__lib=default
-
-fi
-
-
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
- # Test if -lstdc++ works.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
-$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- OLD_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -lstdc++"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- has_dynamic_libstdcxx=yes
-else
- has_dynamic_libstdcxx=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- CXXFLAGS="$OLD_CXXFLAGS"
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
-$as_echo "$has_dynamic_libstdcxx" >&6; }
-
- # Test if stdc++ can be linked statically.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
-$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
- STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- OLD_LIBS="$LIBS"
- OLD_CXX="$CXX"
- LIBS="$STATIC_STDCXX_FLAGS"
- CXX="$CC"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- has_static_libstdcxx=yes
-else
- has_static_libstdcxx=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LIBS="$OLD_LIBS"
- CXX="$OLD_CXX"
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
-$as_echo "$has_static_libstdcxx" >&6; }
-
- if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
- as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
- fi
-
- if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
- as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
- fi
-
- if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
- as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
-$as_echo_n "checking how to link with libstdc++... " >&6; }
- # If dynamic was requested, it's available since it would fail above otherwise.
- # If dynamic wasn't requested, go with static unless it isn't available.
- if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- 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; }
- else
- 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; }
- fi
- fi
-
-
- if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
-$as_echo_n "checking for LIBFFI... " >&6; }
-
-if test -n "$LIBFFI_CFLAGS"; then
- pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$LIBFFI_LIBS"; then
- pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
- else
- LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$LIBFFI_PKG_ERRORS" >&5
-
- as_fn_error $? "Package requirements (libffi) were not met:
-
-$LIBFFI_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables LIBFFI_CFLAGS
-and LIBFFI_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables LIBFFI_CFLAGS
-and LIBFFI_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
- LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
- LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- :
-fi
-
- fi
-
- if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- # Extract the first word of "llvm-config", so it can be a program name with args.
-set dummy llvm-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 ${ac_cv_prog_LLVM_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$LLVM_CONFIG"; then
- ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LLVM_CONFIG="llvm-config"
- $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
-LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
-if test -n "$LLVM_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
-$as_echo "$LLVM_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- if test "x$LLVM_CONFIG" != xllvm-config; then
- as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
- fi
-
- llvm_components="jit mcjit engine nativecodegen native"
- unset LLVM_CFLAGS
- for flag in $("$LLVM_CONFIG" --cxxflags); do
- if echo "${flag}" | grep -q '^-[ID]'; then
- if test "${flag}" != "-D_DEBUG" ; then
- if test "${LLVM_CFLAGS}" != "" ; then
- LLVM_CFLAGS="${LLVM_CFLAGS} "
- fi
- LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
- fi
- fi
- done
- llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
- LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
-
- unset LLVM_LDFLAGS
- for flag in $("${LLVM_CONFIG}" --ldflags); do
- if echo "${flag}" | grep -q '^-L'; then
- if test "${LLVM_LDFLAGS}" != ""; then
- LLVM_LDFLAGS="${LLVM_LDFLAGS} "
- fi
- LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
- fi
- done
-
- unset LLVM_LIBS
- for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
- if echo "${flag}" | grep -q '^-l'; then
- if test "${LLVM_LIBS}" != ""; then
- LLVM_LIBS="${LLVM_LIBS} "
- fi
- LLVM_LIBS="${LLVM_LIBS}${flag}"
- fi
- done
-
-
-
-
- fi
-
- # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
- if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
- LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
- fi
-
- # TODO better (platform agnostic) test
- if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
- LIBCXX="-lstdc++"
- fi
-
-
-
-
+ # Deprecated libraries, keep the flags for backwards compatibility
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-# 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
- # If given explicitely by user, do not probe. If not present, fail directly.
-
- DLL_NAME="$MSVCR_NAME"
- POSSIBLE_MSVC_DLL="$with_msvcr_dll"
- METHOD="--with-msvcr-dll"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
- fi
- MSVCR_DLL="$MSVC_DLL"
- elif test "x$DEVKIT_MSVCR_DLL" != x; then
-
- DLL_NAME="$MSVCR_NAME"
- POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
- METHOD="devkit"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
- fi
- MSVCR_DLL="$MSVC_DLL"
- else
-
- DLL_NAME="${MSVCR_NAME}"
- MSVC_DLL=
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Using well-known location from Visual Studio 10.0
- if test "x$VCINSTALLDIR" != x; then
- CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
-
- windows_path="$CYGWIN_VC_INSTALL_DIR"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- CYGWIN_VC_INSTALL_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'`
- CYGWIN_VC_INSTALL_DIR="$unix_path"
- fi
-
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
- else
- POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
- fi
- $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="well-known location in VCINSTALLDIR"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Check in the Boot JDK directory.
- POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="well-known location in Boot JDK"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Look in the Windows system32 directory
- CYGWIN_SYSTEMROOT="$SYSTEMROOT"
-
- windows_path="$CYGWIN_SYSTEMROOT"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- CYGWIN_SYSTEMROOT="$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'`
- CYGWIN_SYSTEMROOT="$unix_path"
- fi
-
- POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="well-known location in SYSTEMROOT"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: If Visual Studio Express is installed, there is usually one with the debugger
- if test "x$VS100COMNTOOLS" != x; then
- CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
-
- windows_path="$CYGWIN_VS_TOOLS_DIR"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- CYGWIN_VS_TOOLS_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'`
- CYGWIN_VS_TOOLS_DIR="$unix_path"
- fi
-
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
- | $GREP -i /x64/ | $HEAD --lines 1`
- else
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
- | $GREP -i /x86/ | $HEAD --lines 1`
- fi
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="search of VS100COMNTOOLS"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
- # (This was the original behaviour; kept since it might turn something up)
- if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $GREP x64 | $HEAD --lines 1`
- else
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
- if test "x$POSSIBLE_MSVC_DLL" = x; then
- # We're grasping at straws now...
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $HEAD --lines 1`
- fi
- fi
-
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="search of VCINSTALLDIR"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
- fi
-
- MSVCR_DLL="$MSVC_DLL"
- fi
-
-
-
-# Check whether --with-msvcp-dll was given.
-if test "${with_msvcp_dll+set}" = set; then :
- withval=$with_msvcp_dll;
-fi
-
-
- if test "x$MSVCP_NAME" != "x"; then
- if test "x$with_msvcp_dll" != x; then
- # If given explicitely by user, do not probe. If not present, fail directly.
-
- DLL_NAME="$MSVCP_NAME"
- POSSIBLE_MSVC_DLL="$with_msvcp_dll"
- METHOD="--with-msvcp-dll"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
- fi
- MSVCP_DLL="$MSVC_DLL"
- elif test "x$DEVKIT_MSVCP_DLL" != x; then
-
- DLL_NAME="$MSVCP_NAME"
- POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
- METHOD="devkit"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
- fi
- MSVCP_DLL="$MSVC_DLL"
- else
-
- DLL_NAME="${MSVCP_NAME}"
- MSVC_DLL=
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Using well-known location from Visual Studio 10.0
- if test "x$VCINSTALLDIR" != x; then
- CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
-
- windows_path="$CYGWIN_VC_INSTALL_DIR"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- CYGWIN_VC_INSTALL_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'`
- CYGWIN_VC_INSTALL_DIR="$unix_path"
- fi
-
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
- else
- POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
- fi
- $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="well-known location in VCINSTALLDIR"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Check in the Boot JDK directory.
- POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="well-known location in Boot JDK"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Look in the Windows system32 directory
- CYGWIN_SYSTEMROOT="$SYSTEMROOT"
-
- windows_path="$CYGWIN_SYSTEMROOT"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- CYGWIN_SYSTEMROOT="$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'`
- CYGWIN_SYSTEMROOT="$unix_path"
- fi
-
- POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="well-known location in SYSTEMROOT"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: If Visual Studio Express is installed, there is usually one with the debugger
- if test "x$VS100COMNTOOLS" != x; then
- CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
-
- windows_path="$CYGWIN_VS_TOOLS_DIR"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- CYGWIN_VS_TOOLS_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'`
- CYGWIN_VS_TOOLS_DIR="$unix_path"
- fi
-
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
- | $GREP -i /x64/ | $HEAD --lines 1`
- else
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
- | $GREP -i /x86/ | $HEAD --lines 1`
- fi
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="search of VS100COMNTOOLS"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
- # (This was the original behaviour; kept since it might turn something up)
- if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $GREP x64 | $HEAD --lines 1`
- else
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
- if test "x$POSSIBLE_MSVC_DLL" = x; then
- # We're grasping at straws now...
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $HEAD --lines 1`
- fi
- fi
-
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
- METHOD="search of VCINSTALLDIR"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
-$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
-
- # Need to check if the found msvcr is correct architecture
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
-$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH=386
- else
- CORRECT_MSVCR_ARCH=x86-64
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
-
- # Only process if variable expands to non-empty
-
- if test "x$MSVC_DLL" != x; then
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$MSVC_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 MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVC_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-style (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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$MSVC_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
- MSVC_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVC_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 unix platform. Hooray! :)
- path="$MSVC_DLL"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
- fi
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
- fi
-
- MSVCP_DLL="$MSVC_DLL"
- fi
-
- fi
-
-
-
# Check whether --with-dxsdk was given.
if test "${with_dxsdk+set}" = set; then :
withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
@@ -52432,6 +52801,21 @@
fi
+ # Control if libzip can use mmap. Available for purposes of overriding.
+ LIBZIP_CAN_USE_MMAP=true
+
+
+
+
+
+
+
+
+
+
+
+
+
###############################################################################
#
@@ -52984,7 +53368,7 @@
# Publish this variable in the help.
- if test "x$CCACHE" = x; then
+ if [ -z "${CCACHE+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in ccache
do
@@ -53097,14 +53481,23 @@
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
- # Check if the provided tool contains a complete path.
- tool_specified="$CCACHE"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
+ # Check if we try to supply an empty value
+ if test "x$CCACHE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
+$as_echo_n "checking for CCACHE... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+ else
+ # Check if the provided tool contains a complete path.
+ tool_specified="$CCACHE"
+ tool_basename="${tool_specified##*/}"
+ if test "x$tool_basename" = "x$tool_specified"; then
+ # A command without a complete path is provided, search $PATH.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
- # Extract the first word of "$tool_basename", so it can be a program name with args.
+ # Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -53144,22 +53537,23 @@
fi
- if test "x$CCACHE" = x; then
- as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
- fi
- else
- # Otherwise we believe it is a complete path. Use it as it is.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
+ if test "x$CCACHE" = x; then
+ as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
$as_echo_n "checking for CCACHE... " >&6; }
- if test ! -x "$tool_specified"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
- as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
-$as_echo "$tool_specified" >&6; }
+ if test ! -x "$tool_specified"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+ as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+ fi
fi
fi
fi
--- a/common/autoconf/help.m4 Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/help.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, 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
@@ -31,7 +31,7 @@
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
[
# Print a helpful message on how to acquire the necessary build dependency.
- # $1 is the help tag: freetype, cups, pulse, alsa etc
+ # $1 is the help tag: freetype, cups, alsa etc
MISSING_DEPENDENCY=$1
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -97,6 +97,8 @@
apt_help() {
case $1 in
+ reduced)
+ PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
devkit)
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
openjdk)
@@ -107,8 +109,8 @@
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
freetype)
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
- pulse)
- PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
+ ffi)
+ PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
x11)
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ccache)
@@ -128,8 +130,6 @@
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
freetype)
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
- pulse)
- PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11)
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
ccache)
--- a/common/autoconf/hotspot-spec.gmk.in Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/hotspot-spec.gmk.in Mon Oct 12 14:41:36 2015 -0700
@@ -48,8 +48,8 @@
# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
# compiler that produces code that can be run on the build platform.
-HOSTCC:=@FIXPATH@ @BUILD_CC@
-HOSTCXX:=@FIXPATH@ @BUILD_CXX@
+HOSTCC:=@FIXPATH@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS)
+HOSTCXX:=@FIXPATH@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS)
####################################################
#
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-alsa.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,90 @@
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup alsa (Advanced Linux Sound Architecture)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_ALSA],
+[
+ AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
+ [specify prefix directory for the alsa package
+ (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+ AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
+ [specify directory for the alsa include files])])
+ AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
+ [specify directory for the alsa library])])
+
+ if test "x$NEEDS_LIB_ALSA" = xfalse; then
+ if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
+ AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
+ fi
+ ALSA_CFLAGS=
+ ALSA_LIBS=
+ else
+ ALSA_FOUND=no
+
+ if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
+ AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
+ fi
+
+ if test "x${with_alsa}" != x; then
+ ALSA_LIBS="-L${with_alsa}/lib -lasound"
+ ALSA_CFLAGS="-I${with_alsa}/include"
+ ALSA_FOUND=yes
+ fi
+ if test "x${with_alsa_include}" != x; then
+ ALSA_CFLAGS="-I${with_alsa_include}"
+ ALSA_FOUND=yes
+ fi
+ if test "x${with_alsa_lib}" != x; then
+ ALSA_LIBS="-L${with_alsa_lib} -lasound"
+ ALSA_FOUND=yes
+ fi
+ # Do not try pkg-config if we have a sysroot set.
+ if test "x$SYSROOT" = x; then
+ if test "x$ALSA_FOUND" = xno; then
+ PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
+ fi
+ fi
+ if test "x$ALSA_FOUND" = xno; then
+ AC_CHECK_HEADERS([alsa/asoundlib.h],
+ [
+ ALSA_FOUND=yes
+ ALSA_CFLAGS=-Iignoreme
+ ALSA_LIBS=-lasound
+ DEFAULT_ALSA=yes
+ ],
+ [ALSA_FOUND=no]
+ )
+ fi
+ if test "x$ALSA_FOUND" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([alsa])
+ AC_MSG_ERROR([Could not find alsa! $HELP_MSG])
+ fi
+ fi
+
+ AC_SUBST(ALSA_CFLAGS)
+ AC_SUBST(ALSA_LIBS)
+])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-bundled.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,226 @@
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup bundled libraries.
+#
+# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
+# OpenJDK repository. Default is to use these libraries as bundled, but they
+# might be replaced by en external version by the user.
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS],
+[
+ LIB_SETUP_LIBJPEG
+ LIB_SETUP_GIFLIB
+ LIB_SETUP_LIBPNG
+ LIB_SETUP_ZLIB
+ LIB_SETUP_LCMS
+])
+
+################################################################################
+# Setup libjpeg
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
+[
+ AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
+ [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+ AC_MSG_CHECKING([for which libjpeg to use])
+ # default is bundled
+ DEFAULT_LIBJPEG=bundled
+ # if user didn't specify, use DEFAULT_LIBJPEG
+ if test "x${with_libjpeg}" = "x"; then
+ with_libjpeg=${DEFAULT_LIBJPEG}
+ fi
+ AC_MSG_RESULT(${with_libjpeg})
+
+ if test "x${with_libjpeg}" = "xbundled"; then
+ USE_EXTERNAL_LIBJPEG=false
+ elif test "x${with_libjpeg}" = "xsystem"; then
+ AC_CHECK_HEADER(jpeglib.h, [],
+ [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
+ AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
+ [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
+
+ USE_EXTERNAL_LIBJPEG=true
+ else
+ AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
+ fi
+
+ AC_SUBST(USE_EXTERNAL_LIBJPEG)
+])
+
+################################################################################
+# Setup giflib
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
+[
+ AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
+ [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+ AC_MSG_CHECKING([for which giflib to use])
+ # default is bundled
+ DEFAULT_GIFLIB=bundled
+ # if user didn't specify, use DEFAULT_GIFLIB
+ if test "x${with_giflib}" = "x"; then
+ with_giflib=${DEFAULT_GIFLIB}
+ fi
+ AC_MSG_RESULT(${with_giflib})
+
+ if test "x${with_giflib}" = "xbundled"; then
+ USE_EXTERNAL_LIBGIF=false
+ elif test "x${with_giflib}" = "xsystem"; then
+ AC_CHECK_HEADER(gif_lib.h, [],
+ [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
+ AC_CHECK_LIB(gif, DGifGetCode, [],
+ [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
+
+ USE_EXTERNAL_LIBGIF=true
+ else
+ AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
+ fi
+
+ AC_SUBST(USE_EXTERNAL_LIBGIF)
+])
+
+################################################################################
+# Setup libpng
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LIBPNG],
+[
+ AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng],
+ [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+ AC_MSG_CHECKING([for which libpng to use])
+
+ # default is bundled
+ DEFAULT_LIBPNG=bundled
+ # if user didn't specify, use DEFAULT_LIBPNG
+ if test "x${with_libpng}" = "x"; then
+ with_libpng=${DEFAULT_LIBPNG}
+ fi
+
+ if test "x${with_libpng}" = "xbundled"; then
+ USE_EXTERNAL_LIBPNG=false
+ AC_MSG_RESULT([bundled])
+ elif test "x${with_libpng}" = "xsystem"; then
+ PKG_CHECK_MODULES(PNG, libpng,
+ [ LIBPNG_FOUND=yes ],
+ [ LIBPNG_FOUND=no ])
+ if test "x${LIBPNG_FOUND}" = "xyes"; then
+ USE_EXTERNAL_LIBPNG=true
+ AC_MSG_RESULT([system])
+ else
+ AC_MSG_RESULT([system not found])
+ AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
+ fi
+ else
+ AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
+ fi
+
+ AC_SUBST(USE_EXTERNAL_LIBPNG)
+])
+
+################################################################################
+# Setup zlib
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
+[
+ AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
+ [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+ AC_CHECK_LIB(z, compress,
+ [ ZLIB_FOUND=yes ],
+ [ ZLIB_FOUND=no ])
+
+ AC_MSG_CHECKING([for which zlib to use])
+
+ DEFAULT_ZLIB=bundled
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # On macosx default is system...on others default is bundled
+ DEFAULT_ZLIB=system
+ fi
+
+ if test "x${ZLIB_FOUND}" != "xyes"; then
+ # If we don't find any system...set default to bundled
+ DEFAULT_ZLIB=bundled
+ fi
+
+ # If user didn't specify, use DEFAULT_ZLIB
+ if test "x${with_zlib}" = "x"; then
+ with_zlib=${DEFAULT_ZLIB}
+ fi
+
+ if test "x${with_zlib}" = "xbundled"; then
+ USE_EXTERNAL_LIBZ=false
+ AC_MSG_RESULT([bundled])
+ elif test "x${with_zlib}" = "xsystem"; then
+ if test "x${ZLIB_FOUND}" = "xyes"; then
+ USE_EXTERNAL_LIBZ=true
+ AC_MSG_RESULT([system])
+ else
+ AC_MSG_RESULT([system not found])
+ AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])
+ fi
+ else
+ AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
+ fi
+
+ AC_SUBST(USE_EXTERNAL_LIBZ)
+])
+
+################################################################################
+# Setup lcms (Little CMS)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LCMS],
+[
+ AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms],
+ [use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
+
+ AC_MSG_CHECKING([for which lcms to use])
+
+ DEFAULT_LCMS=bundled
+ # If user didn't specify, use DEFAULT_LCMS
+ if test "x${with_lcms}" = "x"; then
+ with_lcms=${DEFAULT_LCMS}
+ fi
+
+ if test "x${with_lcms}" = "xbundled"; then
+ USE_EXTERNAL_LCMS=false
+ AC_MSG_RESULT([bundled])
+ elif test "x${with_lcms}" = "xsystem"; then
+ AC_MSG_RESULT([system])
+ PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no])
+ if test "x${LCMS_FOUND}" = "xyes"; then
+ USE_EXTERNAL_LCMS=true
+ else
+ AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
+ fi
+ else
+ AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
+ fi
+
+ AC_SUBST(USE_EXTERNAL_LCMS)
+])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-cups.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,87 @@
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup cups (Common Unix Printing System)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_CUPS],
+[
+ AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
+ [specify prefix directory for the cups package
+ (expecting the headers under PATH/include)])])
+ AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
+ [specify directory for the cups include files])])
+
+ if test "x$NEEDS_LIB_CUPS" = xfalse; then
+ if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
+ AC_MSG_WARN([cups not used, so --with-cups is ignored])
+ fi
+ CUPS_CFLAGS=
+ else
+ CUPS_FOUND=no
+
+ if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
+ AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
+ fi
+
+ if test "x${with_cups}" != x; then
+ CUPS_CFLAGS="-I${with_cups}/include"
+ CUPS_FOUND=yes
+ fi
+ if test "x${with_cups_include}" != x; then
+ CUPS_CFLAGS="-I${with_cups_include}"
+ CUPS_FOUND=yes
+ fi
+ if test "x$CUPS_FOUND" = xno; then
+ # Are the cups headers installed in the default /usr/include location?
+ AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], [
+ CUPS_FOUND=yes
+ CUPS_CFLAGS=
+ DEFAULT_CUPS=yes
+ ])
+ fi
+ if test "x$CUPS_FOUND" = xno; then
+ # Getting nervous now? Lets poke around for standard Solaris third-party
+ # package installation locations.
+ AC_MSG_CHECKING([for cups headers])
+ if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
+ # An SFW package seems to be installed!
+ CUPS_FOUND=yes
+ CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
+ elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
+ # A CSW package seems to be installed!
+ CUPS_FOUND=yes
+ CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
+ fi
+ AC_MSG_RESULT([$CUPS_FOUND])
+ fi
+ if test "x$CUPS_FOUND" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([cups])
+ AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
+ fi
+ fi
+
+ AC_SUBST(CUPS_CFLAGS)
+])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-ffi.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,114 @@
+#
+# Copyright (c) 2015, 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.
+#
+
+################################################################################
+# Setup libffi (Foreign Function Interface)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
+[
+ AC_ARG_WITH(libffi, [AS_HELP_STRING([--with-libffi],
+ [specify prefix directory for the libffi package
+ (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+ AC_ARG_WITH(libffi-include, [AS_HELP_STRING([--with-libffi-include],
+ [specify directory for the libffi include files])])
+ AC_ARG_WITH(libffi-lib, [AS_HELP_STRING([--with-libffi-lib],
+ [specify directory for the libffi library])])
+
+ if test "x$NEEDS_LIB_FFI" = xfalse; then
+ if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
+ AC_MSG_WARN([libffi not used, so --with-libffi is ignored])
+ fi
+ LIBFFI_CFLAGS=
+ LIBFFI_LIBS=
+ else
+ LIBFFI_FOUND=no
+
+ if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
+ AC_MSG_ERROR([It is not possible to disable the use of libffi. Remove the --without-libffi option.])
+ fi
+
+ if test "x${with_libffi}" != x; then
+ LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
+ LIBFFI_CFLAGS="-I${with_libffi}/include"
+ LIBFFI_FOUND=yes
+ fi
+ if test "x${with_libffi_include}" != x; then
+ LIBFFI_CFLAGS="-I${with_libffi_include}"
+ LIBFFI_FOUND=yes
+ fi
+ if test "x${with_libffi_lib}" != x; then
+ LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
+ LIBFFI_FOUND=yes
+ fi
+ # Do not try pkg-config if we have a sysroot set.
+ if test "x$SYSROOT" = x; then
+ if test "x$LIBFFI_FOUND" = xno; then
+ # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
+ PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no])
+ fi
+ fi
+ if test "x$LIBFFI_FOUND" = xno; then
+ AC_CHECK_HEADERS([ffi.h],
+ [
+ LIBFFI_FOUND=yes
+ LIBFFI_CFLAGS=
+ LIBFFI_LIBS=-lffi
+ ],
+ [LIBFFI_FOUND=no]
+ )
+ fi
+ if test "x$LIBFFI_FOUND" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([ffi])
+ AC_MSG_ERROR([Could not find libffi! $HELP_MSG])
+ fi
+
+ AC_MSG_CHECKING([if libffi works])
+ AC_LANG_PUSH(C)
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
+ OLD_LIBS="$LIBS"
+ LIBS="$LIBS $LIBFFI_LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ffi.h>],
+ [
+ ffi_call(NULL, NULL, NULL, NULL);
+ return 0;
+ ])],
+ [LIBFFI_WORKS=yes],
+ [LIBFFI_WORKS=no]
+ )
+ CFLAGS="$OLD_CFLAGS"
+ LIBS="$OLD_LIBS"
+ AC_LANG_POP(C)
+ AC_MSG_RESULT([$LIBFFI_WORKS])
+
+ if test "x$LIBFFI_WORKS" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([ffi])
+ AC_MSG_ERROR([Found libffi but could not link and compile with it. $HELP_MSG])
+ fi
+ fi
+
+ AC_SUBST(LIBFFI_CFLAGS)
+ AC_SUBST(LIBFFI_LIBS)
+])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-freetype.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,420 @@
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Build the freetype lib from source
+################################################################################
+AC_DEFUN([LIB_BUILD_FREETYPE],
+[
+ FREETYPE_SRC_PATH="$1"
+ BUILD_FREETYPE=yes
+
+ # Check if the freetype sources are acessible..
+ if ! test -d $FREETYPE_SRC_PATH; then
+ AC_MSG_WARN([--with-freetype-src specified, but can not find path "$FREETYPE_SRC_PATH" - ignoring --with-freetype-src])
+ BUILD_FREETYPE=no
+ fi
+ # ..and contain a vc2010 project file
+ vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
+ if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
+ AC_MSG_WARN([Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src])
+ BUILD_FREETYPE=no
+ fi
+ # Now check if configure found a version of 'msbuild.exe'
+ if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
+ AC_MSG_WARN([Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
+ BUILD_FREETYPE=no
+ fi
+
+ # Ready to go..
+ if test "x$BUILD_FREETYPE" = xyes; then
+ # msbuild requires trailing slashes for output directories
+ freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
+ freetype_lib_path_unix="$freetype_lib_path"
+ freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
+ BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(vcxproj_path)
+ BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_lib_path)
+ BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_obj_path)
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ freetype_platform=x64
+ else
+ freetype_platform=win32
+ fi
+
+ # The original freetype project file is for VS 2010 (i.e. 'v100'),
+ # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
+ # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
+ # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
+ AC_MSG_NOTICE([Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ...])
+
+ # First we try to build the freetype.dll
+ $ECHO -e "@echo off\n"\
+ "$MSBUILD $vcxproj_path "\
+ "/p:PlatformToolset=$PLATFORM_TOOLSET "\
+ "/p:Configuration=\"Release Multithreaded\" "\
+ "/p:Platform=$freetype_platform "\
+ "/p:ConfigurationType=DynamicLibrary "\
+ "/p:TargetName=freetype "\
+ "/p:OutDir=\"$freetype_lib_path\" "\
+ "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
+ cmd /c freetype.bat
+
+ if test -s "$freetype_lib_path_unix/freetype.dll"; then
+ # If that succeeds we also build freetype.lib
+ $ECHO -e "@echo off\n"\
+ "$MSBUILD $vcxproj_path "\
+ "/p:PlatformToolset=$PLATFORM_TOOLSET "\
+ "/p:Configuration=\"Release Multithreaded\" "\
+ "/p:Platform=$freetype_platform "\
+ "/p:ConfigurationType=StaticLibrary "\
+ "/p:TargetName=freetype "\
+ "/p:OutDir=\"$freetype_lib_path\" "\
+ "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
+ cmd /c freetype.bat
+
+ if test -s "$freetype_lib_path_unix/freetype.lib"; then
+ # Once we build both, lib and dll, set freetype lib and include path appropriately
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
+ AC_MSG_NOTICE([Compiling freetype sources succeeded! (see freetype.log for build results)])
+ else
+ BUILD_FREETYPE=no
+ fi
+ else
+ BUILD_FREETYPE=no
+ fi
+ fi
+])
+
+################################################################################
+# Check if a potential freeype library match is correct and usable
+################################################################################
+AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
+[
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$1"
+ POTENTIAL_FREETYPE_LIB_PATH="$2"
+ METHOD="$3"
+
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # Include file found, let's continue the sanity check.
+ AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
+
+ # Reset to default value
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ if test "x$OPENJDK_TARGET_OS" = xmacosx \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
+ # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
+ # for the .6 version explicitly.
+ FREETYPE_BASE_NAME=freetype.6
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ AC_MSG_NOTICE([Compensating for missing symlink by using version 6 explicitly])
+ else
+ AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
+ FOUND_FREETYPE=no
+ fi
+ else
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # On Windows, we will need both .lib and .dll file.
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
+ AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location.])
+ FOUND_FREETYPE=no
+ fi
+ elif test "x$OPENJDK_TARGET_OS" = xsolaris \
+ && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
+ # Found lib in isa dir, use that instead.
+ POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
+ AC_MSG_NOTICE([Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead])
+ fi
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = xyes; then
+ BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH)
+ BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH)
+
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ AC_MSG_CHECKING([for freetype includes])
+ AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH])
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ AC_MSG_CHECKING([for freetype libraries])
+ AC_MSG_RESULT([$FREETYPE_LIB_PATH])
+ fi
+])
+
+################################################################################
+# Setup freetype (The FreeType2 font rendering library)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
+[
+ AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
+ [specify prefix directory for the freetype package
+ (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+ AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
+ [specify directory for the freetype include files])])
+ AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
+ [specify directory for the freetype library])])
+ AC_ARG_WITH(freetype-src, [AS_HELP_STRING([--with-freetype-src],
+ [specify directory with freetype sources to automatically build the library (experimental, Windows-only)])])
+ AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
+ [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
+
+ # Need to specify explicitly since it needs to be overridden on some versions of macosx
+ FREETYPE_BASE_NAME=freetype
+ FREETYPE_CFLAGS=
+ FREETYPE_LIBS=
+ FREETYPE_BUNDLE_LIB_PATH=
+
+ if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
+ if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
+ AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
+ fi
+ if test "x$enable_freetype_bundling" != x; then
+ AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
+ fi
+ else
+ # freetype is needed to build; go get it!
+
+ BUNDLE_FREETYPE="$enable_freetype_bundling"
+
+ if test "x$with_freetype_src" != x; then
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # Try to build freetype if --with-freetype-src was given on Windows
+ LIB_BUILD_FREETYPE([$with_freetype_src])
+ if test "x$BUILD_FREETYPE" = xyes; then
+ # Okay, we built it. Check that it works.
+ LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype-src])
+ if test "x$FOUND_FREETYPE" != xyes; then
+ AC_MSG_ERROR([Can not use the built freetype at location given by --with-freetype-src])
+ fi
+ else
+ AC_MSG_NOTICE([User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)])
+ AC_MSG_ERROR([Consider building freetype manually and using --with-freetype instead.])
+ fi
+ else
+ AC_MSG_WARN([--with-freetype-src is currently only supported on Windows - ignoring])
+ fi
+ fi
+
+ if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
+ # User has specified settings
+
+ if test "x$BUNDLE_FREETYPE" = x; then
+ # If not specified, default is to bundle freetype
+ BUNDLE_FREETYPE=yes
+ fi
+
+ if test "x$with_freetype" != x; then
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
+ fi
+
+ # Allow --with-freetype-lib and --with-freetype-include to override
+ if test "x$with_freetype_include" != x; then
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
+ fi
+ if test "x$with_freetype_lib" != x; then
+ POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
+ fi
+
+ if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
+ # Okay, we got it. Check that it works.
+ LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
+ if test "x$FOUND_FREETYPE" != xyes; then
+ AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype])
+ fi
+ else
+ # User specified only one of lib or include. This is an error.
+ if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
+ AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include])
+ AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
+ else
+ AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib])
+ AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
+ fi
+ fi
+ else
+ # User did not specify settings, but we need freetype. Try to locate it.
+
+ if test "x$BUNDLE_FREETYPE" = x; then
+ # If not specified, default is to bundle freetype only on windows
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ BUNDLE_FREETYPE=yes
+ else
+ BUNDLE_FREETYPE=no
+ fi
+ fi
+
+ # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
+ if test "x$SYSROOT" = x; then
+ if test "x$FOUND_FREETYPE" != xyes; then
+ # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
+ if test "x$PKG_CONFIG" != x; then
+ PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
+ if test "x$FOUND_FREETYPE" = xyes; then
+ # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
+ FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
+ # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
+ if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
+ fi
+ # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
+ if test "x$BUNDLE_FREETYPE" = xyes; then
+ AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
+ FOUND_FREETYPE=no
+ else
+ AC_MSG_CHECKING([for freetype])
+ AC_MSG_RESULT([yes (using pkg-config)])
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" != xyes; then
+ # Check in well-known locations
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
+ BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+ if test "x$FOUND_FREETYPE" != xyes; then
+ FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
+ BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+ fi
+ else
+ FREETYPE_BASE_DIR="$SYSROOT/usr"
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+
+ if test "x$FOUND_FREETYPE" != xyes; then
+ FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+ fi
+
+ if test "x$FOUND_FREETYPE" != xyes; then
+ FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+ fi
+
+ if test "x$FOUND_FREETYPE" != xyes; then
+ FREETYPE_BASE_DIR="$SYSROOT/usr"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
+ else
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
+ if test "x$FOUND_FREETYPE" != xyes; then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
+ fi
+ fi
+ fi
+ fi
+ fi # end check in well-known locations
+
+ if test "x$FOUND_FREETYPE" != xyes; then
+ HELP_MSG_MISSING_DEPENDENCY([freetype])
+ AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
+ fi
+ fi # end user specified settings
+
+ # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
+ if test "x$FREETYPE_CFLAGS" = x; then
+ BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH)
+ if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
+ FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
+ else
+ FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
+ fi
+ fi
+
+ if test "x$FREETYPE_LIBS" = x; then
+ BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
+ else
+ FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
+ fi
+ fi
+
+ # Try to compile it
+ AC_MSG_CHECKING([if we can compile and link with freetype])
+ AC_LANG_PUSH(C++)
+ PREV_CXXCFLAGS="$CXXFLAGS"
+ PREV_LIBS="$LIBS"
+ PREV_CXX="$CXX"
+ CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
+ LIBS="$LIBS $FREETYPE_LIBS"
+ CXX="$FIXPATH $CXX"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
+ #include<ft2build.h>
+ #include FT_FREETYPE_H
+ int main () {
+ FT_Init_FreeType(NULL);
+ return 0;
+ }
+ ]])],
+ [
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.])
+ AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS])
+
+ HELP_MSG_MISSING_DEPENDENCY([freetype])
+
+ AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG])
+ ]
+ )
+ CXXCFLAGS="$PREV_CXXFLAGS"
+ LIBS="$PREV_LIBS"
+ CXX="$PREV_CXX"
+ AC_LANG_POP(C++)
+
+ AC_MSG_CHECKING([if we should bundle freetype])
+ if test "x$BUNDLE_FREETYPE" = xyes; then
+ FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
+ fi
+ AC_MSG_RESULT([$BUNDLE_FREETYPE])
+
+ fi # end freetype needed
+
+ AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
+ AC_SUBST(FREETYPE_CFLAGS)
+ AC_SUBST(FREETYPE_LIBS)
+])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-std.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,120 @@
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup the standard C/C++ runtime libraries.
+#
+# Most importantly, determine if stdc++ should be linked statically or
+# dynamically.
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_STD_LIBS],
+[
+ # statically link libstdc++ before C++ ABI is stablized on Linux unless
+ # dynamic build is configured on command line.
+ AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
+ [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
+ [
+ if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
+ && test "x$with_stdc__lib" != xdefault; then
+ AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
+ fi
+ ],
+ [with_stdc__lib=default]
+ )
+
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ # Test if -lstdc++ works.
+ AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
+ AC_LANG_PUSH(C++)
+ OLD_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -lstdc++"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
+ [has_dynamic_libstdcxx=yes],
+ [has_dynamic_libstdcxx=no])
+ CXXFLAGS="$OLD_CXXFLAGS"
+ AC_LANG_POP(C++)
+ AC_MSG_RESULT([$has_dynamic_libstdcxx])
+
+ # Test if stdc++ can be linked statically.
+ AC_MSG_CHECKING([if static link of stdc++ is possible])
+ STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
+ AC_LANG_PUSH(C++)
+ OLD_LIBS="$LIBS"
+ OLD_CXX="$CXX"
+ LIBS="$STATIC_STDCXX_FLAGS"
+ CXX="$CC"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
+ [has_static_libstdcxx=yes],
+ [has_static_libstdcxx=no])
+ LIBS="$OLD_LIBS"
+ CXX="$OLD_CXX"
+ AC_LANG_POP(C++)
+ AC_MSG_RESULT([$has_static_libstdcxx])
+
+ if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
+ AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
+ fi
+
+ if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
+ AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
+ fi
+
+ if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
+ AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
+ fi
+
+ # If dynamic was requested, it's available since it would fail above otherwise.
+ # If dynamic wasn't requested, go with static unless it isn't available.
+ AC_MSG_CHECKING([how to link with libstdc++])
+ if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+ LIBCXX="$LIBCXX -lstdc++"
+ LDCXX="$CXX"
+ STATIC_CXX_SETTING="STATIC_CXX=false"
+ AC_MSG_RESULT([dynamic])
+ else
+ LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+ LDCXX="$CC"
+ STATIC_CXX_SETTING="STATIC_CXX=true"
+ AC_MSG_RESULT([static])
+ fi
+ fi
+ AC_SUBST(STATIC_CXX_SETTING)
+
+ # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+ if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
+ LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
+ fi
+
+ # TODO better (platform agnostic) test
+ if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
+ LIBCXX="-lstdc++"
+ fi
+ AC_SUBST(LIBCXX)
+
+ # Setup Windows runtime dlls
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ TOOLCHAIN_SETUP_VS_RUNTIME_DLLS
+ fi
+])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/lib-x11.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,121 @@
+#
+# Copyright (c) 2011, 2015, 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.
+#
+
+################################################################################
+# Setup X11 Windows system
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_X11],
+[
+ if test "x$NEEDS_LIB_X11" = xfalse; then
+ if test "x${with_x}" != x; then
+ AC_MSG_WARN([X11 is not used, so --with-x is ignored])
+ fi
+ X_CFLAGS=
+ X_LIBS=
+ else
+ # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
+ # Make a simple check for the libraries at the sysroot, and setup --x-includes and
+ # --x-libraries for the sysroot, if that seems to be correct.
+ if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+ if test "x$SYSROOT" != "x"; then
+ if test "x$x_includes" = xNONE; then
+ if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
+ x_includes="$SYSROOT/usr/X11R6/include"
+ elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
+ x_includes="$SYSROOT/usr/include"
+ fi
+ fi
+ if test "x$x_libraries" = xNONE; then
+ if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
+ x_libraries="$SYSROOT/usr/X11R6/lib"
+ elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ x_libraries="$SYSROOT/usr/lib64"
+ elif test -f "$SYSROOT/usr/lib/libX11.so"; then
+ x_libraries="$SYSROOT/usr/lib"
+ fi
+ fi
+ fi
+ fi
+
+ # Now let autoconf do it's magic
+ AC_PATH_X
+ AC_PATH_XTRA
+
+ # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
+ # this doesn't make sense so we remove it.
+ if test "x$COMPILE_TYPE" = xcross; then
+ X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
+ fi
+
+ if test "x$no_x" = xyes; then
+ HELP_MSG_MISSING_DEPENDENCY([x11])
+ AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ OPENWIN_HOME="/usr/openwin"
+ X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
+ X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
+ -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
+ fi
+
+ AC_LANG_PUSH(C)
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
+
+ # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
+ AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
+ [X11_HEADERS_OK=yes],
+ [X11_HEADERS_OK=no; break],
+ [
+ # include <X11/Xlib.h>
+ # include <X11/Xutil.h>
+ ]
+ )
+
+ if test "x$X11_HEADERS_OK" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([x11])
+ AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
+ fi
+
+ # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
+ # defined in libawt_xawt.
+ AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],
+ [[XLinearGradient x;]])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"])
+
+ CFLAGS="$OLD_CFLAGS"
+ AC_LANG_POP(C)
+ fi # NEEDS_LIB_X11
+
+ AC_SUBST(X_CFLAGS)
+ AC_SUBST(X_LIBS)
+])
--- a/common/autoconf/libraries.m4 Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/libraries.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, 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
@@ -23,1044 +23,85 @@
# questions.
#
-AC_DEFUN_ONCE([LIB_SETUP_INIT],
-[
-
- ###############################################################################
- #
- # OS specific settings that we never will need to probe.
- #
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
- AC_MSG_CHECKING([what is not needed on Linux?])
- PULSE_NOT_NEEDED=yes
- AC_MSG_RESULT([pulse])
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- AC_MSG_CHECKING([what is not needed on Solaris?])
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- AC_MSG_RESULT([alsa pulse])
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xaix; then
- AC_MSG_CHECKING([what is not needed on AIX?])
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- AC_MSG_RESULT([alsa pulse])
- fi
-
-
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- AC_MSG_CHECKING([what is not needed on Windows?])
- CUPS_NOT_NEEDED=yes
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- X11_NOT_NEEDED=yes
- AC_MSG_RESULT([alsa cups pulse x11])
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- AC_MSG_CHECKING([what is not needed on MacOSX?])
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- X11_NOT_NEEDED=yes
- AC_MSG_RESULT([alsa pulse x11])
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xbsd; then
- AC_MSG_CHECKING([what is not needed on bsd?])
- ALSA_NOT_NEEDED=yes
- AC_MSG_RESULT([alsa])
- fi
-
- if test "x$OPENJDK" = "xfalse"; then
- FREETYPE_NOT_NEEDED=yes
- fi
-
- if test "x$SUPPORT_HEADFUL" = xno; then
- X11_NOT_NEEDED=yes
- fi
-])
-
-AC_DEFUN_ONCE([LIB_SETUP_X11],
-[
-
- ###############################################################################
- #
- # Check for X Windows
- #
-
- if test "x$X11_NOT_NEEDED" = xyes; then
- if test "x${with_x}" != x; then
- AC_MSG_WARN([X11 is not used, so --with-x is ignored])
- fi
- X_CFLAGS=
- X_LIBS=
- else
- # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
- # Make a simple check for the libraries at the sysroot, and setup --x-includes and
- # --x-libraries for the sysroot, if that seems to be correct.
- if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
- if test "x$SYSROOT" != "x"; then
- if test "x$x_includes" = xNONE; then
- if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
- x_includes="$SYSROOT/usr/X11R6/include"
- elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
- x_includes="$SYSROOT/usr/include"
- fi
- fi
- if test "x$x_libraries" = xNONE; then
- if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
- x_libraries="$SYSROOT/usr/X11R6/lib"
- elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- x_libraries="$SYSROOT/usr/lib64"
- elif test -f "$SYSROOT/usr/lib/libX11.so"; then
- x_libraries="$SYSROOT/usr/lib"
- fi
- fi
- fi
- fi
-
- # Now let autoconf do it's magic
- AC_PATH_X
- AC_PATH_XTRA
-
- # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
- # this doesn't make sense so we remove it.
- if test "x$COMPILE_TYPE" = xcross; then
- X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
- fi
+# Major library component reside in separate files.
+m4_include([lib-alsa.m4])
+m4_include([lib-bundled.m4])
+m4_include([lib-cups.m4])
+m4_include([lib-ffi.m4])
+m4_include([lib-freetype.m4])
+m4_include([lib-std.m4])
+m4_include([lib-x11.m4])
- if test "x$no_x" = xyes; then
- HELP_MSG_MISSING_DEPENDENCY([x11])
- AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- OPENWIN_HOME="/usr/openwin"
- X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
- X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
- -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
- -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
- -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
- fi
-
- AC_LANG_PUSH(C)
- OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
-
- # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
- AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
- [X11_HEADERS_OK=yes],
- [X11_HEADERS_OK=no; break],
- [
- # include <X11/Xlib.h>
- # include <X11/Xutil.h>
- ]
- )
-
- if test "x$X11_HEADERS_OK" = xno; then
- HELP_MSG_MISSING_DEPENDENCY([x11])
- AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
- fi
-
- # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
- # defined in libawt_xawt.
- AC_MSG_CHECKING([if XlinearGradient is defined in Xrender.h])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],
- [[XLinearGradient x;]])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"])
-
- CFLAGS="$OLD_CFLAGS"
- AC_LANG_POP(C)
- fi # X11_NOT_NEEDED
-
- AC_SUBST(X_CFLAGS)
- AC_SUBST(X_LIBS)
-])
-
-AC_DEFUN_ONCE([LIB_SETUP_CUPS],
+################################################################################
+# Determine which libraries are needed for this configuration
+################################################################################
+AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
[
-
- ###############################################################################
- #
- # The common unix printing system cups is used to print from java.
- #
- AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
- [specify prefix directory for the cups package
- (expecting the headers under PATH/include)])])
- AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
- [specify directory for the cups include files])])
-
- if test "x$CUPS_NOT_NEEDED" = xyes; then
- if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
- AC_MSG_WARN([cups not used, so --with-cups is ignored])
- fi
- CUPS_CFLAGS=
+ # Check if X11 is needed
+ if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # No X11 support on windows or macosx
+ NEEDS_LIB_X11=false
else
- CUPS_FOUND=no
-
- if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
- AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
- fi
-
- if test "x${with_cups}" != x; then
- CUPS_CFLAGS="-I${with_cups}/include"
- CUPS_FOUND=yes
- fi
- if test "x${with_cups_include}" != x; then
- CUPS_CFLAGS="-I${with_cups_include}"
- CUPS_FOUND=yes
- fi
- if test "x$CUPS_FOUND" = xno; then
- BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
- fi
- if test "x$CUPS_FOUND" = xno; then
- # Are the cups headers installed in the default /usr/include location?
- AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
- [
- CUPS_FOUND=yes
- CUPS_CFLAGS=
- DEFAULT_CUPS=yes
- ]
- )
- fi
- if test "x$CUPS_FOUND" = xno; then
- # Getting nervous now? Lets poke around for standard Solaris third-party
- # package installation locations.
- AC_MSG_CHECKING([for cups headers])
- if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
- # An SFW package seems to be installed!
- CUPS_FOUND=yes
- CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
- elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
- # A CSW package seems to be installed!
- CUPS_FOUND=yes
- CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
- fi
- AC_MSG_RESULT([$CUPS_FOUND])
- fi
- if test "x$CUPS_FOUND" = xno; then
- HELP_MSG_MISSING_DEPENDENCY([cups])
- AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
+ if test "x$SUPPORT_HEADFUL" = xno; then
+ # No X11 support if building headless-only
+ NEEDS_LIB_X11=false
+ else
+ # All other instances need X11
+ NEEDS_LIB_X11=true
fi
fi
- AC_SUBST(CUPS_CFLAGS)
-
-])
-
-AC_DEFUN([LIB_BUILD_FREETYPE],
-[
- FREETYPE_SRC_PATH="$1"
- BUILD_FREETYPE=yes
-
- # Check if the freetype sources are acessible..
- if ! test -d $FREETYPE_SRC_PATH; then
- AC_MSG_WARN([--with-freetype-src specified, but can't find path "$FREETYPE_SRC_PATH" - ignoring --with-freetype-src])
- BUILD_FREETYPE=no
- fi
- # ..and contain a vc2010 project file
- vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
- if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
- AC_MSG_WARN([Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src])
- BUILD_FREETYPE=no
- fi
- # Now check if configure found a version of 'msbuild.exe'
- if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
- AC_MSG_WARN([Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
- BUILD_FREETYPE=no
+ # Check if cups is needed
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # Windows have a separate print system
+ NEEDS_LIB_CUPS=false
+ else
+ NEEDS_LIB_CUPS=true
fi
- # Ready to go..
- if test "x$BUILD_FREETYPE" = xyes; then
-
- # msbuild requires trailing slashes for output directories
- freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
- freetype_lib_path_unix="$freetype_lib_path"
- freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(vcxproj_path)
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_lib_path)
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_obj_path)
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- freetype_platform=x64
- else
- freetype_platform=win32
- fi
-
- # The original freetype project file is for VS 2010 (i.e. 'v100'),
- # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
- # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
- # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
- AC_MSG_NOTICE([Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ...])
-
- # First we try to build the freetype.dll
- $ECHO -e "@echo off\n"\
- "$MSBUILD $vcxproj_path "\
- "/p:PlatformToolset=$PLATFORM_TOOLSET "\
- "/p:Configuration=\"Release Multithreaded\" "\
- "/p:Platform=$freetype_platform "\
- "/p:ConfigurationType=DynamicLibrary "\
- "/p:TargetName=freetype "\
- "/p:OutDir=\"$freetype_lib_path\" "\
- "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
- cmd /c freetype.bat
-
- if test -s "$freetype_lib_path_unix/freetype.dll"; then
- # If that succeeds we also build freetype.lib
- $ECHO -e "@echo off\n"\
- "$MSBUILD $vcxproj_path "\
- "/p:PlatformToolset=$PLATFORM_TOOLSET "\
- "/p:Configuration=\"Release Multithreaded\" "\
- "/p:Platform=$freetype_platform "\
- "/p:ConfigurationType=StaticLibrary "\
- "/p:TargetName=freetype "\
- "/p:OutDir=\"$freetype_lib_path\" "\
- "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
- cmd /c freetype.bat
-
- if test -s "$freetype_lib_path_unix/freetype.lib"; then
- # Once we build both, lib and dll, set freetype lib and include path appropriately
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
- POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
- AC_MSG_NOTICE([Compiling freetype sources succeeded! (see freetype.log for build results)])
- else
- BUILD_FREETYPE=no
- fi
- else
- BUILD_FREETYPE=no
- fi
- fi
-])
-
-AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
-[
- POTENTIAL_FREETYPE_INCLUDE_PATH="$1"
- POTENTIAL_FREETYPE_LIB_PATH="$2"
- METHOD="$3"
-
- # Let's start with an optimistic view of the world :-)
- FOUND_FREETYPE=yes
-
- # First look for the canonical freetype main include file ft2build.h.
- if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
- POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
- if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # Fail.
- FOUND_FREETYPE=no
- fi
+ # Check if freetype is needed
+ if test "x$OPENJDK" = "xtrue"; then
+ NEEDS_LIB_FREETYPE=true
+ else
+ NEEDS_LIB_FREETYPE=false
fi
- if test "x$FOUND_FREETYPE" = xyes; then
- # Include file found, let's continue the sanity check.
- AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
-
- # Reset to default value
- FREETYPE_BASE_NAME=freetype
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- if test "x$OPENJDK_TARGET_OS" = xmacosx \
- && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
- # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
- # for the .6 version explicitly.
- FREETYPE_BASE_NAME=freetype.6
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
- AC_MSG_NOTICE([Compensating for missing symlink by using version 6 explicitly])
- else
- AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
- FOUND_FREETYPE=no
- fi
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
- AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location.])
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris \
- && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
- # Found lib in isa dir, use that instead.
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
- AC_MSG_NOTICE([Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead])
- fi
- fi
+ # Check if alsa is needed
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ NEEDS_LIB_ALSA=true
+ else
+ NEEDS_LIB_ALSA=false
fi
- if test "x$FOUND_FREETYPE" = xyes; then
- BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH)
- BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH)
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- AC_MSG_CHECKING([for freetype includes])
- AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH])
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- AC_MSG_CHECKING([for freetype libraries])
- AC_MSG_RESULT([$FREETYPE_LIB_PATH])
+ # Check if ffi is needed
+ if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+ NEEDS_LIB_FFI=true
+ else
+ NEEDS_LIB_FFI=false
fi
])
-AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
+################################################################################
+# Parse library options, and setup needed libraries
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
[
-
- ###############################################################################
- #
- # The ubiquitous freetype library is used to render fonts.
- #
- AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
- [specify prefix directory for the freetype package
- (expecting the libraries under PATH/lib and the headers under PATH/include)])])
- AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
- [specify directory for the freetype include files])])
- AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
- [specify directory for the freetype library])])
- AC_ARG_WITH(freetype-src, [AS_HELP_STRING([--with-freetype-src],
- [specify directory with freetype sources to automatically build the library (experimental, Windows-only)])])
- AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
- [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
-
- # Need to specify explicitly since it needs to be overridden on some versions of macosx
- FREETYPE_BASE_NAME=freetype
- FREETYPE_CFLAGS=
- FREETYPE_LIBS=
- FREETYPE_BUNDLE_LIB_PATH=
-
- if test "x$FREETYPE_NOT_NEEDED" = xyes; then
- if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
- AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
- fi
- if test "x$enable_freetype_bundling" != x; then
- AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
- fi
- else
- # freetype is needed to build; go get it!
-
- BUNDLE_FREETYPE="$enable_freetype_bundling"
-
- if test "x$with_freetype_src" != x; then
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # Try to build freetype if --with-freetype-src was given on Windows
- LIB_BUILD_FREETYPE([$with_freetype_src])
- if test "x$BUILD_FREETYPE" = xyes; then
- # Okay, we built it. Check that it works.
- LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype-src])
- if test "x$FOUND_FREETYPE" != xyes; then
- AC_MSG_ERROR([Can not use the built freetype at location given by --with-freetype-src])
- fi
- else
- AC_MSG_NOTICE([User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)])
- AC_MSG_ERROR([Consider building freetype manually and using --with-freetype instead.])
- fi
- else
- AC_MSG_WARN([--with-freetype-src is currently only supported on Windows - ignoring])
- fi
- fi
-
- if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
- # User has specified settings
-
- if test "x$BUNDLE_FREETYPE" = x; then
- # If not specified, default is to bundle freetype
- BUNDLE_FREETYPE=yes
- fi
-
- if test "x$with_freetype" != x; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
- POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
- fi
-
- # Allow --with-freetype-lib and --with-freetype-include to override
- if test "x$with_freetype_include" != x; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
- fi
- if test "x$with_freetype_lib" != x; then
- POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
- fi
-
- if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
- # Okay, we got it. Check that it works.
- LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
- if test "x$FOUND_FREETYPE" != xyes; then
- AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype])
- fi
- else
- # User specified only one of lib or include. This is an error.
- if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
- AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include])
- AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
- else
- AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib])
- AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
- fi
- fi
- else
- # User did not specify settings, but we need freetype. Try to locate it.
-
- if test "x$BUNDLE_FREETYPE" = x; then
- # If not specified, default is to bundle freetype only on windows
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- BUNDLE_FREETYPE=yes
- else
- BUNDLE_FREETYPE=no
- fi
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check builddeps
- BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
- # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
- if test "x$FOUND_FREETYPE" = xyes; then
- if test "x$BUNDLE_FREETYPE" = xyes; then
- AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that])
- FOUND_FREETYPE=no
- else
- AC_MSG_CHECKING([for freetype])
- AC_MSG_RESULT([yes (using builddeps)])
- fi
- fi
- fi
-
- # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
- if test "x$SYSROOT" = x; then
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
- if test "x$PKG_CONFIG" != x; then
- PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
- if test "x$FOUND_FREETYPE" = xyes; then
- # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
- FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
- # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
- if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
- fi
- # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
- if test "x$BUNDLE_FREETYPE" = xyes; then
- AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
- FOUND_FREETYPE=no
- else
- AC_MSG_CHECKING([for freetype])
- AC_MSG_RESULT([yes (using pkg-config)])
- fi
- fi
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check in well-known locations
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
- fi
- else
- FREETYPE_BASE_DIR="$SYSROOT/usr"
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
-
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr"
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
- else
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
- if test "x$FOUND_FREETYPE" != xyes; then
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
- fi
- fi
- fi
- fi
- fi # end check in well-known locations
-
- if test "x$FOUND_FREETYPE" != xyes; then
- HELP_MSG_MISSING_DEPENDENCY([freetype])
- AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
- fi
- fi # end user specified settings
-
- # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
- if test "x$FREETYPE_CFLAGS" = x; then
- BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH)
- if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
- FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
- else
- FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
- fi
- fi
-
- if test "x$FREETYPE_LIBS" = x; then
- BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
- else
- FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
- fi
- fi
-
- # Try to compile it
- AC_MSG_CHECKING([if we can compile and link with freetype])
- AC_LANG_PUSH(C++)
- PREV_CXXCFLAGS="$CXXFLAGS"
- PREV_LIBS="$LIBS"
- PREV_CXX="$CXX"
- CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
- LIBS="$LIBS $FREETYPE_LIBS"
- CXX="$FIXPATH $CXX"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[
- #include<ft2build.h>
- #include FT_FREETYPE_H
- int main () {
- FT_Init_FreeType(NULL);
- return 0;
- }
- ]])],
- [
- AC_MSG_RESULT([yes])
- ],
- [
- AC_MSG_RESULT([no])
- AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.])
- AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS])
-
- HELP_MSG_MISSING_DEPENDENCY([freetype])
-
- AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG])
- ]
- )
- CXXCFLAGS="$PREV_CXXFLAGS"
- LIBS="$PREV_LIBS"
- CXX="$PREV_CXX"
- AC_LANG_POP(C++)
-
- AC_MSG_CHECKING([if we should bundle freetype])
- if test "x$BUNDLE_FREETYPE" = xyes; then
- FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
- fi
- AC_MSG_RESULT([$BUNDLE_FREETYPE])
-
- fi # end freetype needed
-
- AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
- AC_SUBST(FREETYPE_CFLAGS)
- AC_SUBST(FREETYPE_LIBS)
-])
-
-AC_DEFUN_ONCE([LIB_SETUP_ALSA],
-[
-
- ###############################################################################
- #
- # Check for alsa headers and libraries. Used on Linux/GNU systems.
- #
- AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
- [specify prefix directory for the alsa package
- (expecting the libraries under PATH/lib and the headers under PATH/include)])])
- AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
- [specify directory for the alsa include files])])
- AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
- [specify directory for the alsa library])])
-
- if test "x$ALSA_NOT_NEEDED" = xyes; then
- if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
- AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
- fi
- ALSA_CFLAGS=
- ALSA_LIBS=
- else
- ALSA_FOUND=no
-
- if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
- AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
- fi
-
- if test "x${with_alsa}" != x; then
- ALSA_LIBS="-L${with_alsa}/lib -lasound"
- ALSA_CFLAGS="-I${with_alsa}/include"
- ALSA_FOUND=yes
- fi
- if test "x${with_alsa_include}" != x; then
- ALSA_CFLAGS="-I${with_alsa_include}"
- ALSA_FOUND=yes
- fi
- if test "x${with_alsa_lib}" != x; then
- ALSA_LIBS="-L${with_alsa_lib} -lasound"
- ALSA_FOUND=yes
- fi
- if test "x$ALSA_FOUND" = xno; then
- BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
- fi
- # Do not try pkg-config if we have a sysroot set.
- if test "x$SYSROOT" = x; then
- if test "x$ALSA_FOUND" = xno; then
- PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
- fi
- fi
- if test "x$ALSA_FOUND" = xno; then
- AC_CHECK_HEADERS([alsa/asoundlib.h],
- [
- ALSA_FOUND=yes
- ALSA_CFLAGS=-Iignoreme
- ALSA_LIBS=-lasound
- DEFAULT_ALSA=yes
- ],
- [ALSA_FOUND=no])
- fi
- if test "x$ALSA_FOUND" = xno; then
- HELP_MSG_MISSING_DEPENDENCY([alsa])
- AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
- fi
- fi
-
- AC_SUBST(ALSA_CFLAGS)
- AC_SUBST(ALSA_LIBS)
+ LIB_SETUP_STD_LIBS
+ LIB_SETUP_X11
+ LIB_SETUP_CUPS
+ LIB_SETUP_FREETYPE
+ LIB_SETUP_ALSA
+ LIB_SETUP_LIBFFI
+ LIB_SETUP_LLVM
+ LIB_SETUP_BUNDLED_LIBS
+ LIB_SETUP_MISC_LIBS
])
-AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
+################################################################################
+# Setup llvm (Low-Level VM)
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_LLVM],
[
-
- ###############################################################################
- #
- # Check for the jpeg library
- #
-
- AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
- [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
- AC_MSG_CHECKING([for which libjpeg to use])
-
- # default is bundled
- DEFAULT_LIBJPEG=bundled
-
- #
- # if user didn't specify, use DEFAULT_LIBJPEG
- #
- if test "x${with_libjpeg}" = "x"; then
- with_libjpeg=${DEFAULT_LIBJPEG}
- fi
-
- AC_MSG_RESULT(${with_libjpeg})
-
- if test "x${with_libjpeg}" = "xbundled"; then
- USE_EXTERNAL_LIBJPEG=false
- elif test "x${with_libjpeg}" = "xsystem"; then
- AC_CHECK_HEADER(jpeglib.h, [],
- [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
- AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
- [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
-
- USE_EXTERNAL_LIBJPEG=true
- else
- AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
- fi
-
- AC_SUBST(USE_EXTERNAL_LIBJPEG)
-
- ###############################################################################
- #
- # Check for the gif library
- #
-
- AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
- [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
-
- AC_MSG_CHECKING([for which giflib to use])
-
- # default is bundled
- DEFAULT_GIFLIB=bundled
-
- #
- # if user didn't specify, use DEFAULT_GIFLIB
- #
- if test "x${with_giflib}" = "x"; then
- with_giflib=${DEFAULT_GIFLIB}
- fi
-
- AC_MSG_RESULT(${with_giflib})
-
- if test "x${with_giflib}" = "xbundled"; then
- USE_EXTERNAL_LIBGIF=false
- elif test "x${with_giflib}" = "xsystem"; then
- AC_CHECK_HEADER(gif_lib.h, [],
- [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
- AC_CHECK_LIB(gif, DGifGetCode, [],
- [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
-
- USE_EXTERNAL_LIBGIF=true
- else
- AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
- fi
- AC_SUBST(USE_EXTERNAL_LIBGIF)
-
- ###############################################################################
- #
- # Check for the lcms2 library
- #
-
- AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms],
- [use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
- AC_MSG_CHECKING([for which lcms to use])
-
- DEFAULT_LCMS=bundled
-
- #
- # If user didn't specify, use DEFAULT_LCMS
- #
- if test "x${with_lcms}" = "x"; then
- with_lcms=${DEFAULT_LCMS}
- fi
-
- if test "x${with_lcms}" = "xbundled"; then
- USE_EXTERNAL_LCMS=false
- AC_MSG_RESULT([bundled])
- elif test "x${with_lcms}" = "xsystem"; then
- AC_MSG_RESULT([system])
- PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no])
- if test "x${LCMS_FOUND}" = "xyes"; then
- USE_EXTERNAL_LCMS=true
- else
- AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
- fi
- else
- AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
- fi
-
- AC_SUBST(USE_EXTERNAL_LCMS)
-
- ###############################################################################
- #
- # Check for the png library
- #
-
- AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng],
- [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
-
- AC_MSG_CHECKING([for which libpng to use])
-
- # default is bundled
- DEFAULT_LIBPNG=bundled
-
- #
- # if user didn't specify, use DEFAULT_LIBPNG
- #
- if test "x${with_libpng}" = "x"; then
- with_libpng=${DEFAULT_LIBPNG}
- fi
-
- if test "x${with_libpng}" = "xbundled"; then
- USE_EXTERNAL_LIBPNG=false
- AC_MSG_RESULT([bundled])
- elif test "x${with_libpng}" = "xsystem"; then
- PKG_CHECK_MODULES(PNG, libpng,
- [ LIBPNG_FOUND=yes ],
- [ LIBPNG_FOUND=no ])
- if test "x${LIBPNG_FOUND}" = "xyes"; then
- USE_EXTERNAL_LIBPNG=true
- AC_MSG_RESULT([system])
- else
- AC_MSG_RESULT([system not found])
- AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
- fi
- else
- AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
- fi
- AC_SUBST(USE_EXTERNAL_LIBPNG)
-
- ###############################################################################
- #
- # Check for the zlib library
- #
-
- AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
- [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
-
- AC_CHECK_LIB(z, compress,
- [ ZLIB_FOUND=yes ],
- [ ZLIB_FOUND=no ])
-
- AC_MSG_CHECKING([for which zlib to use])
-
- DEFAULT_ZLIB=bundled
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
- #
- # On macosx default is system...on others default is
- #
- DEFAULT_ZLIB=system
- fi
-
- if test "x${ZLIB_FOUND}" != "xyes"; then
- #
- # If we don't find any system...set default to bundled
- #
- DEFAULT_ZLIB=bundled
- fi
-
- #
- # If user didn't specify, use DEFAULT_ZLIB
- #
- if test "x${with_zlib}" = "x"; then
- with_zlib=${DEFAULT_ZLIB}
- fi
-
- if test "x${with_zlib}" = "xbundled"; then
- USE_EXTERNAL_LIBZ=false
- AC_MSG_RESULT([bundled])
- elif test "x${with_zlib}" = "xsystem"; then
- if test "x${ZLIB_FOUND}" = "xyes"; then
- USE_EXTERNAL_LIBZ=true
- AC_MSG_RESULT([system])
- else
- AC_MSG_RESULT([system not found])
- AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])
- fi
- else
- AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
- fi
-
- AC_SUBST(USE_EXTERNAL_LIBZ)
-
- ###############################################################################
- LIBZIP_CAN_USE_MMAP=true
-
- AC_SUBST(LIBZIP_CAN_USE_MMAP)
-
- ###############################################################################
- #
- # Check if altzone exists in time.h
- #
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
- [has_altzone=yes],
- [has_altzone=no])
- if test "x$has_altzone" = xyes; then
- AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h])
- fi
-
- ###############################################################################
- #
- # Check the maths library
- #
-
- AC_CHECK_LIB(m, cos, [],
- [
- AC_MSG_NOTICE([Maths library was not found])
- ]
- )
- AC_SUBST(LIBM)
-
- ###############################################################################
- #
- # Check for libdl.so
-
- save_LIBS="$LIBS"
- LIBS=""
- AC_CHECK_LIB(dl,dlopen)
- LIBDL="$LIBS"
- AC_SUBST(LIBDL)
- LIBS="$save_LIBS"
-])
-
-AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
-[
- ###############################################################################
- #
- # statically link libstdc++ before C++ ABI is stablized on Linux unless
- # dynamic build is configured on command line.
- #
- AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
- [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
- [
- if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
- && test "x$with_stdc__lib" != xdefault; then
- AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
- fi
- ],
- [with_stdc__lib=default]
- )
-
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
- # Test if -lstdc++ works.
- AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
- AC_LANG_PUSH(C++)
- OLD_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -lstdc++"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
- [has_dynamic_libstdcxx=yes],
- [has_dynamic_libstdcxx=no])
- CXXFLAGS="$OLD_CXXFLAGS"
- AC_LANG_POP(C++)
- AC_MSG_RESULT([$has_dynamic_libstdcxx])
-
- # Test if stdc++ can be linked statically.
- AC_MSG_CHECKING([if static link of stdc++ is possible])
- STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
- AC_LANG_PUSH(C++)
- OLD_LIBS="$LIBS"
- OLD_CXX="$CXX"
- LIBS="$STATIC_STDCXX_FLAGS"
- CXX="$CC"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
- [has_static_libstdcxx=yes],
- [has_static_libstdcxx=no])
- LIBS="$OLD_LIBS"
- CXX="$OLD_CXX"
- AC_LANG_POP(C++)
- AC_MSG_RESULT([$has_static_libstdcxx])
-
- if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
- AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
- fi
-
- if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
- AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
- fi
-
- if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
- AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
- fi
-
- AC_MSG_CHECKING([how to link with libstdc++])
- # If dynamic was requested, it's available since it would fail above otherwise.
- # If dynamic wasn't requested, go with static unless it isn't available.
- if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- LIBCXX="$LIBCXX -lstdc++"
- LDCXX="$CXX"
- STATIC_CXX_SETTING="STATIC_CXX=false"
- AC_MSG_RESULT([dynamic])
- else
- LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
- LDCXX="$CC"
- STATIC_CXX_SETTING="STATIC_CXX=true"
- AC_MSG_RESULT([static])
- fi
- fi
- AC_SUBST(STATIC_CXX_SETTING)
-
- if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
- PKG_CHECK_MODULES([LIBFFI], [libffi])
-
- fi
-
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
@@ -1107,26 +148,36 @@
AC_SUBST(LLVM_LDFLAGS)
AC_SUBST(LLVM_LIBS)
fi
-
- # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
- if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
- LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
- fi
-
- # TODO better (platform agnostic) test
- if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
- LIBCXX="-lstdc++"
- fi
-
- AC_SUBST(LIBCXX)
])
-AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
+################################################################################
+# Setup various libraries, typically small system libraries
+################################################################################
+AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
[
+ # Setup libm (the maths library)
+ AC_CHECK_LIB(m, cos, [], [
+ AC_MSG_NOTICE([Maths library was not found])
+ ])
+ LIBM=-lm
+ AC_SUBST(LIBM)
+
+ # Setup libdl (for dynamic library loading)
+ save_LIBS="$LIBS"
+ LIBS=""
+ AC_CHECK_LIB(dl, dlopen)
+ LIBDL="$LIBS"
+ AC_SUBST(LIBDL)
+ LIBS="$save_LIBS"
+
+ # Deprecated libraries, keep the flags for backwards compatibility
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
- TOOLCHAIN_SETUP_VS_RUNTIME_DLLS
BASIC_DEPRECATED_ARG_WITH([dxsdk])
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
fi
+
+ # Control if libzip can use mmap. Available for purposes of overriding.
+ LIBZIP_CAN_USE_MMAP=true
+ AC_SUBST(LIBZIP_CAN_USE_MMAP)
])
--- a/common/autoconf/platform.m4 Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/platform.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -489,7 +489,8 @@
AC_CHECK_HEADERS([stdio.h], , [
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
if test "x$COMPILE_TYPE" = xreduced; then
- AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
+ HELP_MSG_MISSING_DEPENDENCY([reduced])
+ AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
elif test "x$COMPILE_TYPE" = xcross; then
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
fi
@@ -509,7 +510,7 @@
# This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
# Let's try to implicitely set the compilers target architecture and retry the test
AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS).])
- AC_MSG_NOTICE([I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
+ AC_MSG_NOTICE([Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}])
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
# We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
@@ -524,7 +525,14 @@
TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
- AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+ AC_MSG_NOTICE([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+ if test "x$COMPILE_TYPE" = xreduced; then
+ HELP_MSG_MISSING_DEPENDENCY([reduced])
+ AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG])
+ elif test "x$COMPILE_TYPE" = xcross; then
+ AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
+ fi
+ AC_MSG_ERROR([Cannot continue.])
fi
fi
fi
--- a/common/autoconf/spec.gmk.in Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/spec.gmk.in Mon Oct 12 14:41:36 2015 -0700
@@ -96,7 +96,7 @@
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
@SET_OPENJDK@
-LIBM:=-lm
+LIBM:=@LIBM@
LIBDL:=@LIBDL@
# colon or semicolon
@@ -367,6 +367,8 @@
# build platform.
BUILD_CC:=@FIXPATH@ @BUILD_CC@
BUILD_LD:=@FIXPATH@ @BUILD_LD@
+BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
+BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
AS:=@FIXPATH@ @AS@
@@ -421,7 +423,7 @@
EXE_SUFFIX:=@EXE_SUFFIX@
OBJ_SUFFIX:=@OBJ_SUFFIX@
-POST_STRIP_CMD:=@POST_STRIP_CMD@
+STRIPFLAGS:=@STRIPFLAGS@
JAVA_FLAGS:=@JAVA_FLAGS@
JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
@@ -461,9 +463,6 @@
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javadoc.Main
-# The interim corba jar is needed for running rmic
-INTERIM_CORBA_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_corba.jar
-
# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple
# times.
@@ -500,6 +499,7 @@
MKDIR:=@MKDIR@
MV:=@MV@
NAWK:=@NAWK@
+NICE:=@NICE@
PATCH:=@PATCH@
PRINTF:=@PRINTF@
PWD:=@THEPWDCMD@
--- a/common/autoconf/toolchain.m4 Mon Oct 12 16:26:58 2015 +0300
+++ b/common/autoconf/toolchain.m4 Mon Oct 12 14:41:36 2015 -0700
@@ -656,17 +656,23 @@
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
BASIC_PATH_PROGS(BUILD_LD, ld)
BASIC_FIXUP_EXECUTABLE(BUILD_LD)
+ BUILD_SYSROOT_CFLAGS=""
+ BUILD_SYSROOT_LDFLAGS=""
else
# If we are not cross compiling, use the normal target compilers for
# building the build platform executables.
BUILD_CC="$CC"
BUILD_CXX="$CXX"
BUILD_LD="$LD"
+ BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
+ BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
fi
AC_SUBST(BUILD_CC)
AC_SUBST(BUILD_CXX)
AC_SUBST(BUILD_LD)
+ AC_SUBST(BUILD_SYSROOT_CFLAGS)
+ AC_SUBST(BUILD_SYSROOT_LDFLAGS)
])
# Setup legacy variables that are still needed as alternative ways to refer to
--- a/corba/.hgtags Mon Oct 12 16:26:58 2015 +0300
+++ b/corba/.hgtags Mon Oct 12 14:41:36 2015 -0700
@@ -326,3 +326,5 @@
45c35b7f5b40d5af0085e4a7b3a4d6e3e0347c35 jdk9-b81
c20d8ebddaa6fb09cc81d3edf3d1d05f4232700a jdk9-b82
ca8a1719588424f6e04e943790c7fcb7cb0b8c8f jdk9-b83
+df70bb200356fec686681f0295c50cc3ed43c3b3 jdk9-b84
+3ec06af1368924469f7ce60a00324bac55eaeecc jdk9-b85
--- a/corba/make/CompileInterim.gmk Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 2014, 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.
-#
-
-# This must be the first rule
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-include SetupJavaCompilers.gmk
-
-################################################################################
-
-$(eval $(call SetupJavaCompilation,BUILD_INTERIM_CORBA, \
- SETUP := GENERATE_OLDBYTECODE, \
- SRC := $(JDK_TOPDIR)/src/jdk.rmic/share/classes \
- $(CORBA_TOPDIR)/src/java.corba/share/classes \
- $(CORBA_TOPDIR)/src/jdk.rmic/share/classes \
- $(SUPPORT_OUTPUTDIR)/gensrc/java.corba, \
- EXCLUDES := com/sun/corba/se/PortableActivationIDL, \
- EXCLUDE_FILES := com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
- com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
- org/omg/PortableInterceptor/UNKNOWN.java \
- com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
- com/sun/corba/se/impl/presentation/rmi/jndi.properties, \
- COPY := .prp, \
- CLEAN := .properties, \
- BIN := $(BUILDTOOLS_OUTPUTDIR)/corba_interim_classes, \
- JAR := $(INTERIM_CORBA_JAR)))
-
-################################################################################
-
-all: $(BUILD_INTERIM_CORBA)
--- a/corba/src/java.corba/share/classes/com/sun/corba/se/spi/orb/ORB.java Mon Oct 12 16:26:58 2015 +0300
+++ b/corba/src/java.corba/share/classes/com/sun/corba/se/spi/orb/ORB.java Mon Oct 12 14:41:36 2015 -0700
@@ -89,6 +89,9 @@
import com.sun.corba.se.impl.presentation.rmi.PresentationManagerImpl ;
+import jdk.internal.misc.JavaAWTAccess;
+import jdk.internal.misc.SharedSecrets;
+
public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
implements Broker, TypeCodeFactory
{
@@ -202,7 +205,7 @@
public static PresentationManager getPresentationManager()
{
SecurityManager sm = System.getSecurityManager();
- sun.misc.JavaAWTAccess javaAwtAccess = sun.misc.SharedSecrets.getJavaAWTAccess();
+ JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess();
if (sm != null && javaAwtAccess != null) {
final Object appletContext = javaAwtAccess.getAppletContext();
if (appletContext != null) {
--- a/hotspot/.hgtags Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/.hgtags Mon Oct 12 14:41:36 2015 -0700
@@ -486,3 +486,5 @@
4142c190cd5ca4fb70ec367b4f97ef936272d8ef jdk9-b81
1c453a12be3036d482abef1dd470f8aff536b6b9 jdk9-b82
3ed0df2c553a80e0e26b91a6ce08806ea17a066a jdk9-b83
+184c4328444974edd6b3b490b9d0177ace7e331c jdk9-b84
+03845376ea9dbf9690b6a9cfb4ed63f8cc0541c0 jdk9-b85
--- a/hotspot/make/aix/makefiles/mapfile-vers-debug Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/aix/makefiles/mapfile-vers-debug Mon Oct 12 14:41:36 2015 -0700
@@ -26,169 +26,6 @@
SUNWprivate_1.1 {
global:
- # JNI
- JNI_CreateJavaVM;
- JNI_GetCreatedJavaVMs;
- JNI_GetDefaultJavaVMInitArgs;
-
- # JVM
- JVM_ActiveProcessorCount;
- JVM_ArrayCopy;
- JVM_AssertionStatusDirectives;
- JVM_ClassDepth;
- JVM_ClassLoaderDepth;
- JVM_Clone;
- JVM_ConstantPoolGetClassAt;
- JVM_ConstantPoolGetClassAtIfLoaded;
- JVM_ConstantPoolGetDoubleAt;
- JVM_ConstantPoolGetFieldAt;
- JVM_ConstantPoolGetFieldAtIfLoaded;
- JVM_ConstantPoolGetFloatAt;
- JVM_ConstantPoolGetIntAt;
- JVM_ConstantPoolGetLongAt;
- JVM_ConstantPoolGetMethodAt;
- JVM_ConstantPoolGetMethodAtIfLoaded;
- JVM_ConstantPoolGetMemberRefInfoAt;
- JVM_ConstantPoolGetSize;
- JVM_ConstantPoolGetStringAt;
- JVM_ConstantPoolGetUTF8At;
- JVM_CountStackFrames;
- JVM_CurrentClassLoader;
- JVM_CurrentLoadedClass;
- JVM_CurrentThread;
- JVM_CurrentTimeMillis;
- JVM_DefineClass;
- JVM_DefineClassWithSource;
- JVM_DefineClassWithSourceCond;
- JVM_DesiredAssertionStatus;
- JVM_DoPrivileged;
- JVM_DumpAllStacks;
- JVM_DumpThreads;
- JVM_FillInStackTrace;
- JVM_FindClassFromCaller;
- JVM_FindClassFromClass;
- JVM_FindClassFromBootLoader;
- JVM_FindLibraryEntry;
- JVM_FindLoadedClass;
- JVM_FindPrimitiveClass;
- JVM_FindSignal;
- JVM_FreeMemory;
- JVM_GC;
- JVM_GetAllThreads;
- JVM_GetArrayElement;
- JVM_GetArrayLength;
- JVM_GetCPClassNameUTF;
- JVM_GetCPFieldClassNameUTF;
- JVM_GetCPFieldModifiers;
- JVM_GetCPFieldNameUTF;
- JVM_GetCPFieldSignatureUTF;
- JVM_GetCPMethodClassNameUTF;
- JVM_GetCPMethodModifiers;
- JVM_GetCPMethodNameUTF;
- JVM_GetCPMethodSignatureUTF;
- JVM_GetCallerClass;
- JVM_GetClassAccessFlags;
- JVM_GetClassAnnotations;
- JVM_GetClassCPEntriesCount;
- JVM_GetClassCPTypes;
- JVM_GetClassConstantPool;
- JVM_GetClassContext;
- JVM_GetClassDeclaredConstructors;
- JVM_GetClassDeclaredFields;
- JVM_GetClassDeclaredMethods;
- JVM_GetClassFieldsCount;
- JVM_GetClassInterfaces;
- JVM_GetClassMethodsCount;
- JVM_GetClassModifiers;
- JVM_GetClassName;
- JVM_GetClassNameUTF;
- JVM_GetClassSignature;
- JVM_GetClassSigners;
- JVM_GetClassTypeAnnotations;
- JVM_GetDeclaredClasses;
- JVM_GetDeclaringClass;
- JVM_GetSimpleBinaryName;
- JVM_GetEnclosingMethodInfo;
- JVM_GetFieldIxModifiers;
- JVM_GetFieldTypeAnnotations;
- JVM_GetInheritedAccessControlContext;
- JVM_GetInterfaceVersion;
- JVM_GetManagement;
- JVM_GetMethodIxArgsSize;
- JVM_GetMethodIxByteCode;
- JVM_GetMethodIxByteCodeLength;
- JVM_GetMethodIxExceptionIndexes;
- JVM_GetMethodIxExceptionTableEntry;
- JVM_GetMethodIxExceptionTableLength;
- JVM_GetMethodIxExceptionsCount;
- JVM_GetMethodIxLocalsCount;
- JVM_GetMethodIxMaxStack;
- JVM_GetMethodIxModifiers;
- JVM_GetMethodIxNameUTF;
- JVM_GetMethodIxSignatureUTF;
- JVM_GetMethodParameters;
- JVM_GetMethodTypeAnnotations;
- JVM_GetNanoTimeAdjustment;
- JVM_GetPrimitiveArrayElement;
- JVM_GetProtectionDomain;
- JVM_GetStackAccessControlContext;
- JVM_GetStackTraceDepth;
- JVM_GetStackTraceElement;
- JVM_GetSystemPackage;
- JVM_GetSystemPackages;
- JVM_GetTemporaryDirectory;
- JVM_GetVersionInfo;
- JVM_Halt;
- JVM_HoldsLock;
- JVM_IHashCode;
- JVM_InitAgentProperties;
- JVM_InitProperties;
- JVM_InternString;
- JVM_Interrupt;
- JVM_InvokeMethod;
- JVM_IsArrayClass;
- JVM_IsConstructorIx;
- JVM_IsInterface;
- JVM_IsInterrupted;
- JVM_IsPrimitiveClass;
- JVM_IsSameClassPackage;
- JVM_IsSupportedJNIVersion;
- JVM_IsThreadAlive;
- JVM_IsVMGeneratedMethodIx;
- JVM_LatestUserDefinedLoader;
- JVM_LoadLibrary;
- JVM_MaxObjectInspectionAge;
- JVM_MaxMemory;
- JVM_MonitorNotify;
- JVM_MonitorNotifyAll;
- JVM_MonitorWait;
- JVM_NanoTime;
- JVM_NativePath;
- JVM_NewArray;
- JVM_NewInstanceFromConstructor;
- JVM_NewMultiArray;
- JVM_RaiseSignal;
- JVM_RawMonitorCreate;
- JVM_RawMonitorDestroy;
- JVM_RawMonitorEnter;
- JVM_RawMonitorExit;
- JVM_RegisterSignal;
- JVM_ReleaseUTF;
- JVM_ResumeThread;
- JVM_SetArrayElement;
- JVM_SetClassSigners;
- JVM_SetNativeThreadName;
- JVM_SetPrimitiveArrayElement;
- JVM_SetProtectionDomain;
- JVM_SetThreadPriority;
- JVM_Sleep;
- JVM_StartThread;
- JVM_StopThread;
- JVM_SuspendThread;
- JVM_SupportsCX8;
- JVM_TotalMemory;
- JVM_UnloadLibrary;
- JVM_Yield;
JVM_handle_linux_signal;
# debug JVM
--- a/hotspot/make/aix/makefiles/mapfile-vers-product Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/aix/makefiles/mapfile-vers-product Mon Oct 12 14:41:36 2015 -0700
@@ -26,167 +26,6 @@
SUNWprivate_1.1 {
global:
- # JNI
- JNI_CreateJavaVM;
- JNI_GetCreatedJavaVMs;
- JNI_GetDefaultJavaVMInitArgs;
-
- # JVM
- JVM_ActiveProcessorCount;
- JVM_ArrayCopy;
- JVM_AssertionStatusDirectives;
- JVM_ClassDepth;
- JVM_ClassLoaderDepth;
- JVM_Clone;
- JVM_ConstantPoolGetClassAt;
- JVM_ConstantPoolGetClassAtIfLoaded;
- JVM_ConstantPoolGetDoubleAt;
- JVM_ConstantPoolGetFieldAt;
- JVM_ConstantPoolGetFieldAtIfLoaded;
- JVM_ConstantPoolGetFloatAt;
- JVM_ConstantPoolGetIntAt;
- JVM_ConstantPoolGetLongAt;
- JVM_ConstantPoolGetMethodAt;
- JVM_ConstantPoolGetMethodAtIfLoaded;
- JVM_ConstantPoolGetMemberRefInfoAt;
- JVM_ConstantPoolGetSize;
- JVM_ConstantPoolGetStringAt;
- JVM_ConstantPoolGetUTF8At;
- JVM_CountStackFrames;
- JVM_CurrentClassLoader;
- JVM_CurrentLoadedClass;
- JVM_CurrentThread;
- JVM_CurrentTimeMillis;
- JVM_DefineClass;
- JVM_DefineClassWithSource;
- JVM_DefineClassWithSourceCond;
- JVM_DesiredAssertionStatus;
- JVM_DoPrivileged;
- JVM_DumpAllStacks;
- JVM_DumpThreads;
- JVM_FillInStackTrace;
- JVM_FindClassFromCaller;
- JVM_FindClassFromClass;
- JVM_FindClassFromBootLoader;
- JVM_FindLibraryEntry;
- JVM_FindLoadedClass;
- JVM_FindPrimitiveClass;
- JVM_FindSignal;
- JVM_FreeMemory;
- JVM_GC;
- JVM_GetAllThreads;
- JVM_GetArrayElement;
- JVM_GetArrayLength;
- JVM_GetCPClassNameUTF;
- JVM_GetCPFieldClassNameUTF;
- JVM_GetCPFieldModifiers;
- JVM_GetCPFieldNameUTF;
- JVM_GetCPFieldSignatureUTF;
- JVM_GetCPMethodClassNameUTF;
- JVM_GetCPMethodModifiers;
- JVM_GetCPMethodNameUTF;
- JVM_GetCPMethodSignatureUTF;
- JVM_GetCallerClass;
- JVM_GetClassAccessFlags;
- JVM_GetClassAnnotations;
- JVM_GetClassCPEntriesCount;
- JVM_GetClassCPTypes;
- JVM_GetClassConstantPool;
- JVM_GetClassContext;
- JVM_GetClassDeclaredConstructors;
- JVM_GetClassDeclaredFields;
- JVM_GetClassDeclaredMethods;
- JVM_GetClassFieldsCount;
- JVM_GetClassInterfaces;
- JVM_GetClassMethodsCount;
- JVM_GetClassModifiers;
- JVM_GetClassName;
- JVM_GetClassNameUTF;
- JVM_GetClassSignature;
- JVM_GetClassSigners;
- JVM_GetClassTypeAnnotations;
- JVM_GetDeclaredClasses;
- JVM_GetDeclaringClass;
- JVM_GetSimpleBinaryName;
- JVM_GetEnclosingMethodInfo;
- JVM_GetFieldIxModifiers;
- JVM_GetInheritedAccessControlContext;
- JVM_GetInterfaceVersion;
- JVM_GetManagement;
- JVM_GetMethodIxArgsSize;
- JVM_GetMethodIxByteCode;
- JVM_GetMethodIxByteCodeLength;
- JVM_GetMethodIxExceptionIndexes;
- JVM_GetMethodIxExceptionTableEntry;
- JVM_GetMethodIxExceptionTableLength;
- JVM_GetMethodIxExceptionsCount;
- JVM_GetMethodIxLocalsCount;
- JVM_GetMethodIxMaxStack;
- JVM_GetMethodIxModifiers;
- JVM_GetMethodIxNameUTF;
- JVM_GetMethodIxSignatureUTF;
- JVM_GetMethodParameters;
- JVM_GetNanoTimeAdjustment;
- JVM_GetPrimitiveArrayElement;
- JVM_GetProtectionDomain;
- JVM_GetStackAccessControlContext;
- JVM_GetStackTraceDepth;
- JVM_GetStackTraceElement;
- JVM_GetSystemPackage;
- JVM_GetSystemPackages;
- JVM_GetTemporaryDirectory;
- JVM_GetVersionInfo;
- JVM_Halt;
- JVM_HoldsLock;
- JVM_IHashCode;
- JVM_InitAgentProperties;
- JVM_InitProperties;
- JVM_InternString;
- JVM_Interrupt;
- JVM_InvokeMethod;
- JVM_IsArrayClass;
- JVM_IsConstructorIx;
- JVM_IsInterface;
- JVM_IsInterrupted;
- JVM_IsPrimitiveClass;
- JVM_IsSameClassPackage;
- JVM_IsSupportedJNIVersion;
- JVM_IsThreadAlive;
- JVM_IsVMGeneratedMethodIx;
- JVM_LatestUserDefinedLoader;
- JVM_LoadLibrary;
- JVM_MaxObjectInspectionAge;
- JVM_MaxMemory;
- JVM_MonitorNotify;
- JVM_MonitorNotifyAll;
- JVM_MonitorWait;
- JVM_NanoTime;
- JVM_NativePath;
- JVM_NewArray;
- JVM_NewInstanceFromConstructor;
- JVM_NewMultiArray;
- JVM_RaiseSignal;
- JVM_RawMonitorCreate;
- JVM_RawMonitorDestroy;
- JVM_RawMonitorEnter;
- JVM_RawMonitorExit;
- JVM_RegisterSignal;
- JVM_ReleaseUTF;
- JVM_ResumeThread;
- JVM_SetArrayElement;
- JVM_SetClassSigners;
- JVM_SetNativeThreadName;
- JVM_SetPrimitiveArrayElement;
- JVM_SetProtectionDomain;
- JVM_SetThreadPriority;
- JVM_Sleep;
- JVM_StartThread;
- JVM_StopThread;
- JVM_SuspendThread;
- JVM_SupportsCX8;
- JVM_TotalMemory;
- JVM_UnloadLibrary;
- JVM_Yield;
JVM_handle_linux_signal;
# miscellaneous functions
--- a/hotspot/make/aix/makefiles/vm.make Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/aix/makefiles/vm.make Mon Oct 12 14:41:36 2015 -0700
@@ -220,10 +220,12 @@
vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
-mapfile : $(MAPFILE) vm.def
+MAPFILE_SHARE := $(GAMMADIR)/make/share/makefiles/mapfile-vers
+
+mapfile : $(MAPFILE) $(MAPFILE_SHARE) vm.def
rm -f $@
awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") \
- { system ("cat vm.def"); } \
+ { system ("cat ${MAPFILE_SHARE} vm.def"); } \
else \
{ print $$0 } \
}' > $@ < $(MAPFILE)
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug Mon Oct 12 14:41:36 2015 -0700
@@ -24,171 +24,9 @@
# Only used for OSX/Darwin builds
# Define public interface.
- # _JNI
- _JNI_CreateJavaVM
- _JNI_GetCreatedJavaVMs
- _JNI_GetDefaultJavaVMInitArgs
-
- # _JVM
- _JVM_ActiveProcessorCount
- _JVM_ArrayCopy
- _JVM_AssertionStatusDirectives
- _JVM_ClassDepth
- _JVM_ClassLoaderDepth
- _JVM_Clone
- _JVM_ConstantPoolGetClassAt
- _JVM_ConstantPoolGetClassAtIfLoaded
- _JVM_ConstantPoolGetDoubleAt
- _JVM_ConstantPoolGetFieldAt
- _JVM_ConstantPoolGetFieldAtIfLoaded
- _JVM_ConstantPoolGetFloatAt
- _JVM_ConstantPoolGetIntAt
- _JVM_ConstantPoolGetLongAt
- _JVM_ConstantPoolGetMethodAt
- _JVM_ConstantPoolGetMethodAtIfLoaded
- _JVM_ConstantPoolGetMemberRefInfoAt
- _JVM_ConstantPoolGetSize
- _JVM_ConstantPoolGetStringAt
- _JVM_ConstantPoolGetUTF8At
- _JVM_CountStackFrames
- _JVM_CurrentClassLoader
- _JVM_CurrentLoadedClass
- _JVM_CurrentThread
- _JVM_CurrentTimeMillis
- _JVM_DefineClass
- _JVM_DefineClassWithSource
- _JVM_DefineClassWithSourceCond
- _JVM_DesiredAssertionStatus
- _JVM_DoPrivileged
- _JVM_DumpAllStacks
- _JVM_DumpThreads
- _JVM_FillInStackTrace
- _JVM_FindClassFromCaller
- _JVM_FindClassFromClass
- _JVM_FindClassFromBootLoader
- _JVM_FindLibraryEntry
- _JVM_FindLoadedClass
- _JVM_FindPrimitiveClass
- _JVM_FindSignal
- _JVM_FreeMemory
- _JVM_GC
- _JVM_GetAllThreads
- _JVM_GetArrayElement
- _JVM_GetArrayLength
- _JVM_GetCPClassNameUTF
- _JVM_GetCPFieldClassNameUTF
- _JVM_GetCPFieldModifiers
- _JVM_GetCPFieldNameUTF
- _JVM_GetCPFieldSignatureUTF
- _JVM_GetCPMethodClassNameUTF
- _JVM_GetCPMethodModifiers
- _JVM_GetCPMethodNameUTF
- _JVM_GetCPMethodSignatureUTF
- _JVM_GetCallerClass
- _JVM_GetClassAccessFlags
- _JVM_GetClassAnnotations
- _JVM_GetClassCPEntriesCount
- _JVM_GetClassCPTypes
- _JVM_GetClassConstantPool
- _JVM_GetClassContext
- _JVM_GetClassDeclaredConstructors
- _JVM_GetClassDeclaredFields
- _JVM_GetClassDeclaredMethods
- _JVM_GetClassFieldsCount
- _JVM_GetClassInterfaces
- _JVM_GetClassMethodsCount
- _JVM_GetClassModifiers
- _JVM_GetClassName
- _JVM_GetClassNameUTF
- _JVM_GetClassSignature
- _JVM_GetClassSigners
- _JVM_GetClassTypeAnnotations
- _JVM_GetDeclaredClasses
- _JVM_GetDeclaringClass
- _JVM_GetSimpleBinaryName
- _JVM_GetEnclosingMethodInfo
- _JVM_GetFieldIxModifiers
- _JVM_GetFieldTypeAnnotations
- _JVM_GetInheritedAccessControlContext
- _JVM_GetInterfaceVersion
- _JVM_GetManagement
- _JVM_GetMethodIxArgsSize
- _JVM_GetMethodIxByteCode
- _JVM_GetMethodIxByteCodeLength
- _JVM_GetMethodIxExceptionIndexes
- _JVM_GetMethodIxExceptionTableEntry
- _JVM_GetMethodIxExceptionTableLength
- _JVM_GetMethodIxExceptionsCount
- _JVM_GetMethodIxLocalsCount
- _JVM_GetMethodIxMaxStack
- _JVM_GetMethodIxModifiers
- _JVM_GetMethodIxNameUTF
- _JVM_GetMethodIxSignatureUTF
- _JVM_GetMethodParameters
- _JVM_GetMethodTypeAnnotations
- _JVM_GetNanoTimeAdjustment
- _JVM_GetPrimitiveArrayElement
- _JVM_GetProtectionDomain
- _JVM_GetStackAccessControlContext
- _JVM_GetStackTraceDepth
- _JVM_GetStackTraceElement
- _JVM_GetSystemPackage
- _JVM_GetSystemPackages
- _JVM_GetTemporaryDirectory
- _JVM_GetVersionInfo
- _JVM_Halt
- _JVM_HoldsLock
- _JVM_IHashCode
- _JVM_InitAgentProperties
- _JVM_InitProperties
- _JVM_InternString
- _JVM_Interrupt
- _JVM_InvokeMethod
- _JVM_IsArrayClass
- _JVM_IsConstructorIx
- _JVM_IsInterface
- _JVM_IsInterrupted
- _JVM_IsPrimitiveClass
- _JVM_IsSameClassPackage
- _JVM_IsSupportedJNIVersion
- _JVM_IsThreadAlive
- _JVM_IsVMGeneratedMethodIx
- _JVM_LatestUserDefinedLoader
- _JVM_LoadLibrary
- _JVM_MaxObjectInspectionAge
- _JVM_MaxMemory
- _JVM_MonitorNotify
- _JVM_MonitorNotifyAll
- _JVM_MonitorWait
- _JVM_NanoTime
- _JVM_NativePath
- _JVM_NewArray
- _JVM_NewInstanceFromConstructor
- _JVM_NewMultiArray
- _JVM_RaiseSignal
- _JVM_RawMonitorCreate
- _JVM_RawMonitorDestroy
- _JVM_RawMonitorEnter
- _JVM_RawMonitorExit
- _JVM_RegisterSignal
- _JVM_ReleaseUTF
- _JVM_ResumeThread
- _JVM_SetArrayElement
- _JVM_SetClassSigners
- _JVM_SetNativeThreadName
- _JVM_SetPrimitiveArrayElement
- _JVM_SetThreadPriority
- _JVM_Sleep
- _JVM_StartThread
- _JVM_StopThread
- _JVM_SuspendThread
- _JVM_SupportsCX8
- _JVM_TotalMemory
- _JVM_UnloadLibrary
- _JVM_Yield
_JVM_handle_bsd_signal
- # miscellaneous functions
+ # miscellaneous functions
_jio_fprintf
_jio_printf
_jio_snprintf
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product Mon Oct 12 14:41:36 2015 -0700
@@ -24,168 +24,6 @@
# Only used for OSX/Darwin builds
# Define public interface.
- # _JNI
- _JNI_CreateJavaVM
- _JNI_GetCreatedJavaVMs
- _JNI_GetDefaultJavaVMInitArgs
-
- # _JVM
- _JVM_ActiveProcessorCount
- _JVM_ArrayCopy
- _JVM_AssertionStatusDirectives
- _JVM_ClassDepth
- _JVM_ClassLoaderDepth
- _JVM_Clone
- _JVM_ConstantPoolGetClassAt
- _JVM_ConstantPoolGetClassAtIfLoaded
- _JVM_ConstantPoolGetDoubleAt
- _JVM_ConstantPoolGetFieldAt
- _JVM_ConstantPoolGetFieldAtIfLoaded
- _JVM_ConstantPoolGetFloatAt
- _JVM_ConstantPoolGetIntAt
- _JVM_ConstantPoolGetLongAt
- _JVM_ConstantPoolGetMethodAt
- _JVM_ConstantPoolGetMethodAtIfLoaded
- _JVM_ConstantPoolGetMemberRefInfoAt
- _JVM_ConstantPoolGetSize
- _JVM_ConstantPoolGetStringAt
- _JVM_ConstantPoolGetUTF8At
- _JVM_CountStackFrames
- _JVM_CurrentClassLoader
- _JVM_CurrentLoadedClass
- _JVM_CurrentThread
- _JVM_CurrentTimeMillis
- _JVM_DefineClass
- _JVM_DefineClassWithSource
- _JVM_DefineClassWithSourceCond
- _JVM_DesiredAssertionStatus
- _JVM_DoPrivileged
- _JVM_DumpAllStacks
- _JVM_DumpThreads
- _JVM_FillInStackTrace
- _JVM_FindClassFromCaller
- _JVM_FindClassFromClass
- _JVM_FindClassFromBootLoader
- _JVM_FindLibraryEntry
- _JVM_FindLoadedClass
- _JVM_FindPrimitiveClass
- _JVM_FindSignal
- _JVM_FreeMemory
- _JVM_GC
- _JVM_GetAllThreads
- _JVM_GetArrayElement
- _JVM_GetArrayLength
- _JVM_GetCPClassNameUTF
- _JVM_GetCPFieldClassNameUTF
- _JVM_GetCPFieldModifiers
- _JVM_GetCPFieldNameUTF
- _JVM_GetCPFieldSignatureUTF
- _JVM_GetCPMethodClassNameUTF
- _JVM_GetCPMethodModifiers
- _JVM_GetCPMethodNameUTF
- _JVM_GetCPMethodSignatureUTF
- _JVM_GetCallerClass
- _JVM_GetClassAccessFlags
- _JVM_GetClassAnnotations
- _JVM_GetClassCPEntriesCount
- _JVM_GetClassCPTypes
- _JVM_GetClassConstantPool
- _JVM_GetClassContext
- _JVM_GetClassDeclaredConstructors
- _JVM_GetClassDeclaredFields
- _JVM_GetClassDeclaredMethods
- _JVM_GetClassFieldsCount
- _JVM_GetClassInterfaces
- _JVM_GetClassMethodsCount
- _JVM_GetClassModifiers
- _JVM_GetClassName
- _JVM_GetClassNameUTF
- _JVM_GetClassSignature
- _JVM_GetClassSigners
- _JVM_GetClassTypeAnnotations
- _JVM_GetDeclaredClasses
- _JVM_GetDeclaringClass
- _JVM_GetSimpleBinaryName
- _JVM_GetEnclosingMethodInfo
- _JVM_GetFieldIxModifiers
- _JVM_GetFieldTypeAnnotations
- _JVM_GetInheritedAccessControlContext
- _JVM_GetInterfaceVersion
- _JVM_GetManagement
- _JVM_GetMethodIxArgsSize
- _JVM_GetMethodIxByteCode
- _JVM_GetMethodIxByteCodeLength
- _JVM_GetMethodIxExceptionIndexes
- _JVM_GetMethodIxExceptionTableEntry
- _JVM_GetMethodIxExceptionTableLength
- _JVM_GetMethodIxExceptionsCount
- _JVM_GetMethodIxLocalsCount
- _JVM_GetMethodIxMaxStack
- _JVM_GetMethodIxModifiers
- _JVM_GetMethodIxNameUTF
- _JVM_GetMethodIxSignatureUTF
- _JVM_GetMethodParameters
- _JVM_GetMethodTypeAnnotations
- _JVM_GetNanoTimeAdjustment
- _JVM_GetPrimitiveArrayElement
- _JVM_GetProtectionDomain
- _JVM_GetStackAccessControlContext
- _JVM_GetStackTraceDepth
- _JVM_GetStackTraceElement
- _JVM_GetSystemPackage
- _JVM_GetSystemPackages
- _JVM_GetTemporaryDirectory
- _JVM_GetVersionInfo
- _JVM_Halt
- _JVM_HoldsLock
- _JVM_IHashCode
- _JVM_InitAgentProperties
- _JVM_InitProperties
- _JVM_InternString
- _JVM_Interrupt
- _JVM_InvokeMethod
- _JVM_IsArrayClass
- _JVM_IsConstructorIx
- _JVM_IsInterface
- _JVM_IsInterrupted
- _JVM_IsPrimitiveClass
- _JVM_IsSameClassPackage
- _JVM_IsSupportedJNIVersion
- _JVM_IsThreadAlive
- _JVM_IsVMGeneratedMethodIx
- _JVM_LatestUserDefinedLoader
- _JVM_LoadLibrary
- _JVM_MaxObjectInspectionAge
- _JVM_MaxMemory
- _JVM_MonitorNotify
- _JVM_MonitorNotifyAll
- _JVM_MonitorWait
- _JVM_NanoTime
- _JVM_NativePath
- _JVM_NewArray
- _JVM_NewInstanceFromConstructor
- _JVM_NewMultiArray
- _JVM_RaiseSignal
- _JVM_RawMonitorCreate
- _JVM_RawMonitorDestroy
- _JVM_RawMonitorEnter
- _JVM_RawMonitorExit
- _JVM_RegisterSignal
- _JVM_ReleaseUTF
- _JVM_ResumeThread
- _JVM_SetArrayElement
- _JVM_SetClassSigners
- _JVM_SetNativeThreadName
- _JVM_SetPrimitiveArrayElement
- _JVM_SetThreadPriority
- _JVM_Sleep
- _JVM_StartThread
- _JVM_StopThread
- _JVM_SuspendThread
- _JVM_SupportsCX8
- _JVM_TotalMemory
- _JVM_UnloadLibrary
- _JVM_Yield
_JVM_handle_bsd_signal
# miscellaneous functions
--- a/hotspot/make/bsd/makefiles/mapfile-vers-debug Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-debug Mon Oct 12 14:41:36 2015 -0700
@@ -26,168 +26,6 @@
SUNWprivate_1.1 {
global:
- # JNI
- JNI_CreateJavaVM;
- JNI_GetCreatedJavaVMs;
- JNI_GetDefaultJavaVMInitArgs;
-
- # JVM
- JVM_ActiveProcessorCount;
- JVM_ArrayCopy;
- JVM_AssertionStatusDirectives;
- JVM_ClassDepth;
- JVM_ClassLoaderDepth;
- JVM_Clone;
- JVM_ConstantPoolGetClassAt;
- JVM_ConstantPoolGetClassAtIfLoaded;
- JVM_ConstantPoolGetDoubleAt;
- JVM_ConstantPoolGetFieldAt;
- JVM_ConstantPoolGetFieldAtIfLoaded;
- JVM_ConstantPoolGetFloatAt;
- JVM_ConstantPoolGetIntAt;
- JVM_ConstantPoolGetLongAt;
- JVM_ConstantPoolGetMethodAt;
- JVM_ConstantPoolGetMethodAtIfLoaded;
- JVM_ConstantPoolGetMemberRefInfoAt;
- JVM_ConstantPoolGetSize;
- JVM_ConstantPoolGetStringAt;
- JVM_ConstantPoolGetUTF8At;
- JVM_CountStackFrames;
- JVM_CurrentClassLoader;
- JVM_CurrentLoadedClass;
- JVM_CurrentThread;
- JVM_CurrentTimeMillis;
- JVM_DefineClass;
- JVM_DefineClassWithSource;
- JVM_DefineClassWithSourceCond;
- JVM_DesiredAssertionStatus;
- JVM_DoPrivileged;
- JVM_DumpAllStacks;
- JVM_DumpThreads;
- JVM_FillInStackTrace;
- JVM_FindClassFromCaller;
- JVM_FindClassFromClass;
- JVM_FindClassFromBootLoader;
- JVM_FindLibraryEntry;
- JVM_FindLoadedClass;
- JVM_FindPrimitiveClass;
- JVM_FindSignal;
- JVM_FreeMemory;
- JVM_GC;
- JVM_GetAllThreads;
- JVM_GetArrayElement;
- JVM_GetArrayLength;
- JVM_GetCPClassNameUTF;
- JVM_GetCPFieldClassNameUTF;
- JVM_GetCPFieldModifiers;
- JVM_GetCPFieldNameUTF;
- JVM_GetCPFieldSignatureUTF;
- JVM_GetCPMethodClassNameUTF;
- JVM_GetCPMethodModifiers;
- JVM_GetCPMethodNameUTF;
- JVM_GetCPMethodSignatureUTF;
- JVM_GetCallerClass;
- JVM_GetClassAccessFlags;
- JVM_GetClassAnnotations;
- JVM_GetClassCPEntriesCount;
- JVM_GetClassCPTypes;
- JVM_GetClassConstantPool;
- JVM_GetClassContext;
- JVM_GetClassDeclaredConstructors;
- JVM_GetClassDeclaredFields;
- JVM_GetClassDeclaredMethods;
- JVM_GetClassFieldsCount;
- JVM_GetClassInterfaces;
- JVM_GetClassMethodsCount;
- JVM_GetClassModifiers;
- JVM_GetClassName;
- JVM_GetClassNameUTF;
- JVM_GetClassSignature;
- JVM_GetClassSigners;
- JVM_GetClassTypeAnnotations;
- JVM_GetDeclaredClasses;
- JVM_GetDeclaringClass;
- JVM_GetSimpleBinaryName;
- JVM_GetEnclosingMethodInfo;
- JVM_GetFieldIxModifiers;
- JVM_GetFieldTypeAnnotations;
- JVM_GetInheritedAccessControlContext;
- JVM_GetInterfaceVersion;
- JVM_GetManagement;
- JVM_GetMethodIxArgsSize;
- JVM_GetMethodIxByteCode;
- JVM_GetMethodIxByteCodeLength;
- JVM_GetMethodIxExceptionIndexes;
- JVM_GetMethodIxExceptionTableEntry;
- JVM_GetMethodIxExceptionTableLength;
- JVM_GetMethodIxExceptionsCount;
- JVM_GetMethodIxLocalsCount;
- JVM_GetMethodIxMaxStack;
- JVM_GetMethodIxModifiers;
- JVM_GetMethodIxNameUTF;
- JVM_GetMethodIxSignatureUTF;
- JVM_GetMethodParameters;
- JVM_GetMethodTypeAnnotations;
- JVM_GetNanoTimeAdjustment;
- JVM_GetPrimitiveArrayElement;
- JVM_GetProtectionDomain;
- JVM_GetStackAccessControlContext;
- JVM_GetStackTraceDepth;
- JVM_GetStackTraceElement;
- JVM_GetSystemPackage;
- JVM_GetSystemPackages;
- JVM_GetTemporaryDirectory;
- JVM_GetVersionInfo;
- JVM_Halt;
- JVM_HoldsLock;
- JVM_IHashCode;
- JVM_InitAgentProperties;
- JVM_InitProperties;
- JVM_InternString;
- JVM_Interrupt;
- JVM_InvokeMethod;
- JVM_IsArrayClass;
- JVM_IsConstructorIx;
- JVM_IsInterface;
- JVM_IsInterrupted;
- JVM_IsPrimitiveClass;
- JVM_IsSameClassPackage;
- JVM_IsSupportedJNIVersion;
- JVM_IsThreadAlive;
- JVM_IsVMGeneratedMethodIx;
- JVM_LatestUserDefinedLoader;
- JVM_LoadLibrary;
- JVM_MaxObjectInspectionAge;
- JVM_MaxMemory;
- JVM_MonitorNotify;
- JVM_MonitorNotifyAll;
- JVM_MonitorWait;
- JVM_NanoTime;
- JVM_NativePath;
- JVM_NewArray;
- JVM_NewInstanceFromConstructor;
- JVM_NewMultiArray;
- JVM_RaiseSignal;
- JVM_RawMonitorCreate;
- JVM_RawMonitorDestroy;
- JVM_RawMonitorEnter;
- JVM_RawMonitorExit;
- JVM_RegisterSignal;
- JVM_ReleaseUTF;
- JVM_ResumeThread;
- JVM_SetArrayElement;
- JVM_SetClassSigners;
- JVM_SetNativeThreadName;
- JVM_SetPrimitiveArrayElement;
- JVM_SetThreadPriority;
- JVM_Sleep;
- JVM_StartThread;
- JVM_StopThread;
- JVM_SuspendThread;
- JVM_SupportsCX8;
- JVM_TotalMemory;
- JVM_UnloadLibrary;
- JVM_Yield;
JVM_handle_linux_signal;
# miscellaneous functions
--- a/hotspot/make/bsd/makefiles/mapfile-vers-product Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-product Mon Oct 12 14:41:36 2015 -0700
@@ -26,168 +26,6 @@
SUNWprivate_1.1 {
global:
- # JNI
- JNI_CreateJavaVM;
- JNI_GetCreatedJavaVMs;
- JNI_GetDefaultJavaVMInitArgs;
-
- # JVM
- JVM_ActiveProcessorCount;
- JVM_ArrayCopy;
- JVM_AssertionStatusDirectives;
- JVM_ClassDepth;
- JVM_ClassLoaderDepth;
- JVM_Clone;
- JVM_ConstantPoolGetClassAt;
- JVM_ConstantPoolGetClassAtIfLoaded;
- JVM_ConstantPoolGetDoubleAt;
- JVM_ConstantPoolGetFieldAt;
- JVM_ConstantPoolGetFieldAtIfLoaded;
- JVM_ConstantPoolGetFloatAt;
- JVM_ConstantPoolGetIntAt;
- JVM_ConstantPoolGetLongAt;
- JVM_ConstantPoolGetMethodAt;
- JVM_ConstantPoolGetMethodAtIfLoaded;
- JVM_ConstantPoolGetMemberRefInfoAt;
- JVM_ConstantPoolGetSize;
- JVM_ConstantPoolGetStringAt;
- JVM_ConstantPoolGetUTF8At;
- JVM_CountStackFrames;
- JVM_CurrentClassLoader;
- JVM_CurrentLoadedClass;
- JVM_CurrentThread;
- JVM_CurrentTimeMillis;
- JVM_DefineClass;
- JVM_DefineClassWithSource;
- JVM_DefineClassWithSourceCond;
- JVM_DesiredAssertionStatus;
- JVM_DoPrivileged;
- JVM_DumpAllStacks;
- JVM_DumpThreads;
- JVM_FillInStackTrace;
- JVM_FindClassFromCaller;
- JVM_FindClassFromClass;
- JVM_FindClassFromBootLoader;
- JVM_FindLibraryEntry;
- JVM_FindLoadedClass;
- JVM_FindPrimitiveClass;
- JVM_FindSignal;
- JVM_FreeMemory;
- JVM_GC;
- JVM_GetAllThreads;
- JVM_GetArrayElement;
- JVM_GetArrayLength;
- JVM_GetCPClassNameUTF;
- JVM_GetCPFieldClassNameUTF;
- JVM_GetCPFieldModifiers;
- JVM_GetCPFieldNameUTF;
- JVM_GetCPFieldSignatureUTF;
- JVM_GetCPMethodClassNameUTF;
- JVM_GetCPMethodModifiers;
- JVM_GetCPMethodNameUTF;
- JVM_GetCPMethodSignatureUTF;
- JVM_GetCallerClass;
- JVM_GetClassAccessFlags;
- JVM_GetClassAnnotations;
- JVM_GetClassCPEntriesCount;
- JVM_GetClassCPTypes;
- JVM_GetClassConstantPool;
- JVM_GetClassContext;
- JVM_GetClassDeclaredConstructors;
- JVM_GetClassDeclaredFields;
- JVM_GetClassDeclaredMethods;
- JVM_GetClassFieldsCount;
- JVM_GetClassInterfaces;
- JVM_GetClassMethodsCount;
- JVM_GetClassModifiers;
- JVM_GetClassName;
- JVM_GetClassNameUTF;
- JVM_GetClassSignature;
- JVM_GetClassSigners;
- JVM_GetClassTypeAnnotations;
- JVM_GetDeclaredClasses;
- JVM_GetDeclaringClass;
- JVM_GetSimpleBinaryName;
- JVM_GetEnclosingMethodInfo;
- JVM_GetFieldIxModifiers;
- JVM_GetFieldTypeAnnotations;
- JVM_GetInheritedAccessControlContext;
- JVM_GetInterfaceVersion;
- JVM_GetManagement;
- JVM_GetMethodIxArgsSize;
- JVM_GetMethodIxByteCode;
- JVM_GetMethodIxByteCodeLength;
- JVM_GetMethodIxExceptionIndexes;
- JVM_GetMethodIxExceptionTableEntry;
- JVM_GetMethodIxExceptionTableLength;
- JVM_GetMethodIxExceptionsCount;
- JVM_GetMethodIxLocalsCount;
- JVM_GetMethodIxMaxStack;
- JVM_GetMethodIxModifiers;
- JVM_GetMethodIxNameUTF;
- JVM_GetMethodIxSignatureUTF;
- JVM_GetMethodParameters;
- JVM_GetMethodTypeAnnotations;
- JVM_GetNanoTimeAdjustment;
- JVM_GetPrimitiveArrayElement;
- JVM_GetProtectionDomain;
- JVM_GetStackAccessControlContext;
- JVM_GetStackTraceDepth;
- JVM_GetStackTraceElement;
- JVM_GetSystemPackage;
- JVM_GetSystemPackages;
- JVM_GetTemporaryDirectory;
- JVM_GetVersionInfo;
- JVM_Halt;
- JVM_HoldsLock;
- JVM_IHashCode;
- JVM_InitAgentProperties;
- JVM_InitProperties;
- JVM_InternString;
- JVM_Interrupt;
- JVM_InvokeMethod;
- JVM_IsArrayClass;
- JVM_IsConstructorIx;
- JVM_IsInterface;
- JVM_IsInterrupted;
- JVM_IsPrimitiveClass;
- JVM_IsSameClassPackage;
- JVM_IsSupportedJNIVersion;
- JVM_IsThreadAlive;
- JVM_IsVMGeneratedMethodIx;
- JVM_LatestUserDefinedLoader;
- JVM_LoadLibrary;
- JVM_MaxObjectInspectionAge;
- JVM_MaxMemory;
- JVM_MonitorNotify;
- JVM_MonitorNotifyAll;
- JVM_MonitorWait;
- JVM_NanoTime;
- JVM_NativePath;
- JVM_NewArray;
- JVM_NewInstanceFromConstructor;
- JVM_NewMultiArray;
- JVM_RaiseSignal;
- JVM_RawMonitorCreate;
- JVM_RawMonitorDestroy;
- JVM_RawMonitorEnter;
- JVM_RawMonitorExit;
- JVM_RegisterSignal;
- JVM_ReleaseUTF;
- JVM_ResumeThread;
- JVM_SetArrayElement;
- JVM_SetClassSigners;
- JVM_SetNativeThreadName;
- JVM_SetPrimitiveArrayElement;
- JVM_SetThreadPriority;
- JVM_Sleep;
- JVM_StartThread;
- JVM_StopThread;
- JVM_SuspendThread;
- JVM_SupportsCX8;
- JVM_TotalMemory;
- JVM_UnloadLibrary;
- JVM_Yield;
JVM_handle_linux_signal;
# miscellaneous functions
--- a/hotspot/make/bsd/makefiles/vm.make Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/bsd/makefiles/vm.make Mon Oct 12 14:41:36 2015 -0700
@@ -234,10 +234,29 @@
vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
-mapfile : $(MAPFILE) vm.def mapfile_ext
+MAPFILE_SHARE := $(GAMMADIR)/make/share/makefiles/mapfile-vers
+
+MAPFILE_EXT_SRC := $(HS_ALT_MAKE)/share/makefiles/mapfile-ext
+ifneq ("$(wildcard $(MAPFILE_EXT_SRC))","")
+MAPFILE_EXT := $(MAPFILE_EXT_SRC)
+endif
+
+# For Darwin: add _ prefix and remove trailing ;
+mapfile_extra: $(MAPFILE_SHARE) $(MAPFILE_EXT)
+ rm -f $@
+ifeq ($(OS_VENDOR), Darwin)
+ cat $(MAPFILE_SHARE) $(MAPFILE_EXT) | \
+ sed -e 's/#.*//g' -e 's/[ ]*//g' -e 's/;//g' | \
+ awk '{ if ($$0 ~ ".") { print "\t\t_" $$0 } }' \
+ > $@
+else
+ cat $(MAPFILE_SHARE) $(MAPFILE_EXT) > $@
+endif
+
+mapfile : $(MAPFILE) mapfile_extra vm.def
rm -f $@
awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") \
- { system ("cat mapfile_ext"); system ("cat vm.def"); } \
+ { system ("cat mapfile_extra vm.def"); } \
else \
{ print $$0 } \
}' > $@ < $(MAPFILE)
--- a/hotspot/make/linux/makefiles/mapfile-vers-debug Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/linux/makefiles/mapfile-vers-debug Mon Oct 12 14:41:36 2015 -0700
@@ -26,168 +26,6 @@
SUNWprivate_1.1 {
global:
- # JNI
- JNI_CreateJavaVM;
- JNI_GetCreatedJavaVMs;
- JNI_GetDefaultJavaVMInitArgs;
-
- # JVM
- JVM_ActiveProcessorCount;
- JVM_ArrayCopy;
- JVM_AssertionStatusDirectives;
- JVM_ClassDepth;
- JVM_ClassLoaderDepth;
- JVM_Clone;
- JVM_ConstantPoolGetClassAt;
- JVM_ConstantPoolGetClassAtIfLoaded;
- JVM_ConstantPoolGetDoubleAt;
- JVM_ConstantPoolGetFieldAt;
- JVM_ConstantPoolGetFieldAtIfLoaded;
- JVM_ConstantPoolGetFloatAt;
- JVM_ConstantPoolGetIntAt;
- JVM_ConstantPoolGetLongAt;
- JVM_ConstantPoolGetMethodAt;
- JVM_ConstantPoolGetMethodAtIfLoaded;
- JVM_ConstantPoolGetMemberRefInfoAt;
- JVM_ConstantPoolGetSize;
- JVM_ConstantPoolGetStringAt;
- JVM_ConstantPoolGetUTF8At;
- JVM_CountStackFrames;
- JVM_CurrentClassLoader;
- JVM_CurrentLoadedClass;
- JVM_CurrentThread;
- JVM_CurrentTimeMillis;
- JVM_DefineClass;
- JVM_DefineClassWithSource;
- JVM_DefineClassWithSourceCond;
- JVM_DesiredAssertionStatus;
- JVM_DoPrivileged;
- JVM_DumpAllStacks;
- JVM_DumpThreads;
- JVM_FillInStackTrace;
- JVM_FindClassFromCaller;
- JVM_FindClassFromClass;
- JVM_FindClassFromBootLoader;
- JVM_FindLibraryEntry;
- JVM_FindLoadedClass;
- JVM_FindPrimitiveClass;
- JVM_FindSignal;
- JVM_FreeMemory;
- JVM_GC;
- JVM_GetAllThreads;
- JVM_GetArrayElement;
- JVM_GetArrayLength;
- JVM_GetCPClassNameUTF;
- JVM_GetCPFieldClassNameUTF;
- JVM_GetCPFieldModifiers;
- JVM_GetCPFieldNameUTF;
- JVM_GetCPFieldSignatureUTF;
- JVM_GetCPMethodClassNameUTF;
- JVM_GetCPMethodModifiers;
- JVM_GetCPMethodNameUTF;
- JVM_GetCPMethodSignatureUTF;
- JVM_GetCallerClass;
- JVM_GetClassAccessFlags;
- JVM_GetClassAnnotations;
- JVM_GetClassCPEntriesCount;
- JVM_GetClassCPTypes;
- JVM_GetClassConstantPool;
- JVM_GetClassContext;
- JVM_GetClassDeclaredConstructors;
- JVM_GetClassDeclaredFields;
- JVM_GetClassDeclaredMethods;
- JVM_GetClassFieldsCount;
- JVM_GetClassInterfaces;
- JVM_GetClassMethodsCount;
- JVM_GetClassModifiers;
- JVM_GetClassName;
- JVM_GetClassNameUTF;
- JVM_GetClassSignature;
- JVM_GetClassSigners;
- JVM_GetClassTypeAnnotations;
- JVM_GetDeclaredClasses;
- JVM_GetDeclaringClass;
- JVM_GetSimpleBinaryName;
- JVM_GetEnclosingMethodInfo;
- JVM_GetFieldIxModifiers;
- JVM_GetFieldTypeAnnotations;
- JVM_GetInheritedAccessControlContext;
- JVM_GetInterfaceVersion;
- JVM_GetManagement;
- JVM_GetMethodIxArgsSize;
- JVM_GetMethodIxByteCode;
- JVM_GetMethodIxByteCodeLength;
- JVM_GetMethodIxExceptionIndexes;
- JVM_GetMethodIxExceptionTableEntry;
- JVM_GetMethodIxExceptionTableLength;
- JVM_GetMethodIxExceptionsCount;
- JVM_GetMethodIxLocalsCount;
- JVM_GetMethodIxMaxStack;
- JVM_GetMethodIxModifiers;
- JVM_GetMethodIxNameUTF;
- JVM_GetMethodIxSignatureUTF;
- JVM_GetMethodParameters;
- JVM_GetMethodTypeAnnotations;
- JVM_GetNanoTimeAdjustment;
- JVM_GetPrimitiveArrayElement;
- JVM_GetProtectionDomain;
- JVM_GetStackAccessControlContext;
- JVM_GetStackTraceDepth;
- JVM_GetStackTraceElement;
- JVM_GetSystemPackage;
- JVM_GetSystemPackages;
- JVM_GetTemporaryDirectory;
- JVM_GetVersionInfo;
- JVM_Halt;
- JVM_HoldsLock;
- JVM_IHashCode;
- JVM_InitAgentProperties;
- JVM_InitProperties;
- JVM_InternString;
- JVM_Interrupt;
- JVM_InvokeMethod;
- JVM_IsArrayClass;
- JVM_IsConstructorIx;
- JVM_IsInterface;
- JVM_IsInterrupted;
- JVM_IsPrimitiveClass;
- JVM_IsSameClassPackage;
- JVM_IsSupportedJNIVersion;
- JVM_IsThreadAlive;
- JVM_IsVMGeneratedMethodIx;
- JVM_LatestUserDefinedLoader;
- JVM_LoadLibrary;
- JVM_MaxObjectInspectionAge;
- JVM_MaxMemory;
- JVM_MonitorNotify;
- JVM_MonitorNotifyAll;
- JVM_MonitorWait;
- JVM_NanoTime;
- JVM_NativePath;
- JVM_NewArray;
- JVM_NewInstanceFromConstructor;
- JVM_NewMultiArray;
- JVM_RaiseSignal;
- JVM_RawMonitorCreate;
- JVM_RawMonitorDestroy;
- JVM_RawMonitorEnter;
- JVM_RawMonitorExit;
- JVM_RegisterSignal;
- JVM_ReleaseUTF;
- JVM_ResumeThread;
- JVM_SetArrayElement;
- JVM_SetClassSigners;
- JVM_SetNativeThreadName;
- JVM_SetPrimitiveArrayElement;
- JVM_SetThreadPriority;
- JVM_Sleep;
- JVM_StartThread;
- JVM_StopThread;
- JVM_SuspendThread;
- JVM_SupportsCX8;
- JVM_TotalMemory;
- JVM_UnloadLibrary;
- JVM_Yield;
JVM_handle_linux_signal;
# miscellaneous functions
--- a/hotspot/make/linux/makefiles/mapfile-vers-product Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/linux/makefiles/mapfile-vers-product Mon Oct 12 14:41:36 2015 -0700
@@ -26,168 +26,6 @@
SUNWprivate_1.1 {
global:
- # JNI
- JNI_CreateJavaVM;
- JNI_GetCreatedJavaVMs;
- JNI_GetDefaultJavaVMInitArgs;
-
- # JVM
- JVM_ActiveProcessorCount;
- JVM_ArrayCopy;
- JVM_AssertionStatusDirectives;
- JVM_ClassDepth;
- JVM_ClassLoaderDepth;
- JVM_Clone;
- JVM_ConstantPoolGetClassAt;
- JVM_ConstantPoolGetClassAtIfLoaded;
- JVM_ConstantPoolGetDoubleAt;
- JVM_ConstantPoolGetFieldAt;
- JVM_ConstantPoolGetFieldAtIfLoaded;
- JVM_ConstantPoolGetFloatAt;
- JVM_ConstantPoolGetIntAt;
- JVM_ConstantPoolGetLongAt;
- JVM_ConstantPoolGetMethodAt;
- JVM_ConstantPoolGetMethodAtIfLoaded;
- JVM_ConstantPoolGetMemberRefInfoAt;
- JVM_ConstantPoolGetSize;
- JVM_ConstantPoolGetStringAt;
- JVM_ConstantPoolGetUTF8At;
- JVM_CountStackFrames;
- JVM_CurrentClassLoader;
- JVM_CurrentLoadedClass;
- JVM_CurrentThread;
- JVM_CurrentTimeMillis;
- JVM_DefineClass;
- JVM_DefineClassWithSource;
- JVM_DefineClassWithSourceCond;
- JVM_DesiredAssertionStatus;
- JVM_DoPrivileged;
- JVM_DumpAllStacks;
- JVM_DumpThreads;
- JVM_FillInStackTrace;
- JVM_FindClassFromCaller;
- JVM_FindClassFromClass;
- JVM_FindClassFromBootLoader;
- JVM_FindLibraryEntry;
- JVM_FindLoadedClass;
- JVM_FindPrimitiveClass;
- JVM_FindSignal;
- JVM_FreeMemory;
- JVM_GC;
- JVM_GetAllThreads;
- JVM_GetArrayElement;
- JVM_GetArrayLength;
- JVM_GetCPClassNameUTF;
- JVM_GetCPFieldClassNameUTF;
- JVM_GetCPFieldModifiers;
- JVM_GetCPFieldNameUTF;
- JVM_GetCPFieldSignatureUTF;
- JVM_GetCPMethodClassNameUTF;
- JVM_GetCPMethodModifiers;
- JVM_GetCPMethodNameUTF;
- JVM_GetCPMethodSignatureUTF;
- JVM_GetCallerClass;
- JVM_GetClassAccessFlags;
- JVM_GetClassAnnotations;
- JVM_GetClassCPEntriesCount;
- JVM_GetClassCPTypes;
- JVM_GetClassConstantPool;
- JVM_GetClassContext;
- JVM_GetClassDeclaredConstructors;
- JVM_GetClassDeclaredFields;
- JVM_GetClassDeclaredMethods;
- JVM_GetClassFieldsCount;
- JVM_GetClassInterfaces;
- JVM_GetClassMethodsCount;
- JVM_GetClassModifiers;
- JVM_GetClassName;
- JVM_GetClassNameUTF;
- JVM_GetClassSignature;
- JVM_GetClassSigners;
- JVM_GetClassTypeAnnotations;
- JVM_GetDeclaredClasses;
- JVM_GetDeclaringClass;
- JVM_GetSimpleBinaryName;
- JVM_GetEnclosingMethodInfo;
- JVM_GetFieldIxModifiers;
- JVM_GetFieldTypeAnnotations;
- JVM_GetInheritedAccessControlContext;
- JVM_GetInterfaceVersion;
- JVM_GetManagement;
- JVM_GetMethodIxArgsSize;
- JVM_GetMethodIxByteCode;
- JVM_GetMethodIxByteCodeLength;
- JVM_GetMethodIxExceptionIndexes;
- JVM_GetMethodIxExceptionTableEntry;
- JVM_GetMethodIxExceptionTableLength;
- JVM_GetMethodIxExceptionsCount;
- JVM_GetMethodIxLocalsCount;
- JVM_GetMethodIxMaxStack;
- JVM_GetMethodIxModifiers;
- JVM_GetMethodIxNameUTF;
- JVM_GetMethodIxSignatureUTF;
- JVM_GetMethodParameters;
- JVM_GetMethodTypeAnnotations;
- JVM_GetNanoTimeAdjustment;
- JVM_GetPrimitiveArrayElement;
- JVM_GetProtectionDomain;
- JVM_GetStackAccessControlContext;
- JVM_GetStackTraceDepth;
- JVM_GetStackTraceElement;
- JVM_GetSystemPackage;
- JVM_GetSystemPackages;
- JVM_GetTemporaryDirectory;
- JVM_GetVersionInfo;
- JVM_Halt;
- JVM_HoldsLock;
- JVM_IHashCode;
- JVM_InitAgentProperties;
- JVM_InitProperties;
- JVM_InternString;
- JVM_Interrupt;
- JVM_InvokeMethod;
- JVM_IsArrayClass;
- JVM_IsConstructorIx;
- JVM_IsInterface;
- JVM_IsInterrupted;
- JVM_IsPrimitiveClass;
- JVM_IsSameClassPackage;
- JVM_IsSupportedJNIVersion;
- JVM_IsThreadAlive;
- JVM_IsVMGeneratedMethodIx;
- JVM_LatestUserDefinedLoader;
- JVM_LoadLibrary;
- JVM_MaxObjectInspectionAge;
- JVM_MaxMemory;
- JVM_MonitorNotify;
- JVM_MonitorNotifyAll;
- JVM_MonitorWait;
- JVM_NanoTime;
- JVM_NativePath;
- JVM_NewArray;
- JVM_NewInstanceFromConstructor;
- JVM_NewMultiArray;
- JVM_RaiseSignal;
- JVM_RawMonitorCreate;
- JVM_RawMonitorDestroy;
- JVM_RawMonitorEnter;
- JVM_RawMonitorExit;
- JVM_RegisterSignal;
- JVM_ReleaseUTF;
- JVM_ResumeThread;
- JVM_SetArrayElement;
- JVM_SetClassSigners;
- JVM_SetNativeThreadName;
- JVM_SetPrimitiveArrayElement;
- JVM_SetThreadPriority;
- JVM_Sleep;
- JVM_StartThread;
- JVM_StopThread;
- JVM_SuspendThread;
- JVM_SupportsCX8;
- JVM_TotalMemory;
- JVM_UnloadLibrary;
- JVM_Yield;
JVM_handle_linux_signal;
# miscellaneous functions
--- a/hotspot/make/linux/makefiles/vm.make Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/linux/makefiles/vm.make Mon Oct 12 14:41:36 2015 -0700
@@ -232,10 +232,17 @@
vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
-mapfile : $(MAPFILE) vm.def mapfile_ext
+MAPFILE_SHARE := $(GAMMADIR)/make/share/makefiles/mapfile-vers
+
+MAPFILE_EXT_SRC := $(HS_ALT_MAKE)/share/makefiles/mapfile-ext
+ifneq ("$(wildcard $(MAPFILE_EXT_SRC))","")
+MAPFILE_EXT := $(MAPFILE_EXT_SRC)
+endif
+
+mapfile : $(MAPFILE) $(MAPFILE_SHARE) vm.def $(MAPFILE_EXT)
rm -f $@
awk '{ if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") \
- { system ("cat mapfile_ext"); system ("cat vm.def"); } \
+ { system ("cat ${MAPFILE_SHARE} $(MAPFILE_EXT) vm.def"); } \
else \
{ print $$0 } \
}' > $@ < $(MAPFILE)
@@ -259,13 +266,6 @@
cat $(VM_DEF_EXT) >> $@
endif
-mapfile_ext:
- rm -f $@
- touch $@
- if [ -f $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext ]; then \
- cat $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext > $@; \
- fi
-
ifeq ($(JVM_VARIANT_ZEROSHARK), true)
STATIC_CXX = false
else
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/make/share/makefiles/mapfile-vers Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,162 @@
+ # JNI
+ JNI_CreateJavaVM;
+ JNI_GetCreatedJavaVMs;
+ JNI_GetDefaultJavaVMInitArgs;
+
+ # JVM
+ JVM_ActiveProcessorCount;
+ JVM_ArrayCopy;
+ JVM_AssertionStatusDirectives;
+ JVM_ClassDepth;
+ JVM_ClassLoaderDepth;
+ JVM_Clone;
+ JVM_ConstantPoolGetClassAt;
+ JVM_ConstantPoolGetClassAtIfLoaded;
+ JVM_ConstantPoolGetDoubleAt;
+ JVM_ConstantPoolGetFieldAt;
+ JVM_ConstantPoolGetFieldAtIfLoaded;
+ JVM_ConstantPoolGetFloatAt;
+ JVM_ConstantPoolGetIntAt;
+ JVM_ConstantPoolGetLongAt;
+ JVM_ConstantPoolGetMethodAt;
+ JVM_ConstantPoolGetMethodAtIfLoaded;
+ JVM_ConstantPoolGetMemberRefInfoAt;
+ JVM_ConstantPoolGetSize;
+ JVM_ConstantPoolGetStringAt;
+ JVM_ConstantPoolGetUTF8At;
+ JVM_CountStackFrames;
+ JVM_CurrentClassLoader;
+ JVM_CurrentLoadedClass;
+ JVM_CurrentThread;
+ JVM_CurrentTimeMillis;
+ JVM_DefineClass;
+ JVM_DefineClassWithSource;
+ JVM_DefineClassWithSourceCond;
+ JVM_DesiredAssertionStatus;
+ JVM_DoPrivileged;
+ JVM_DumpAllStacks;
+ JVM_DumpThreads;
+ JVM_FillInStackTrace;
+ JVM_FindClassFromCaller;
+ JVM_FindClassFromClass;
+ JVM_FindClassFromBootLoader;
+ JVM_FindLibraryEntry;
+ JVM_FindLoadedClass;
+ JVM_FindPrimitiveClass;
+ JVM_FindSignal;
+ JVM_FreeMemory;
+ JVM_GC;
+ JVM_GetAllThreads;
+ JVM_GetArrayElement;
+ JVM_GetArrayLength;
+ JVM_GetCPClassNameUTF;
+ JVM_GetCPFieldClassNameUTF;
+ JVM_GetCPFieldModifiers;
+ JVM_GetCPFieldNameUTF;
+ JVM_GetCPFieldSignatureUTF;
+ JVM_GetCPMethodClassNameUTF;
+ JVM_GetCPMethodModifiers;
+ JVM_GetCPMethodNameUTF;
+ JVM_GetCPMethodSignatureUTF;
+ JVM_GetCallerClass;
+ JVM_GetClassAccessFlags;
+ JVM_GetClassAnnotations;
+ JVM_GetClassCPEntriesCount;
+ JVM_GetClassCPTypes;
+ JVM_GetClassConstantPool;
+ JVM_GetClassContext;
+ JVM_GetClassDeclaredConstructors;
+ JVM_GetClassDeclaredFields;
+ JVM_GetClassDeclaredMethods;
+ JVM_GetClassFieldsCount;
+ JVM_GetClassInterfaces;
+ JVM_GetClassMethodsCount;
+ JVM_GetClassModifiers;
+ JVM_GetClassName;
+ JVM_GetClassNameUTF;
+ JVM_GetClassSignature;
+ JVM_GetClassSigners;
+ JVM_GetClassTypeAnnotations;
+ JVM_GetDeclaredClasses;
+ JVM_GetDeclaringClass;
+ JVM_GetSimpleBinaryName;
+ JVM_GetEnclosingMethodInfo;
+ JVM_GetFieldIxModifiers;
+ JVM_GetFieldTypeAnnotations;
+ JVM_GetInheritedAccessControlContext;
+ JVM_GetInterfaceVersion;
+ JVM_GetManagement;
+ JVM_GetMethodIxArgsSize;
+ JVM_GetMethodIxByteCode;
+ JVM_GetMethodIxByteCodeLength;
+ JVM_GetMethodIxExceptionIndexes;
+ JVM_GetMethodIxExceptionTableEntry;
+ JVM_GetMethodIxExceptionTableLength;
+ JVM_GetMethodIxExceptionsCount;
+ JVM_GetMethodIxLocalsCount;
+ JVM_GetMethodIxMaxStack;
+ JVM_GetMethodIxModifiers;
+ JVM_GetMethodIxNameUTF;
+ JVM_GetMethodIxSignatureUTF;
+ JVM_GetMethodParameters;
+ JVM_GetMethodTypeAnnotations;
+ JVM_GetNanoTimeAdjustment;
+ JVM_GetPrimitiveArrayElement;
+ JVM_GetProtectionDomain;
+ JVM_GetStackAccessControlContext;
+ JVM_GetStackTraceDepth;
+ JVM_GetStackTraceElement;
+ JVM_GetSystemPackage;
+ JVM_GetSystemPackages;
+ JVM_GetTemporaryDirectory;
+ JVM_GetVersionInfo;
+ JVM_Halt;
+ JVM_HoldsLock;
+ JVM_IHashCode;
+ JVM_InitAgentProperties;
+ JVM_InitProperties;
+ JVM_InternString;
+ JVM_Interrupt;
+ JVM_InvokeMethod;
+ JVM_IsArrayClass;
+ JVM_IsConstructorIx;
+ JVM_IsInterface;
+ JVM_IsInterrupted;
+ JVM_IsPrimitiveClass;
+ JVM_IsSameClassPackage;
+ JVM_IsSupportedJNIVersion;
+ JVM_IsThreadAlive;
+ JVM_IsVMGeneratedMethodIx;
+ JVM_LatestUserDefinedLoader;
+ JVM_LoadLibrary;
+ JVM_MaxObjectInspectionAge;
+ JVM_MaxMemory;
+ JVM_MonitorNotify;
+ JVM_MonitorNotifyAll;
+ JVM_MonitorWait;
+ JVM_NanoTime;
+ JVM_NativePath;
+ JVM_NewArray;
+ JVM_NewInstanceFromConstructor;
+ JVM_NewMultiArray;
+ JVM_RaiseSignal;
+ JVM_RawMonitorCreate;
+ JVM_RawMonitorDestroy;
+ JVM_RawMonitorEnter;
+ JVM_RawMonitorExit;
+ JVM_RegisterSignal;
+ JVM_ReleaseUTF;
+ JVM_ResumeThread;
+ JVM_SetArrayElement;
+ JVM_SetClassSigners;
+ JVM_SetNativeThreadName;
+ JVM_SetPrimitiveArrayElement;
+ JVM_SetThreadPriority;
+ JVM_Sleep;
+ JVM_StartThread;
+ JVM_StopThread;
+ JVM_SuspendThread;
+ JVM_SupportsCX8;
+ JVM_TotalMemory;
+ JVM_UnloadLibrary;
+ JVM_Yield;
--- a/hotspot/make/solaris/makefiles/mapfile-vers Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/solaris/makefiles/mapfile-vers Mon Oct 12 14:41:36 2015 -0700
@@ -26,168 +26,6 @@
SUNWprivate_1.1 {
global:
- # JNI
- JNI_CreateJavaVM;
- JNI_GetCreatedJavaVMs;
- JNI_GetDefaultJavaVMInitArgs;
-
- # JVM
- JVM_ActiveProcessorCount;
- JVM_ArrayCopy;
- JVM_AssertionStatusDirectives;
- JVM_ClassDepth;
- JVM_ClassLoaderDepth;
- JVM_Clone;
- JVM_ConstantPoolGetClassAt;
- JVM_ConstantPoolGetClassAtIfLoaded;
- JVM_ConstantPoolGetDoubleAt;
- JVM_ConstantPoolGetFieldAt;
- JVM_ConstantPoolGetFieldAtIfLoaded;
- JVM_ConstantPoolGetFloatAt;
- JVM_ConstantPoolGetIntAt;
- JVM_ConstantPoolGetLongAt;
- JVM_ConstantPoolGetMethodAt;
- JVM_ConstantPoolGetMethodAtIfLoaded;
- JVM_ConstantPoolGetMemberRefInfoAt;
- JVM_ConstantPoolGetSize;
- JVM_ConstantPoolGetStringAt;
- JVM_ConstantPoolGetUTF8At;
- JVM_CountStackFrames;
- JVM_CurrentClassLoader;
- JVM_CurrentLoadedClass;
- JVM_CurrentThread;
- JVM_CurrentTimeMillis;
- JVM_DefineClass;
- JVM_DefineClassWithSource;
- JVM_DefineClassWithSourceCond;
- JVM_DesiredAssertionStatus;
- JVM_DoPrivileged;
- JVM_DumpAllStacks;
- JVM_DumpThreads;
- JVM_FillInStackTrace;
- JVM_FindClassFromCaller;
- JVM_FindClassFromClass;
- JVM_FindClassFromBootLoader;
- JVM_FindLibraryEntry;
- JVM_FindLoadedClass;
- JVM_FindPrimitiveClass;
- JVM_FindSignal;
- JVM_FreeMemory;
- JVM_GC;
- JVM_GetAllThreads;
- JVM_GetArrayElement;
- JVM_GetArrayLength;
- JVM_GetCPClassNameUTF;
- JVM_GetCPFieldClassNameUTF;
- JVM_GetCPFieldModifiers;
- JVM_GetCPFieldNameUTF;
- JVM_GetCPFieldSignatureUTF;
- JVM_GetCPMethodClassNameUTF;
- JVM_GetCPMethodModifiers;
- JVM_GetCPMethodNameUTF;
- JVM_GetCPMethodSignatureUTF;
- JVM_GetCallerClass;
- JVM_GetClassAccessFlags;
- JVM_GetClassAnnotations;
- JVM_GetClassCPEntriesCount;
- JVM_GetClassCPTypes;
- JVM_GetClassConstantPool;
- JVM_GetClassContext;
- JVM_GetClassDeclaredConstructors;
- JVM_GetClassDeclaredFields;
- JVM_GetClassDeclaredMethods;
- JVM_GetClassFieldsCount;
- JVM_GetClassInterfaces;
- JVM_GetClassMethodsCount;
- JVM_GetClassModifiers;
- JVM_GetClassName;
- JVM_GetClassNameUTF;
- JVM_GetClassSignature;
- JVM_GetClassSigners;
- JVM_GetClassTypeAnnotations;
- JVM_GetDeclaredClasses;
- JVM_GetDeclaringClass;
- JVM_GetSimpleBinaryName;
- JVM_GetEnclosingMethodInfo;
- JVM_GetFieldIxModifiers;
- JVM_GetFieldTypeAnnotations;
- JVM_GetInheritedAccessControlContext;
- JVM_GetInterfaceVersion;
- JVM_GetManagement;
- JVM_GetMethodIxArgsSize;
- JVM_GetMethodIxByteCode;
- JVM_GetMethodIxByteCodeLength;
- JVM_GetMethodIxExceptionIndexes;
- JVM_GetMethodIxExceptionTableEntry;
- JVM_GetMethodIxExceptionTableLength;
- JVM_GetMethodIxExceptionsCount;
- JVM_GetMethodIxLocalsCount;
- JVM_GetMethodIxMaxStack;
- JVM_GetMethodIxModifiers;
- JVM_GetMethodIxNameUTF;
- JVM_GetMethodIxSignatureUTF;
- JVM_GetMethodParameters;
- JVM_GetMethodTypeAnnotations;
- JVM_GetNanoTimeAdjustment;
- JVM_GetPrimitiveArrayElement;
- JVM_GetProtectionDomain;
- JVM_GetStackAccessControlContext;
- JVM_GetStackTraceDepth;
- JVM_GetStackTraceElement;
- JVM_GetSystemPackage;
- JVM_GetSystemPackages;
- JVM_GetTemporaryDirectory;
- JVM_GetVersionInfo;
- JVM_Halt;
- JVM_HoldsLock;
- JVM_IHashCode;
- JVM_InitAgentProperties;
- JVM_InitProperties;
- JVM_InternString;
- JVM_Interrupt;
- JVM_InvokeMethod;
- JVM_IsArrayClass;
- JVM_IsConstructorIx;
- JVM_IsInterface;
- JVM_IsInterrupted;
- JVM_IsPrimitiveClass;
- JVM_IsSameClassPackage;
- JVM_IsSupportedJNIVersion;
- JVM_IsThreadAlive;
- JVM_IsVMGeneratedMethodIx;
- JVM_LatestUserDefinedLoader;
- JVM_LoadLibrary;
- JVM_MaxObjectInspectionAge;
- JVM_MaxMemory;
- JVM_MonitorNotify;
- JVM_MonitorNotifyAll;
- JVM_MonitorWait;
- JVM_NativePath;
- JVM_NanoTime;
- JVM_NewArray;
- JVM_NewInstanceFromConstructor;
- JVM_NewMultiArray;
- JVM_RaiseSignal;
- JVM_RawMonitorCreate;
- JVM_RawMonitorDestroy;
- JVM_RawMonitorEnter;
- JVM_RawMonitorExit;
- JVM_RegisterSignal;
- JVM_ReleaseUTF;
- JVM_ResumeThread;
- JVM_SetArrayElement;
- JVM_SetClassSigners;
- JVM_SetNativeThreadName;
- JVM_SetPrimitiveArrayElement;
- JVM_SetThreadPriority;
- JVM_Sleep;
- JVM_StartThread;
- JVM_StopThread;
- JVM_SuspendThread;
- JVM_SupportsCX8;
- JVM_TotalMemory;
- JVM_UnloadLibrary;
- JVM_Yield;
JVM_handle_solaris_signal;
# miscellaneous functions
--- a/hotspot/make/solaris/makefiles/vm.make Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/make/solaris/makefiles/vm.make Mon Oct 12 14:41:36 2015 -0700
@@ -241,13 +241,19 @@
vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))
-mapfile : $(MAPFILE) $(MAPFILE_DTRACE_OPT) vm.def mapfile_ext
+MAPFILE_SHARE := $(GAMMADIR)/make/share/makefiles/mapfile-vers
+
+MAPFILE_EXT_SRC := $(HS_ALT_MAKE)/share/makefiles/mapfile-ext
+ifneq ("$(wildcard $(MAPFILE_EXT_SRC))","")
+MAPFILE_EXT := $(MAPFILE_EXT_SRC)
+endif
+
+mapfile : $(MAPFILE) $(MAPFILE_SHARE) vm.def $(MAPFILE_EXT)
rm -f $@
cat $(MAPFILE) $(MAPFILE_DTRACE_OPT) \
| $(NAWK) '{ \
if ($$0 ~ "INSERT VTABLE SYMBOLS HERE") { \
- system ("cat mapfile_ext"); \
- system ("cat vm.def"); \
+ system ("cat ${MAPFILE_SHARE} $(MAPFILE_EXT) vm.def"); \
} else { \
print $$0; \
} \
@@ -260,12 +266,6 @@
vm.def: $(Obj_Files)
sh $(GAMMADIR)/make/solaris/makefiles/build_vm_def.sh *.o > $@
-mapfile_ext:
- rm -f $@
- touch $@
- if [ -f $(HS_ALT_MAKE)/solaris/makefiles/mapfile-ext ]; then \
- cat $(HS_ALT_MAKE)/solaris/makefiles/mapfile-ext > $@; \
- fi
ifeq ($(LINK_INTO),AOUT)
LIBJVM.o =
--- a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -1608,6 +1608,8 @@
test_method_data_pointer(mdp, profile_continue);
if (MethodData::profile_return_jsr292_only()) {
+ assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
// If we don't profile all invoke bytecodes we must make sure
// it's a bytecode we indeed profile. We can't go back to the
// begining of the ProfileData we intend to update to check its
@@ -1620,7 +1622,7 @@
cmp(rscratch1, Bytecodes::_invokehandle);
br(Assembler::EQ, do_profile);
get_method(tmp);
- ldrb(rscratch1, Address(tmp, Method::intrinsic_id_offset_in_bytes()));
+ ldrh(rscratch1, Address(tmp, Method::intrinsic_id_offset_in_bytes()));
cmp(rscratch1, vmIntrinsics::_compiledLambdaForm);
br(Assembler::NE, profile_continue);
--- a/hotspot/src/cpu/aarch64/vm/methodHandles_aarch64.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/cpu/aarch64/vm/methodHandles_aarch64.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -188,9 +188,11 @@
address entry_point = __ pc();
if (VerifyMethodHandles) {
+ assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
Label L;
BLOCK_COMMENT("verify_intrinsic_id {");
- __ ldrb(rscratch1, Address(rmethod, Method::intrinsic_id_offset_in_bytes()));
+ __ ldrh(rscratch1, Address(rmethod, Method::intrinsic_id_offset_in_bytes()));
__ cmp(rscratch1, (int) iid);
__ br(Assembler::EQ, L);
if (iid == vmIntrinsics::_linkToVirtual ||
--- a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -1817,13 +1817,15 @@
test_method_data_pointer(profile_continue);
if (MethodData::profile_return_jsr292_only()) {
+ assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
// If we don't profile all invoke bytecodes we must make sure
// it's a bytecode we indeed profile. We can't go back to the
// begining of the ProfileData we intend to update to check its
// type because we're right after it and we don't known its
// length.
lbz(tmp1, 0, R14_bcp);
- lbz(tmp2, Method::intrinsic_id_offset_in_bytes(), R19_method);
+ lhz(tmp2, Method::intrinsic_id_offset_in_bytes(), R19_method);
cmpwi(CCR0, tmp1, Bytecodes::_invokedynamic);
cmpwi(CCR1, tmp1, Bytecodes::_invokehandle);
cror(CCR0, Assembler::equal, CCR1, Assembler::equal);
--- a/hotspot/src/cpu/ppc/vm/methodHandles_ppc.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/cpu/ppc/vm/methodHandles_ppc.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -224,11 +224,12 @@
address entry_point = __ pc();
if (VerifyMethodHandles) {
+ assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
Label L;
BLOCK_COMMENT("verify_intrinsic_id {");
__ load_sized_value(temp1, Method::intrinsic_id_offset_in_bytes(), R19_method,
- sizeof(u1), /*is_signed*/ false);
- // assert(sizeof(u1) == sizeof(Method::_intrinsic_id), "");
+ sizeof(u2), /*is_signed*/ false);
__ cmpwi(CCR1, temp1, (int) iid);
__ beq(CCR1, L);
if (iid == vmIntrinsics::_linkToVirtual ||
--- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -2021,6 +2021,8 @@
test_method_data_pointer(profile_continue);
if (MethodData::profile_return_jsr292_only()) {
+ assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
// If we don't profile all invoke bytecodes we must make sure
// it's a bytecode we indeed profile. We can't go back to the
// begining of the ProfileData we intend to update to check its
@@ -2031,7 +2033,7 @@
cmp_and_br_short(tmp1, Bytecodes::_invokedynamic, equal, pn, do_profile);
cmp(tmp1, Bytecodes::_invokehandle);
br(equal, false, pn, do_profile);
- delayed()->ldub(Lmethod, Method::intrinsic_id_offset_in_bytes(), tmp1);
+ delayed()->lduh(Lmethod, Method::intrinsic_id_offset_in_bytes(), tmp1);
cmp_and_br_short(tmp1, vmIntrinsics::_compiledLambdaForm, notEqual, pt, profile_continue);
bind(do_profile);
--- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -229,9 +229,11 @@
address entry_point = __ pc();
if (VerifyMethodHandles) {
+ assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
Label L;
BLOCK_COMMENT("verify_intrinsic_id {");
- __ ldub(Address(G5_method, Method::intrinsic_id_offset_in_bytes()), O1_scratch);
+ __ lduh(Address(G5_method, Method::intrinsic_id_offset_in_bytes()), O1_scratch);
__ cmp_and_br_short(O1_scratch, (int) iid, Assembler::equal, Assembler::pt, L);
if (iid == vmIntrinsics::_linkToVirtual ||
iid == vmIntrinsics::_linkToSpecial) {
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -169,6 +169,8 @@
test_method_data_pointer(mdp, profile_continue);
if (MethodData::profile_return_jsr292_only()) {
+ assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
// If we don't profile all invoke bytecodes we must make sure
// it's a bytecode we indeed profile. We can't go back to the
// begining of the ProfileData we intend to update to check its
@@ -180,7 +182,7 @@
cmpb(Address(_bcp_register, 0), Bytecodes::_invokehandle);
jcc(Assembler::equal, do_profile);
get_method(tmp);
- cmpb(Address(tmp, Method::intrinsic_id_offset_in_bytes()), vmIntrinsics::_compiledLambdaForm);
+ cmpw(Address(tmp, Method::intrinsic_id_offset_in_bytes()), vmIntrinsics::_compiledLambdaForm);
jcc(Assembler::notEqual, profile_continue);
bind(do_profile);
--- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -222,9 +222,11 @@
address entry_point = __ pc();
if (VerifyMethodHandles) {
+ assert(Method::intrinsic_id_size_in_bytes() == 2, "assuming Method::_intrinsic_id is u2");
+
Label L;
BLOCK_COMMENT("verify_intrinsic_id {");
- __ cmpb(Address(rbx_method, Method::intrinsic_id_offset_in_bytes()), (int) iid);
+ __ cmpw(Address(rbx_method, Method::intrinsic_id_offset_in_bytes()), (int) iid);
__ jcc(Assembler::equal, L);
if (iid == vmIntrinsics::_linkToVirtual ||
iid == vmIntrinsics::_linkToSpecial) {
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -1989,6 +1989,10 @@
flags = JVM_ACC_STATIC;
} else if ((flags & JVM_ACC_STATIC) == JVM_ACC_STATIC) {
flags &= JVM_ACC_STATIC | JVM_ACC_STRICT;
+ } else {
+ // As of major_version 51, a method named <clinit> without ACC_STATIC is
+ // just another method. So, do a normal method modifer check.
+ verify_legal_method_modifiers(flags, is_interface, name, CHECK_(nullHandle));
}
} else {
verify_legal_method_modifiers(flags, is_interface, name, CHECK_(nullHandle));
--- a/hotspot/src/share/vm/classfile/verificationType.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/classfile/verificationType.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -70,9 +70,12 @@
if (this_class->is_interface() && (!from_field_is_protected ||
from.name() != vmSymbols::java_lang_Object())) {
// If we are not trying to access a protected field or method in
- // java.lang.Object then we treat interfaces as java.lang.Object,
- // including java.lang.Cloneable and java.io.Serializable.
- return true;
+ // java.lang.Object then, for arrays, we only allow assignability
+ // to interfaces java.lang.Cloneable and java.io.Serializable.
+ // Otherwise, we treat interfaces as java.lang.Object.
+ return !from.is_array() ||
+ this_class == SystemDictionary::Cloneable_klass() ||
+ this_class == SystemDictionary::Serializable_klass();
} else if (from.is_object()) {
Klass* from_class = SystemDictionary::resolve_or_fail(
from.name(), Handle(THREAD, klass->class_loader()),
--- a/hotspot/src/share/vm/classfile/verifier.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/classfile/verifier.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -1579,9 +1579,11 @@
return;
}
// Make sure "this" has been initialized if current method is an
- // <init>
+ // <init>. Note that "<init>" methods in interfaces are just
+ // normal methods. Interfaces cannot have ctors.
if (_method->name() == vmSymbols::object_initializer_name() &&
- current_frame.flag_this_uninit()) {
+ current_frame.flag_this_uninit() &&
+ !current_class()->is_interface()) {
verify_error(ErrorContext::bad_code(bci),
"Constructor must call super() or this() "
"before return");
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -73,13 +73,6 @@
size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
-// turn it on so that the contents of the young list (scan-only /
-// to-be-collected) are printed at "strategic" points before / during
-// / after the collection --- this is useful for debugging
-#define YOUNG_LIST_VERBOSE 0
-// CURRENT STATUS
-// This file is under construction. Search for "FIXME".
-
// INVARIANTS/NOTES
//
// All allocation activity covered by the G1CollectedHeap interface is
@@ -4079,29 +4072,12 @@
// the possible verification above.
double sample_start_time_sec = os::elapsedTime();
-#if YOUNG_LIST_VERBOSE
- gclog_or_tty->print_cr("\nBefore recording pause start.\nYoung_list:");
- _young_list->print();
- g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
-#endif // YOUNG_LIST_VERBOSE
-
g1_policy()->record_collection_pause_start(sample_start_time_sec);
-#if YOUNG_LIST_VERBOSE
- gclog_or_tty->print_cr("\nAfter recording pause start.\nYoung_list:");
- _young_list->print();
-#endif // YOUNG_LIST_VERBOSE
-
if (collector_state()->during_initial_mark_pause()) {
concurrent_mark()->checkpointRootsInitialPre();
}
-#if YOUNG_LIST_VERBOSE
- gclog_or_tty->print_cr("\nBefore choosing collection set.\nYoung_list:");
- _young_list->print();
- g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
-#endif // YOUNG_LIST_VERBOSE
-
double time_remaining_ms = g1_policy()->finalize_young_cset_part(target_pause_time_ms);
g1_policy()->finalize_old_cset_part(time_remaining_ms);
@@ -4157,11 +4133,6 @@
assert(check_young_list_empty(false /* check_heap */),
"young list should be empty");
-#if YOUNG_LIST_VERBOSE
- gclog_or_tty->print_cr("Before recording survivors.\nYoung List:");
- _young_list->print();
-#endif // YOUNG_LIST_VERBOSE
-
g1_policy()->record_survivor_regions(_young_list->survivor_length(),
_young_list->first_survivor_region(),
_young_list->last_survivor_region());
@@ -4197,12 +4168,6 @@
allocate_dummy_regions();
-#if YOUNG_LIST_VERBOSE
- gclog_or_tty->print_cr("\nEnd of the pause.\nYoung_list:");
- _young_list->print();
- g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
-#endif // YOUNG_LIST_VERBOSE
-
_allocator->init_mutator_alloc_region();
{
--- a/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/gc/g1/g1EvacStats.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -93,7 +93,7 @@
size_t const used_for_waste_calculation = used() > _region_end_waste ? used() - _region_end_waste : 0;
size_t const total_waste_allowed = used_for_waste_calculation * TargetPLABWastePct;
- size_t const cur_plab_sz = (double)total_waste_allowed / G1LastPLABAverageOccupancy;
+ size_t const cur_plab_sz = (size_t)((double)total_waste_allowed / G1LastPLABAverageOccupancy);
// Take historical weighted average
_filter.sample(cur_plab_sz);
// Clip from above and below, and align to object boundary
--- a/hotspot/src/share/vm/gc/shared/gcTrace.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/gc/shared/gcTrace.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -88,8 +88,6 @@
send_reference_stats_event(REF_WEAK, rps.weak_count());
send_reference_stats_event(REF_FINAL, rps.final_count());
send_reference_stats_event(REF_PHANTOM, rps.phantom_count());
- send_reference_stats_event(REF_CLEANER, rps.cleaner_count());
- send_reference_stats_event(REF_JNI, rps.jni_weak_ref_count());
}
#if INCLUDE_SERVICES
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -243,13 +243,10 @@
process_discovered_reflist(_discoveredPhantomRefs, NULL, false,
is_alive, keep_alive, complete_gc, task_executor);
- }
-
- // Cleaners
- size_t cleaner_count = 0;
- {
- GCTraceTime tt("Cleaners", trace_time, false, gc_timer, gc_id);
- cleaner_count =
+ // Process cleaners, but include them in phantom statistics. We expect
+ // Cleaner references to be temporary, and don't want to deal with
+ // possible incompatibilities arising from making it more visible.
+ phantom_count +=
process_discovered_reflist(_discoveredCleanerRefs, NULL, true,
is_alive, keep_alive, complete_gc, task_executor);
}
@@ -259,17 +256,15 @@
// that is not how the JDK1.2 specification is. See #4126360. Native code can
// thus use JNI weak references to circumvent the phantom references and
// resurrect a "post-mortem" object.
- size_t jni_weak_ref_count = 0;
{
GCTraceTime tt("JNI Weak Reference", trace_time, false, gc_timer, gc_id);
if (task_executor != NULL) {
task_executor->set_single_threaded_mode();
}
- jni_weak_ref_count =
- process_phaseJNI(is_alive, keep_alive, complete_gc);
+ process_phaseJNI(is_alive, keep_alive, complete_gc);
}
- return ReferenceProcessorStats(soft_count, weak_count, final_count, phantom_count, cleaner_count, jni_weak_ref_count);
+ return ReferenceProcessorStats(soft_count, weak_count, final_count, phantom_count);
}
#ifndef PRODUCT
@@ -296,17 +291,17 @@
}
#endif
-size_t ReferenceProcessor::process_phaseJNI(BoolObjectClosure* is_alive,
- OopClosure* keep_alive,
- VoidClosure* complete_gc) {
- DEBUG_ONLY(size_t check_count = count_jni_refs();)
- size_t count = JNIHandles::weak_oops_do(is_alive, keep_alive);
- assert(count == check_count, "Counts didn't match");
+void ReferenceProcessor::process_phaseJNI(BoolObjectClosure* is_alive,
+ OopClosure* keep_alive,
+ VoidClosure* complete_gc) {
+#ifndef PRODUCT
+ if (PrintGCDetails && PrintReferenceGC) {
+ unsigned int count = count_jni_refs();
+ gclog_or_tty->print(", %u refs", count);
+ }
+#endif
+ JNIHandles::weak_oops_do(is_alive, keep_alive);
complete_gc->do_void();
- if (PrintGCDetails && PrintReferenceGC) {
- gclog_or_tty->print(", " SIZE_FORMAT " refs", count);
- }
- return count;
}
@@ -946,10 +941,9 @@
list = &_discoveredCleanerRefs[id];
break;
case REF_NONE:
- case REF_JNI:
// we should not reach here if we are an InstanceRefKlass
default:
- guarantee(false, err_msg("rt should not be %d", rt));
+ ShouldNotReachHere();
}
if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print_cr("Thread %d gets list " INTPTR_FORMAT, id, p2i(list));
--- a/hotspot/src/share/vm/gc/shared/referenceProcessor.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessor.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -247,7 +247,7 @@
DiscoveredList* _discoveredCleanerRefs;
public:
- static int number_of_subclasses_of_ref() { return REF_LISTS_COUNT; }
+ static int number_of_subclasses_of_ref() { return (REF_CLEANER - REF_OTHER); }
uint num_q() { return _num_q; }
uint max_num_q() { return _max_num_q; }
@@ -271,9 +271,9 @@
VoidClosure* complete_gc,
AbstractRefProcTaskExecutor* task_executor);
- size_t process_phaseJNI(BoolObjectClosure* is_alive,
- OopClosure* keep_alive,
- VoidClosure* complete_gc);
+ void process_phaseJNI(BoolObjectClosure* is_alive,
+ OopClosure* keep_alive,
+ VoidClosure* complete_gc);
// Work methods used by the method process_discovered_reflist
// Phase1: keep alive all those referents that are otherwise
--- a/hotspot/src/share/vm/gc/shared/referenceProcessorStats.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/gc/shared/referenceProcessorStats.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -36,30 +36,22 @@
size_t _weak_count;
size_t _final_count;
size_t _phantom_count;
- size_t _cleaner_count;
- size_t _jni_weak_ref_count;
public:
ReferenceProcessorStats() :
_soft_count(0),
_weak_count(0),
_final_count(0),
- _phantom_count(0),
- _cleaner_count(0),
- _jni_weak_ref_count(0) {}
+ _phantom_count(0) {}
ReferenceProcessorStats(size_t soft_count,
size_t weak_count,
size_t final_count,
- size_t phantom_count,
- size_t cleaner_count,
- size_t jni_weak_ref_count) :
+ size_t phantom_count) :
_soft_count(soft_count),
_weak_count(weak_count),
_final_count(final_count),
- _phantom_count(phantom_count),
- _cleaner_count(cleaner_count),
- _jni_weak_ref_count(jni_weak_ref_count)
+ _phantom_count(phantom_count)
{}
size_t soft_count() const {
@@ -77,13 +69,5 @@
size_t phantom_count() const {
return _phantom_count;
}
-
- size_t cleaner_count() const {
- return _cleaner_count;
- }
-
- size_t jni_weak_ref_count() const {
- return _jni_weak_ref_count;
- }
};
#endif
--- a/hotspot/src/share/vm/memory/referenceType.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/memory/referenceType.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -32,15 +32,11 @@
enum ReferenceType {
REF_NONE, // Regular class
REF_OTHER, // Subclass of java/lang/ref/Reference, but not subclass of one of the classes below
- ///////////////// Only the types below have their own discovered lists
REF_SOFT, // Subclass of java/lang/ref/SoftReference
REF_WEAK, // Subclass of java/lang/ref/WeakReference
REF_FINAL, // Subclass of java/lang/ref/FinalReference
REF_PHANTOM, // Subclass of java/lang/ref/PhantomReference
- REF_CLEANER, // Subclass of sun/misc/Cleaner
- ///////////////// Only the types in the above range have their own discovered lists
- REF_JNI, // JNI weak refs
- REF_LISTS_COUNT = REF_CLEANER - REF_OTHER // Number of discovered lists
+ REF_CLEANER // Subclass of sun/misc/Cleaner
};
#endif // SHARE_VM_MEMORY_REFERENCETYPE_HPP
--- a/hotspot/src/share/vm/oops/method.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/oops/method.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -72,7 +72,7 @@
int _result_index; // C++ interpreter needs for converting results to/from stack
#endif
u2 _method_size; // size of this object
- u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
+ u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
// Flags
enum Flags {
@@ -653,7 +653,7 @@
// for code generation
static int method_data_offset_in_bytes() { return offset_of(Method, _method_data); }
static int intrinsic_id_offset_in_bytes() { return offset_of(Method, _intrinsic_id); }
- static int intrinsic_id_size_in_bytes() { return sizeof(u1); }
+ static int intrinsic_id_size_in_bytes() { return sizeof(u2); }
// Static methods that are used to implement member methods where an exposed this pointer
// is needed due to possible GCs
@@ -777,7 +777,7 @@
// Support for inlining of intrinsic methods
vmIntrinsics::ID intrinsic_id() const { return (vmIntrinsics::ID) _intrinsic_id; }
- void set_intrinsic_id(vmIntrinsics::ID id) { _intrinsic_id = (u1) id; }
+ void set_intrinsic_id(vmIntrinsics::ID id) { _intrinsic_id = (u2) id; }
// Helper routines for intrinsic_id() and vmIntrinsics::method().
void init_intrinsic_id(); // updates from _none if a match
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -2181,8 +2181,8 @@
JvmtiVMObjectAllocEventCollector::oops_do_for_all_threads(f);
}
-size_t JvmtiExport::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
- return JvmtiTagMap::weak_oops_do(is_alive, f);
+void JvmtiExport::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
+ JvmtiTagMap::weak_oops_do(is_alive, f);
}
void JvmtiExport::gc_epilogue() {
--- a/hotspot/src/share/vm/prims/jvmtiExport.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/prims/jvmtiExport.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -366,7 +366,7 @@
static void clear_detected_exception (JavaThread* thread) NOT_JVMTI_RETURN;
static void oops_do(OopClosure* f) NOT_JVMTI_RETURN;
- static size_t weak_oops_do(BoolObjectClosure* b, OopClosure* f) NOT_JVMTI_RETURN_(0);
+ static void weak_oops_do(BoolObjectClosure* b, OopClosure* f) NOT_JVMTI_RETURN;
static void gc_epilogue() NOT_JVMTI_RETURN;
static void transition_pending_onload_raw_monitors() NOT_JVMTI_RETURN;
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -3284,35 +3284,32 @@
}
-size_t JvmtiTagMap::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
+void JvmtiTagMap::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
// No locks during VM bring-up (0 threads) and no safepoints after main
// thread creation and before VMThread creation (1 thread); initial GC
// verification can happen in that window which gets to here.
assert(Threads::number_of_threads() <= 1 ||
SafepointSynchronize::is_at_safepoint(),
"must be executed at a safepoint");
- size_t count = 0;
if (JvmtiEnv::environments_might_exist()) {
JvmtiEnvIterator it;
for (JvmtiEnvBase* env = it.first(); env != NULL; env = it.next(env)) {
JvmtiTagMap* tag_map = env->tag_map();
if (tag_map != NULL && !tag_map->is_empty()) {
- count += tag_map->do_weak_oops(is_alive, f);
+ tag_map->do_weak_oops(is_alive, f);
}
}
}
- return count;
}
-size_t JvmtiTagMap::do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f) {
+void JvmtiTagMap::do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f) {
// does this environment have the OBJECT_FREE event enabled
bool post_object_free = env()->is_enabled(JVMTI_EVENT_OBJECT_FREE);
// counters used for trace message
- size_t freed = 0;
- size_t moved = 0;
- size_t stayed = 0;
+ int freed = 0;
+ int moved = 0;
JvmtiTagHashmap* hashmap = this->hashmap();
@@ -3321,7 +3318,7 @@
// if the hashmap is empty then we can skip it
if (hashmap->_entry_count == 0) {
- return 0;
+ return;
}
// now iterate through each entry in the table
@@ -3383,7 +3380,6 @@
} else {
// object didn't move
prev = entry;
- stayed++;
}
}
@@ -3402,12 +3398,10 @@
// stats
if (TraceJVMTIObjectTagging) {
- size_t post_total = hashmap->_entry_count;
- size_t pre_total = post_total + freed;
-
- tty->print_cr("(" SIZE_FORMAT "->" SIZE_FORMAT ", " SIZE_FORMAT " freed, " SIZE_FORMAT " stayed, " SIZE_FORMAT " moved)",
- pre_total, post_total, freed, stayed, moved);
+ int post_total = hashmap->_entry_count;
+ int pre_total = post_total + freed;
+
+ tty->print_cr("(%d->%d, %d freed, %d total moves)",
+ pre_total, post_total, freed, moved);
}
-
- return (freed + stayed + moved);
}
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -60,7 +60,7 @@
inline Mutex* lock() { return &_lock; }
inline JvmtiEnv* env() const { return _env; }
- size_t do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f);
+ void do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f);
// iterate over all entries in this tag map
void entry_iterate(JvmtiTagHashmapEntryClosure* closure);
@@ -122,8 +122,8 @@
jint* count_ptr, jobject** object_result_ptr,
jlong** tag_result_ptr);
- static size_t weak_oops_do(BoolObjectClosure* is_alive,
- OopClosure* f) NOT_JVMTI_RETURN_(0);
+ static void weak_oops_do(
+ BoolObjectClosure* is_alive, OopClosure* f) NOT_JVMTI_RETURN;
};
#endif // SHARE_VM_PRIMS_JVMTITAGMAP_HPP
--- a/hotspot/src/share/vm/runtime/arguments.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -118,7 +118,7 @@
// part of the option string.
static bool match_option(const JavaVMOption *option, const char* name,
const char** tail) {
- int len = (int)strlen(name);
+ size_t len = strlen(name);
if (strncmp(option->optionString, name, len) == 0) {
*tail = option->optionString + len;
return true;
@@ -219,11 +219,9 @@
void Arguments::init_version_specific_system_properties() {
enum { bufsz = 16 };
char buffer[bufsz];
- const char* spec_vendor = "Sun Microsystems Inc.";
- uint32_t spec_version = 0;
-
- spec_vendor = "Oracle Corporation";
- spec_version = JDK_Version::current().major_version();
+ const char* spec_vendor = "Oracle Corporation";
+ uint32_t spec_version = JDK_Version::current().major_version();
+
jio_snprintf(buffer, bufsz, "1." UINT32_FORMAT, spec_version);
PropertyList_add(&_system_properties,
@@ -234,75 +232,290 @@
new SystemProperty("java.vm.vendor", VM_Version::vm_vendor(), false));
}
-/**
- * Provide a slightly more user-friendly way of eliminating -XX flags.
- * When a flag is eliminated, it can be added to this list in order to
- * continue accepting this flag on the command-line, while issuing a warning
- * and ignoring the value. Once the JDK version reaches the 'accept_until'
- * limit, we flatly refuse to admit the existence of the flag. This allows
- * a flag to die correctly over JDK releases using HSX.
- * But now that HSX is no longer supported only options with a future
- * accept_until value need to be listed, and the list can be pruned
- * on each major release.
+/*
+ * -XX argument processing:
+ *
+ * -XX arguments are defined in several places, such as:
+ * globals.hpp, globals_<cpu>.hpp, globals_<os>.hpp, <compiler>_globals.hpp, or <gc>_globals.hpp.
+ * -XX arguments are parsed in parse_argument().
+ * -XX argument bounds checking is done in check_vm_args_consistency().
+ *
+ * Over time -XX arguments may change. There are mechanisms to handle common cases:
+ *
+ * ALIASED: An option that is simply another name for another option. This is often
+ * part of the process of deprecating a flag, but not all aliases need
+ * to be deprecated.
+ *
+ * Create an alias for an option by adding the old and new option names to the
+ * "aliased_jvm_flags" table. Delete the old variable from globals.hpp (etc).
+ *
+ * DEPRECATED: An option that is supported, but a warning is printed to let the user know that
+ * support may be removed in the future. Both regular and aliased options may be
+ * deprecated.
+ *
+ * Add a deprecation warning for an option (or alias) by adding an entry in the
+ * "special_jvm_flags" table and setting the "deprecated_in" field.
+ * Often an option "deprecated" in one major release will
+ * be made "obsolete" in the next. In this case the entry should also have it's
+ * "obsolete_in" field set.
+ *
+ * OBSOLETE: An option that has been removed (and deleted from globals.hpp), but is still accepted
+ * on the command line. A warning is printed to let the user know that option might not
+ * be accepted in the future.
+ *
+ * Add an obsolete warning for an option by adding an entry in the "special_jvm_flags"
+ * table and setting the "obsolete_in" field.
+ *
+ * EXPIRED: A deprecated or obsolete option that has an "accept_until" version less than or equal
+ * to the current JDK version. The system will flatly refuse to admit the existence of
+ * the flag. This allows a flag to die automatically over JDK releases.
+ *
+ * Note that manual cleanup of expired options should be done at major JDK version upgrades:
+ * - Newly expired options should be removed from the special_jvm_flags and aliased_jvm_flags tables.
+ * - Newly obsolete or expired deprecated options should have their global variable
+ * definitions removed (from globals.hpp, etc) and related implementations removed.
+ *
+ * Recommended approach for removing options:
+ *
+ * To remove options commonly used by customers (e.g. product, commercial -XX options), use
+ * the 3-step model adding major release numbers to the deprecate, obsolete and expire columns.
+ *
+ * To remove internal options (e.g. diagnostic, experimental, develop options), use
+ * a 2-step model adding major release numbers to the obsolete and expire columns.
+ *
+ * To change the name of an option, use the alias table as well as a 2-step
+ * model adding major release numbers to the deprecate and expire columns.
+ * Think twice about aliasing commonly used customer options.
+ *
+ * There are times when it is appropriate to leave a future release number as undefined.
+ *
+ * Tests: Aliases should be tested in VMAliasOptions.java.
+ * Deprecated options should be tested in VMDeprecatedOptions.java.
*/
+
+// Obsolete or deprecated -XX flag.
typedef struct {
const char* name;
- JDK_Version obsoleted_in; // when the flag went away
- JDK_Version accept_until; // which version to start denying the existence
-} ObsoleteFlag;
-
-static ObsoleteFlag obsolete_jvm_flags[] = {
- { "UseOldInlining", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "SafepointPollOffset", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "UseBoundThreads", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "DefaultThreadPriority", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "NoYieldsInMicrolock", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "BackEdgeThreshold", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "UseNewReflection", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "ReflectionWrapResolutionErrors",JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "VerifyReflectionBytecodes", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "AutoShutdownNMT", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "NmethodSweepFraction", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "NmethodSweepCheckInterval", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "CodeCacheMinimumFreeSpace", JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ JDK_Version deprecated_in; // When the deprecation warning started (or "undefined").
+ JDK_Version obsolete_in; // When the obsolete warning started (or "undefined").
+ JDK_Version expired_in; // When the option expires (or "undefined").
+} SpecialFlag;
+
+// The special_jvm_flags table declares options that are being deprecated and/or obsoleted. The
+// "deprecated_in" or "obsolete_in" fields may be set to "undefined", but not both.
+// When the JDK version reaches 'deprecated_in' limit, the JVM will process this flag on
+// the command-line as usual, but will issue a warning.
+// When the JDK version reaches 'obsolete_in' limit, the JVM will continue accepting this flag on
+// the command-line, while issuing a warning and ignoring the flag value.
+// Once the JDK version reaches 'expired_in' limit, the JVM will flatly refuse to admit the
+// existence of the flag.
+//
+// MANUAL CLEANUP ON JDK VERSION UPDATES:
+// This table ensures that the handling of options will update automatically when the JDK
+// version is incremented, but the source code needs to be cleanup up manually:
+// - As "deprecated" options age into "obsolete" or "expired" options, the associated "globals"
+// variable should be removed, as well as users of the variable.
+// - As "deprecated" options age into "obsolete" options, move the entry into the
+// "Obsolete Flags" section of the table.
+// - All expired options should be removed from the table.
+static SpecialFlag const special_jvm_flags[] = {
+ // -------------- Deprecated Flags --------------
+ // --- Non-alias flags - sorted by obsolete_in then expired_in:
+ { "MaxGCMinorPauseMillis", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
+ { "UseParNewGC", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+
+ // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
+ { "DefaultMaxRAMFraction", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
+ { "CreateMinidumpOnCrash", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
+ { "CMSMarkStackSizeMax", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+ { "CMSMarkStackSize", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+ { "G1MarkStackSize", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+ { "ParallelMarkingThreads", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+ { "ParallelCMSThreads", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+
+ // -------------- Obsolete Flags - sorted by expired_in --------------
+ { "UseOldInlining", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "SafepointPollOffset", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "UseBoundThreads", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "DefaultThreadPriority", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "NoYieldsInMicrolock", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "BackEdgeThreshold", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "UseNewReflection", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "ReflectionWrapResolutionErrors",JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "VerifyReflectionBytecodes", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "AutoShutdownNMT", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "NmethodSweepFraction", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "NmethodSweepCheckInterval", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "CodeCacheMinimumFreeSpace", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
#ifndef ZERO
- { "UseFastAccessorMethods", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "UseFastEmptyMethods", JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "UseFastAccessorMethods", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "UseFastEmptyMethods", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
#endif // ZERO
- { "UseCompilerSafepoints", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "AdaptiveSizePausePolicy", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "ParallelGCRetainPLAB", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "ThreadSafetyMargin", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "LazyBootClassLoader", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "StarvationMonitorInterval", JDK_Version::jdk(9), JDK_Version::jdk(10) },
- { "PreInflateSpin", JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "UseCompilerSafepoints", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "AdaptiveSizePausePolicy", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "ParallelGCRetainPLAB", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "ThreadSafetyMargin", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "LazyBootClassLoader", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "StarvationMonitorInterval", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+ { "PreInflateSpin", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+
+#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
+ { "dep > obs", JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
+ { "dep > exp ", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(8) },
+ { "obs > exp ", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(8) },
+ { "not deprecated or obsolete", JDK_Version::undefined(), JDK_Version::undefined(), JDK_Version::jdk(9) },
+ { "dup option", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
+ { "dup option", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
+ { "BytecodeVerificationRemote", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::undefined() },
+#endif
+
{ NULL, JDK_Version(0), JDK_Version(0) }
};
-// Returns true if the flag is obsolete and fits into the range specified
-// for being ignored. In the case that the flag is ignored, the 'version'
-// value is filled in with the version number when the flag became
-// obsolete so that that value can be displayed to the user.
-bool Arguments::is_newly_obsolete(const char *s, JDK_Version* version) {
- int i = 0;
- assert(version != NULL, "Must provide a version buffer");
- while (obsolete_jvm_flags[i].name != NULL) {
- const ObsoleteFlag& flag_status = obsolete_jvm_flags[i];
- // <flag>=xxx form
- // [-|+]<flag> form
- size_t len = strlen(flag_status.name);
- if ((strncmp(flag_status.name, s, len) == 0) &&
- (strlen(s) == len)){
- if (JDK_Version::current().compare(flag_status.accept_until) == -1) {
- *version = flag_status.obsoleted_in;
- return true;
- }
+// Flags that are aliases for other flags.
+typedef struct {
+ const char* alias_name;
+ const char* real_name;
+} AliasedFlag;
+
+static AliasedFlag const aliased_jvm_flags[] = {
+ { "DefaultMaxRAMFraction", "MaxRAMFraction" },
+ { "CMSMarkStackSizeMax", "MarkStackSizeMax" },
+ { "CMSMarkStackSize", "MarkStackSize" },
+ { "G1MarkStackSize", "MarkStackSize" },
+ { "ParallelMarkingThreads", "ConcGCThreads" },
+ { "ParallelCMSThreads", "ConcGCThreads" },
+ { "CreateMinidumpOnCrash", "CreateCoredumpOnCrash" },
+ { NULL, NULL}
+};
+
+// Return true if "v" is less than "other", where "other" may be "undefined".
+static bool version_less_than(JDK_Version v, JDK_Version other) {
+ assert(!v.is_undefined(), "must be defined");
+ if (!other.is_undefined() && v.compare(other) >= 0) {
+ return false;
+ } else {
+ return true;
+ }
+}
+
+static bool lookup_special_flag(const char *flag_name, SpecialFlag& flag) {
+ for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) {
+ if ((strcmp(special_jvm_flags[i].name, flag_name) == 0)) {
+ flag = special_jvm_flags[i];
+ return true;
}
- i++;
}
return false;
}
+bool Arguments::is_obsolete_flag(const char *flag_name, JDK_Version* version) {
+ assert(version != NULL, "Must provide a version buffer");
+ SpecialFlag flag;
+ if (lookup_special_flag(flag_name, flag)) {
+ if (!flag.obsolete_in.is_undefined()) {
+ if (version_less_than(JDK_Version::current(), flag.expired_in)) {
+ *version = flag.obsolete_in;
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+int Arguments::is_deprecated_flag(const char *flag_name, JDK_Version* version) {
+ assert(version != NULL, "Must provide a version buffer");
+ SpecialFlag flag;
+ if (lookup_special_flag(flag_name, flag)) {
+ if (!flag.deprecated_in.is_undefined()) {
+ if (version_less_than(JDK_Version::current(), flag.obsolete_in) &&
+ version_less_than(JDK_Version::current(), flag.expired_in)) {
+ *version = flag.deprecated_in;
+ return 1;
+ } else {
+ return -1;
+ }
+ }
+ }
+ return 0;
+}
+
+const char* Arguments::real_flag_name(const char *flag_name) {
+ for (size_t i = 0; aliased_jvm_flags[i].alias_name != NULL; i++) {
+ const AliasedFlag& flag_status = aliased_jvm_flags[i];
+ if (strcmp(flag_status.alias_name, flag_name) == 0) {
+ return flag_status.real_name;
+ }
+ }
+ return flag_name;
+}
+
+#ifndef PRODUCT
+static bool lookup_special_flag(const char *flag_name, size_t skip_index) {
+ for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) {
+ if ((i != skip_index) && (strcmp(special_jvm_flags[i].name, flag_name) == 0)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+static bool verify_special_jvm_flags() {
+ bool success = true;
+ for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) {
+ const SpecialFlag& flag = special_jvm_flags[i];
+ if (lookup_special_flag(flag.name, i)) {
+ warning("Duplicate special flag declaration \"%s\"", flag.name);
+ success = false;
+ }
+ if (flag.deprecated_in.is_undefined() &&
+ flag.obsolete_in.is_undefined()) {
+ warning("Special flag entry \"%s\" must declare version deprecated and/or obsoleted in.", flag.name);
+ success = false;
+ }
+
+ if (!flag.deprecated_in.is_undefined()) {
+ if (!version_less_than(flag.deprecated_in, flag.obsolete_in)) {
+ warning("Special flag entry \"%s\" must be deprecated before obsoleted.", flag.name);
+ success = false;
+ }
+
+ if (!version_less_than(flag.deprecated_in, flag.expired_in)) {
+ warning("Special flag entry \"%s\" must be deprecated before expired.", flag.name);
+ success = false;
+ }
+ }
+
+ if (!flag.obsolete_in.is_undefined()) {
+ if (!version_less_than(flag.obsolete_in, flag.expired_in)) {
+ warning("Special flag entry \"%s\" must be obsoleted before expired.", flag.name);
+ success = false;
+ }
+
+ // if flag has become obsolete it should not have a "globals" flag defined anymore.
+ if (!version_less_than(JDK_Version::current(), flag.obsolete_in)) {
+ if (Flag::find_flag(flag.name) != NULL) {
+ warning("Global variable for obsolete special flag entry \"%s\" should be removed", flag.name);
+ success = false;
+ }
+ }
+ }
+
+ if (!flag.expired_in.is_undefined()) {
+ // if flag has become expired it should not have a "globals" flag defined anymore.
+ if (!version_less_than(JDK_Version::current(), flag.expired_in)) {
+ if (Flag::find_flag(flag.name) != NULL) {
+ warning("Global variable for expired flag entry \"%s\" should be removed", flag.name);
+ success = false;
+ }
+ }
+ }
+
+ }
+ return success;
+}
+#endif
+
// Constructs the system class path (aka boot class path) from the following
// components, in order:
//
@@ -571,7 +784,7 @@
}
}
-static bool set_bool_flag(char* name, bool value, Flag::Flags origin) {
+static bool set_bool_flag(const char* name, bool value, Flag::Flags origin) {
if (CommandLineFlags::boolAtPut(name, &value, origin) == Flag::SUCCESS) {
return true;
} else {
@@ -579,7 +792,7 @@
}
}
-static bool set_fp_numeric_flag(char* name, char* value, Flag::Flags origin) {
+static bool set_fp_numeric_flag(const char* name, char* value, Flag::Flags origin) {
double v;
if (sscanf(value, "%lf", &v) != 1) {
return false;
@@ -591,7 +804,7 @@
return false;
}
-static bool set_numeric_flag(char* name, char* value, Flag::Flags origin) {
+static bool set_numeric_flag(const char* name, char* value, Flag::Flags origin) {
julong v;
int int_v;
intx intx_v;
@@ -640,14 +853,14 @@
return false;
}
-static bool set_string_flag(char* name, const char* value, Flag::Flags origin) {
+static bool set_string_flag(const char* name, const char* value, Flag::Flags origin) {
if (CommandLineFlags::ccstrAtPut(name, &value, origin) != Flag::SUCCESS) return false;
// Contract: CommandLineFlags always returns a pointer that needs freeing.
FREE_C_HEAP_ARRAY(char, value);
return true;
}
-static bool append_to_string_flag(char* name, const char* new_value, Flag::Flags origin) {
+static bool append_to_string_flag(const char* name, const char* new_value, Flag::Flags origin) {
const char* old_value = "";
if (CommandLineFlags::ccstrAt(name, &old_value) != Flag::SUCCESS) return false;
size_t old_len = old_value != NULL ? strlen(old_value) : 0;
@@ -675,6 +888,33 @@
return true;
}
+const char* Arguments::handle_aliases_and_deprecation(const char* arg, bool warn) {
+ const char* real_name = real_flag_name(arg);
+ JDK_Version since = JDK_Version();
+ switch (is_deprecated_flag(arg, &since)) {
+ case -1:
+ return NULL; // obsolete or expired, don't process normally
+ case 0:
+ return real_name;
+ case 1: {
+ if (warn) {
+ char version[256];
+ since.to_string(version, sizeof(version));
+ if (real_name != arg) {
+ warning("Option %s was deprecated in version %s and will likely be removed in a future release. Use option %s instead.",
+ arg, version, real_name);
+ } else {
+ warning("Option %s was deprecated in version %s and will likely be removed in a future release.",
+ arg, version);
+ }
+ }
+ return real_name;
+ }
+ }
+ ShouldNotReachHere();
+ return NULL;
+}
+
bool Arguments::parse_argument(const char* arg, Flag::Flags origin) {
// range of acceptable characters spelled out for portability reasons
@@ -682,27 +922,46 @@
#define BUFLEN 255
char name[BUFLEN+1];
char dummy;
+ const char* real_name;
+ bool warn_if_deprecated = true;
if (sscanf(arg, "-%" XSTR(BUFLEN) NAME_RANGE "%c", name, &dummy) == 1) {
- return set_bool_flag(name, false, origin);
+ real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+ if (real_name == NULL) {
+ return false;
+ }
+ return set_bool_flag(real_name, false, origin);
}
if (sscanf(arg, "+%" XSTR(BUFLEN) NAME_RANGE "%c", name, &dummy) == 1) {
- return set_bool_flag(name, true, origin);
+ real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+ if (real_name == NULL) {
+ return false;
+ }
+ return set_bool_flag(real_name, true, origin);
}
char punct;
if (sscanf(arg, "%" XSTR(BUFLEN) NAME_RANGE "%c", name, &punct) == 2 && punct == '=') {
const char* value = strchr(arg, '=') + 1;
- Flag* flag = Flag::find_flag(name, strlen(name));
+ Flag* flag;
+
+ // this scanf pattern matches both strings (handled here) and numbers (handled later))
+ real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+ if (real_name == NULL) {
+ return false;
+ }
+ flag = Flag::find_flag(real_name);
if (flag != NULL && flag->is_ccstr()) {
if (flag->ccstr_accumulates()) {
- return append_to_string_flag(name, value, origin);
+ return append_to_string_flag(real_name, value, origin);
} else {
if (value[0] == '\0') {
value = NULL;
}
- return set_string_flag(name, value, origin);
+ return set_string_flag(real_name, value, origin);
}
+ } else {
+ warn_if_deprecated = false; // if arg is deprecated, we've already done warning...
}
}
@@ -712,7 +971,11 @@
if (value[0] == '\0') {
value = NULL;
}
- return set_string_flag(name, value, origin);
+ real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+ if (real_name == NULL) {
+ return false;
+ }
+ return set_string_flag(real_name, value, origin);
}
#define SIGNED_FP_NUMBER_RANGE "[-0123456789.]"
@@ -723,13 +986,21 @@
if (sscanf(arg, "%" XSTR(BUFLEN) NAME_RANGE "=" "%" XSTR(BUFLEN) SIGNED_NUMBER_RANGE "." "%" XSTR(BUFLEN) NUMBER_RANGE "%c", name, value, value2, &dummy) == 3) {
// Looks like a floating-point number -- try again with more lenient format string
if (sscanf(arg, "%" XSTR(BUFLEN) NAME_RANGE "=" "%" XSTR(BUFLEN) SIGNED_FP_NUMBER_RANGE "%c", name, value, &dummy) == 2) {
- return set_fp_numeric_flag(name, value, origin);
+ real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+ if (real_name == NULL) {
+ return false;
+ }
+ return set_fp_numeric_flag(real_name, value, origin);
}
}
#define VALUE_RANGE "[-kmgtxKMGTX0123456789abcdefABCDEF]"
if (sscanf(arg, "%" XSTR(BUFLEN) NAME_RANGE "=" "%" XSTR(BUFLEN) VALUE_RANGE "%c", name, value, &dummy) == 2) {
- return set_numeric_flag(name, value, origin);
+ real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
+ if (real_name == NULL) {
+ return false;
+ }
+ return set_numeric_flag(real_name, value, origin);
}
return false;
@@ -837,8 +1108,8 @@
}
bool Arguments::process_argument(const char* arg,
- jboolean ignore_unrecognized, Flag::Flags origin) {
-
+ jboolean ignore_unrecognized,
+ Flag::Flags origin) {
JDK_Version since = JDK_Version();
if (parse_argument(arg, origin) || ignore_unrecognized) {
@@ -864,10 +1135,10 @@
strncpy(stripped_argname, argname, arg_len);
stripped_argname[arg_len] = '\0'; // strncpy may not null terminate.
- if (is_newly_obsolete(stripped_argname, &since)) {
+ if (is_obsolete_flag(stripped_argname, &since)) {
char version[256];
since.to_string(version, sizeof(version));
- warning("ignoring option %s; support was removed in %s", stripped_argname, version);
+ warning("Ignoring option %s; support was removed in %s", stripped_argname, version);
return true;
}
}
@@ -1235,7 +1506,7 @@
static void disable_adaptive_size_policy(const char* collector_name) {
if (UseAdaptiveSizePolicy) {
if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
- warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
+ warning("Disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
collector_name);
}
FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
@@ -1707,7 +1978,6 @@
} else if (UseG1GC) {
set_g1_gc_flags();
}
- check_deprecated_gc_flags();
if (AssumeMP && !UseSerialGC) {
if (FLAG_IS_DEFAULT(ParallelGCThreads) && ParallelGCThreads == 1) {
warning("If the number of processors is expected to increase from one, then"
@@ -1737,11 +2007,6 @@
static const size_t DefaultHeapBaseMinAddress = HeapBaseMinAddress;
void Arguments::set_heap_size() {
- if (!FLAG_IS_DEFAULT(DefaultMaxRAMFraction)) {
- // Deprecated flag
- FLAG_SET_CMDLINE(uintx, MaxRAMFraction, DefaultMaxRAMFraction);
- }
-
const julong phys_mem =
FLAG_IS_DEFAULT(MaxRAM) ? MIN2(os::physical_memory(), (julong)MaxRAM)
: (julong)MaxRAM;
@@ -1844,6 +2109,122 @@
}
}
+// This option inspects the machine and attempts to set various
+// parameters to be optimal for long-running, memory allocation
+// intensive jobs. It is intended for machines with large
+// amounts of cpu and memory.
+jint Arguments::set_aggressive_heap_flags() {
+ // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit
+ // VM, but we may not be able to represent the total physical memory
+ // available (like having 8gb of memory on a box but using a 32bit VM).
+ // Thus, we need to make sure we're using a julong for intermediate
+ // calculations.
+ julong initHeapSize;
+ julong total_memory = os::physical_memory();
+
+ if (total_memory < (julong) 256 * M) {
+ jio_fprintf(defaultStream::error_stream(),
+ "You need at least 256mb of memory to use -XX:+AggressiveHeap\n");
+ vm_exit(1);
+ }
+
+ // The heap size is half of available memory, or (at most)
+ // all of possible memory less 160mb (leaving room for the OS
+ // when using ISM). This is the maximum; because adaptive sizing
+ // is turned on below, the actual space used may be smaller.
+
+ initHeapSize = MIN2(total_memory / (julong) 2,
+ total_memory - (julong) 160 * M);
+
+ initHeapSize = limit_by_allocatable_memory(initHeapSize);
+
+ if (FLAG_IS_DEFAULT(MaxHeapSize)) {
+ if (FLAG_SET_CMDLINE(size_t, MaxHeapSize, initHeapSize) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+ if (FLAG_SET_CMDLINE(size_t, InitialHeapSize, initHeapSize) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+ // Currently the minimum size and the initial heap sizes are the same.
+ set_min_heap_size(initHeapSize);
+ }
+ if (FLAG_IS_DEFAULT(NewSize)) {
+ // Make the young generation 3/8ths of the total heap.
+ if (FLAG_SET_CMDLINE(size_t, NewSize,
+ ((julong) MaxHeapSize / (julong) 8) * (julong) 3) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+ if (FLAG_SET_CMDLINE(size_t, MaxNewSize, NewSize) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+ }
+
+#if !defined(_ALLBSD_SOURCE) && !defined(AIX) // UseLargePages is not yet supported on BSD and AIX.
+ FLAG_SET_DEFAULT(UseLargePages, true);
+#endif
+
+ // Increase some data structure sizes for efficiency
+ if (FLAG_SET_CMDLINE(size_t, BaseFootPrintEstimate, MaxHeapSize) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+ if (FLAG_SET_CMDLINE(bool, ResizeTLAB, false) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+ if (FLAG_SET_CMDLINE(size_t, TLABSize, 256 * K) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+
+ // See the OldPLABSize comment below, but replace 'after promotion'
+ // with 'after copying'. YoungPLABSize is the size of the survivor
+ // space per-gc-thread buffers. The default is 4kw.
+ if (FLAG_SET_CMDLINE(size_t, YoungPLABSize, 256 * K) != Flag::SUCCESS) { // Note: this is in words
+ return JNI_EINVAL;
+ }
+
+ // OldPLABSize is the size of the buffers in the old gen that
+ // UseParallelGC uses to promote live data that doesn't fit in the
+ // survivor spaces. At any given time, there's one for each gc thread.
+ // The default size is 1kw. These buffers are rarely used, since the
+ // survivor spaces are usually big enough. For specjbb, however, there
+ // are occasions when there's lots of live data in the young gen
+ // and we end up promoting some of it. We don't have a definite
+ // explanation for why bumping OldPLABSize helps, but the theory
+ // is that a bigger PLAB results in retaining something like the
+ // original allocation order after promotion, which improves mutator
+ // locality. A minor effect may be that larger PLABs reduce the
+ // number of PLAB allocation events during gc. The value of 8kw
+ // was arrived at by experimenting with specjbb.
+ if (FLAG_SET_CMDLINE(size_t, OldPLABSize, 8 * K) != Flag::SUCCESS) { // Note: this is in words
+ return JNI_EINVAL;
+ }
+
+ // Enable parallel GC and adaptive generation sizing
+ if (FLAG_SET_CMDLINE(bool, UseParallelGC, true) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+ FLAG_SET_DEFAULT(ParallelGCThreads,
+ Abstract_VM_Version::parallel_worker_threads());
+
+ // Encourage steady state memory management
+ if (FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+
+ // This appears to improve mutator locality
+ if (FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+
+ // Get around early Solaris scheduling bug
+ // (affinity vs other jobs on system)
+ // but disallow DR and offlining (5008695).
+ if (FLAG_SET_CMDLINE(bool, BindGCTaskThreadsToCPUs, true) != Flag::SUCCESS) {
+ return JNI_EINVAL;
+ }
+
+ return JNI_OK;
+}
+
// This must be called after ergonomics.
void Arguments::set_bytecode_flags() {
if (!RewriteBytecodes) {
@@ -2027,20 +2408,6 @@
return true;
}
-void Arguments::check_deprecated_gc_flags() {
- if (FLAG_IS_CMDLINE(UseParNewGC)) {
- warning("The UseParNewGC flag is deprecated and will likely be removed in a future release");
- }
- if (FLAG_IS_CMDLINE(MaxGCMinorPauseMillis)) {
- warning("Using MaxGCMinorPauseMillis as minor pause goal is deprecated"
- "and will likely be removed in future release");
- }
- if (FLAG_IS_CMDLINE(DefaultMaxRAMFraction)) {
- warning("DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. "
- "Use MaxRAMFraction instead.");
- }
-}
-
// Check the consistency of vm_init_args
bool Arguments::check_vm_args_consistency() {
// Method for adding checks for flag consistency.
@@ -2576,7 +2943,7 @@
// All these options are deprecated in JDK 9 and will be removed in a future release
char version[256];
JDK_Version::jdk(9).to_string(version, sizeof(version));
- warning("ignoring option %s; support was removed in %s", option->optionString, version);
+ warning("Ignoring option %s; support was removed in %s", option->optionString, version);
} else if (match_option(option, "-XX:CodeCacheExpansionSize=", &tail)) {
julong long_CodeCacheExpansionSize = 0;
ArgsRange errcode = parse_memory_size(tail, &long_CodeCacheExpansionSize, os::vm_page_size());
@@ -2843,120 +3210,10 @@
_abort_hook = CAST_TO_FN_PTR(abort_hook_t, option->extraInfo);
// -XX:+AggressiveHeap
} else if (match_option(option, "-XX:+AggressiveHeap")) {
-
- // This option inspects the machine and attempts to set various
- // parameters to be optimal for long-running, memory allocation
- // intensive jobs. It is intended for machines with large
- // amounts of cpu and memory.
-
- // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit
- // VM, but we may not be able to represent the total physical memory
- // available (like having 8gb of memory on a box but using a 32bit VM).
- // Thus, we need to make sure we're using a julong for intermediate
- // calculations.
- julong initHeapSize;
- julong total_memory = os::physical_memory();
-
- if (total_memory < (julong)256*M) {
- jio_fprintf(defaultStream::error_stream(),
- "You need at least 256mb of memory to use -XX:+AggressiveHeap\n");
- vm_exit(1);
- }
-
- // The heap size is half of available memory, or (at most)
- // all of possible memory less 160mb (leaving room for the OS
- // when using ISM). This is the maximum; because adaptive sizing
- // is turned on below, the actual space used may be smaller.
-
- initHeapSize = MIN2(total_memory / (julong)2,
- total_memory - (julong)160*M);
-
- initHeapSize = limit_by_allocatable_memory(initHeapSize);
-
- if (FLAG_IS_DEFAULT(MaxHeapSize)) {
- if (FLAG_SET_CMDLINE(size_t, MaxHeapSize, initHeapSize) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- if (FLAG_SET_CMDLINE(size_t, InitialHeapSize, initHeapSize) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- // Currently the minimum size and the initial heap sizes are the same.
- set_min_heap_size(initHeapSize);
- }
- if (FLAG_IS_DEFAULT(NewSize)) {
- // Make the young generation 3/8ths of the total heap.
- if (FLAG_SET_CMDLINE(size_t, NewSize,
- ((julong)MaxHeapSize / (julong)8) * (julong)3) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- if (FLAG_SET_CMDLINE(size_t, MaxNewSize, NewSize) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
+ jint result = set_aggressive_heap_flags();
+ if (result != JNI_OK) {
+ return result;
}
-
-#if !defined(_ALLBSD_SOURCE) && !defined(AIX) // UseLargePages is not yet supported on BSD and AIX.
- FLAG_SET_DEFAULT(UseLargePages, true);
-#endif
-
- // Increase some data structure sizes for efficiency
- if (FLAG_SET_CMDLINE(size_t, BaseFootPrintEstimate, MaxHeapSize) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- if (FLAG_SET_CMDLINE(bool, ResizeTLAB, false) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- if (FLAG_SET_CMDLINE(size_t, TLABSize, 256*K) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
-
- // See the OldPLABSize comment below, but replace 'after promotion'
- // with 'after copying'. YoungPLABSize is the size of the survivor
- // space per-gc-thread buffers. The default is 4kw.
- if (FLAG_SET_CMDLINE(size_t, YoungPLABSize, 256*K) != Flag::SUCCESS) { // Note: this is in words
- return JNI_EINVAL;
- }
-
- // OldPLABSize is the size of the buffers in the old gen that
- // UseParallelGC uses to promote live data that doesn't fit in the
- // survivor spaces. At any given time, there's one for each gc thread.
- // The default size is 1kw. These buffers are rarely used, since the
- // survivor spaces are usually big enough. For specjbb, however, there
- // are occasions when there's lots of live data in the young gen
- // and we end up promoting some of it. We don't have a definite
- // explanation for why bumping OldPLABSize helps, but the theory
- // is that a bigger PLAB results in retaining something like the
- // original allocation order after promotion, which improves mutator
- // locality. A minor effect may be that larger PLABs reduce the
- // number of PLAB allocation events during gc. The value of 8kw
- // was arrived at by experimenting with specjbb.
- if (FLAG_SET_CMDLINE(size_t, OldPLABSize, 8*K) != Flag::SUCCESS) { // Note: this is in words
- return JNI_EINVAL;
- }
-
- // Enable parallel GC and adaptive generation sizing
- if (FLAG_SET_CMDLINE(bool, UseParallelGC, true) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- FLAG_SET_DEFAULT(ParallelGCThreads,
- Abstract_VM_Version::parallel_worker_threads());
-
- // Encourage steady state memory management
- if (FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
-
- // This appears to improve mutator locality
- if (FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
-
- // Get around early Solaris scheduling bug
- // (affinity vs other jobs on system)
- // but disallow DR and offlining (5008695).
- if (FLAG_SET_CMDLINE(bool, BindGCTaskThreadsToCPUs, true) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
-
// Need to keep consistency of MaxTenuringThreshold and AlwaysTenure/NeverTenure;
// and the last option wins.
} else if (match_option(option, "-XX:+NeverTenure")) {
@@ -3049,52 +3306,6 @@
return JNI_EINVAL;
}
#endif
- } else if (match_option(option, "-XX:CMSMarkStackSize=", &tail) ||
- match_option(option, "-XX:G1MarkStackSize=", &tail)) {
- julong stack_size = 0;
- ArgsRange errcode = parse_memory_size(tail, &stack_size, 1);
- if (errcode != arg_in_range) {
- jio_fprintf(defaultStream::error_stream(),
- "Invalid mark stack size: %s\n", option->optionString);
- describe_range_error(errcode);
- return JNI_EINVAL;
- }
- jio_fprintf(defaultStream::error_stream(),
- "Please use -XX:MarkStackSize in place of "
- "-XX:CMSMarkStackSize or -XX:G1MarkStackSize in the future\n");
- if (FLAG_SET_CMDLINE(size_t, MarkStackSize, stack_size) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- } else if (match_option(option, "-XX:CMSMarkStackSizeMax=", &tail)) {
- julong max_stack_size = 0;
- ArgsRange errcode = parse_memory_size(tail, &max_stack_size, 1);
- if (errcode != arg_in_range) {
- jio_fprintf(defaultStream::error_stream(),
- "Invalid maximum mark stack size: %s\n",
- option->optionString);
- describe_range_error(errcode);
- return JNI_EINVAL;
- }
- jio_fprintf(defaultStream::error_stream(),
- "Please use -XX:MarkStackSizeMax in place of "
- "-XX:CMSMarkStackSizeMax in the future\n");
- if (FLAG_SET_CMDLINE(size_t, MarkStackSizeMax, max_stack_size) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- } else if (match_option(option, "-XX:ParallelMarkingThreads=", &tail) ||
- match_option(option, "-XX:ParallelCMSThreads=", &tail)) {
- uintx conc_threads = 0;
- if (!parse_uintx(tail, &conc_threads, 1)) {
- jio_fprintf(defaultStream::error_stream(),
- "Invalid concurrent threads: %s\n", option->optionString);
- return JNI_EINVAL;
- }
- jio_fprintf(defaultStream::error_stream(),
- "Please use -XX:ConcGCThreads in place of "
- "-XX:ParallelMarkingThreads or -XX:ParallelCMSThreads in the future\n");
- if (FLAG_SET_CMDLINE(uint, ConcGCThreads, conc_threads) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
} else if (match_option(option, "-XX:MaxDirectMemorySize=", &tail)) {
julong max_direct_memory_size = 0;
ArgsRange errcode = parse_memory_size(tail, &max_direct_memory_size, 0);
@@ -3114,19 +3325,6 @@
"ManagementServer is not supported in this VM.\n");
return JNI_ERR;
#endif // INCLUDE_MANAGEMENT
- // CreateMinidumpOnCrash is removed, and replaced by CreateCoredumpOnCrash
- } else if (match_option(option, "-XX:+CreateMinidumpOnCrash")) {
- if (FLAG_SET_CMDLINE(bool, CreateCoredumpOnCrash, true) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- jio_fprintf(defaultStream::output_stream(),
- "CreateMinidumpOnCrash is replaced by CreateCoredumpOnCrash: CreateCoredumpOnCrash is on\n");
- } else if (match_option(option, "-XX:-CreateMinidumpOnCrash")) {
- if (FLAG_SET_CMDLINE(bool, CreateCoredumpOnCrash, false) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
- jio_fprintf(defaultStream::output_stream(),
- "CreateMinidumpOnCrash is replaced by CreateCoredumpOnCrash: CreateCoredumpOnCrash is off\n");
} else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
// Skip -XX:Flags= and -XX:VMOptionsFile= since those cases have
// already been handled
@@ -3623,7 +3821,7 @@
void Arguments::set_shared_spaces_flags() {
if (DumpSharedSpaces) {
if (RequireSharedSpaces) {
- warning("cannot dump shared archive while using shared archive");
+ warning("Cannot dump shared archive while using shared archive");
}
UseSharedSpaces = false;
#ifdef _LP64
@@ -3848,6 +4046,7 @@
// Parse entry point called from JNI_CreateJavaVM
jint Arguments::parse(const JavaVMInitArgs* args) {
+ assert(verify_special_jvm_flags(), "deprecated and obsolete flag table inconsistent");
// Initialize ranges and constraints
CommandLineFlagRangeList::init();
@@ -3984,7 +4183,7 @@
if (ScavengeRootsInCode == 0) {
if (!FLAG_IS_DEFAULT(ScavengeRootsInCode)) {
- warning("forcing ScavengeRootsInCode non-zero");
+ warning("Forcing ScavengeRootsInCode non-zero");
}
ScavengeRootsInCode = 1;
}
--- a/hotspot/src/share/vm/runtime/arguments.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/runtime/arguments.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -364,6 +364,8 @@
// Aggressive optimization flags.
static jint set_aggressive_opts_flags();
+ static jint set_aggressive_heap_flags();
+
// Argument parsing
static void do_pd_flag_adjustments();
static bool parse_argument(const char* arg, Flag::Flags origin);
@@ -427,11 +429,24 @@
short* methodsNum, short* methodsMax, char*** methods, bool** allClasses
);
- // Returns true if the string s is in the list of flags that have recently
- // been made obsolete. If we detect one of these flags on the command
- // line, instead of failing we print a warning message and ignore the
- // flag. This gives the user a release or so to stop using the flag.
- static bool is_newly_obsolete(const char* s, JDK_Version* buffer);
+ // Returns true if the flag is obsolete (and not yet expired).
+ // In this case the 'version' buffer is filled in with
+ // the version number when the flag became obsolete.
+ static bool is_obsolete_flag(const char* flag_name, JDK_Version* version);
+
+ // Returns 1 if the flag is deprecated (and not yet obsolete or expired).
+ // In this case the 'version' buffer is filled in with the version number when
+ // the flag became deprecated.
+ // Returns -1 if the flag is expired or obsolete.
+ // Returns 0 otherwise.
+ static int is_deprecated_flag(const char* flag_name, JDK_Version* version);
+
+ // Return the real name for the flag passed on the command line (either an alias name or "flag_name").
+ static const char* real_flag_name(const char *flag_name);
+
+ // Return the "real" name for option arg if arg is an alias, and print a warning if arg is deprecated.
+ // Return NULL if the arg has expired.
+ static const char* handle_aliases_and_deprecation(const char* arg, bool warn);
static short CompileOnlyClassesNum;
static short CompileOnlyClassesMax;
@@ -478,7 +493,6 @@
// Check for consistency in the selection of the garbage collector.
static bool check_gc_consistency(); // Check user-selected gc
- static void check_deprecated_gc_flags();
// Check consistency or otherwise of VM argument settings
static bool check_vm_args_consistency();
// Used by os_solaris
--- a/hotspot/src/share/vm/runtime/globals.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/runtime/globals.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -1599,7 +1599,7 @@
"(ParallelGC only)") \
\
product(bool, ScavengeBeforeFullGC, true, \
- "Scavenge young generation before each full GC.") \
+ "Scavenge youngest generation before each full GC.") \
\
develop(bool, ScavengeWithObjectsInToSpace, false, \
"Allow scavenges to occur when to-space contains objects") \
@@ -2097,7 +2097,7 @@
"promotion failure") \
\
notproduct(bool, PromotionFailureALot, false, \
- "Use promotion failure handling on every young generation " \
+ "Use promotion failure handling on every youngest generation " \
"collection") \
\
develop(uintx, PromotionFailureALotCount, 1000, \
@@ -2183,11 +2183,6 @@
"size") \
range(1, max_uintx) \
\
- product(uintx, DefaultMaxRAMFraction, 4, \
- "Maximum fraction (1/n) of real memory used for maximum heap " \
- "size; deprecated: to be renamed to MaxRAMFraction") \
- range(1, max_uintx) \
- \
product(uintx, MinRAMFraction, 2, \
"Minimum fraction (1/n) of real memory used for maximum heap " \
"size on systems with small physical memory size") \
--- a/hotspot/src/share/vm/runtime/java.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/runtime/java.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -137,6 +137,14 @@
return JDK_Version(major, 0, 0, update_number);
}
+ static JDK_Version undefined() {
+ return JDK_Version(0);
+ }
+
+ bool is_undefined() const {
+ return (_major == 0);
+ }
+
uint8_t major_version() const { return _major; }
uint8_t minor_version() const { return _minor; }
uint8_t micro_version() const { return _micro; }
--- a/hotspot/src/share/vm/runtime/jniHandles.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/runtime/jniHandles.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -124,8 +124,8 @@
}
-size_t JNIHandles::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
- return _weak_global_handles->weak_oops_do(is_alive, f);
+void JNIHandles::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
+ _weak_global_handles->weak_oops_do(is_alive, f);
}
@@ -380,9 +380,8 @@
}
-size_t JNIHandleBlock::weak_oops_do(BoolObjectClosure* is_alive,
- OopClosure* f) {
- size_t count = 0;
+void JNIHandleBlock::weak_oops_do(BoolObjectClosure* is_alive,
+ OopClosure* f) {
for (JNIHandleBlock* current = this; current != NULL; current = current->_next) {
assert(current->pop_frame_link() == NULL,
"blocks holding weak global JNI handles should not have pop frame link set");
@@ -391,7 +390,6 @@
oop value = *root;
// traverse heap pointers only, not deleted handles or free list pointers
if (value != NULL && Universe::heap()->is_in_reserved(value)) {
- count++;
if (is_alive->do_object_b(value)) {
// The weakly referenced object is alive, update pointer
f->do_oop(root);
@@ -414,9 +412,7 @@
* JVMTI data structures may also contain weak oops. The iteration of them
* is placed here so that we don't need to add it to each of the collectors.
*/
- count += JvmtiExport::weak_oops_do(is_alive, f);
-
- return count;
+ JvmtiExport::weak_oops_do(is_alive, f);
}
--- a/hotspot/src/share/vm/runtime/jniHandles.hpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/runtime/jniHandles.hpp Mon Oct 12 14:41:36 2015 -0700
@@ -85,7 +85,7 @@
// Traversal of regular global handles
static void oops_do(OopClosure* f);
// Traversal of weak global handles. Unreachable oops are cleared.
- static size_t weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
+ static void weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
};
@@ -153,7 +153,7 @@
// Traversal of regular handles
void oops_do(OopClosure* f);
// Traversal of weak handles. Unreachable oops are cleared.
- size_t weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
+ void weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
// Checked JNI support
void set_planned_capacity(size_t planned_capacity) { _planned_capacity = planned_capacity; }
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp Mon Oct 12 14:41:36 2015 -0700
@@ -383,7 +383,7 @@
nonstatic_field(Method, _access_flags, AccessFlags) \
nonstatic_field(Method, _vtable_index, int) \
nonstatic_field(Method, _method_size, u2) \
- nonstatic_field(Method, _intrinsic_id, u1) \
+ nonstatic_field(Method, _intrinsic_id, u2) \
nonproduct_nonstatic_field(Method, _compiled_invocation_count, int) \
volatile_nonstatic_field(Method, _code, nmethod*) \
nonstatic_field(Method, _i2i_entry, address) \
--- a/hotspot/test/TEST.groups Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/test/TEST.groups Mon Oct 12 14:41:36 2015 -0700
@@ -190,7 +190,6 @@
gc/g1/TestShrinkToOneRegion.java \
gc/metaspace/G1AddMetaspaceDependency.java \
gc/startup_warnings/TestCMS.java \
- gc/startup_warnings/TestDefaultMaxRAMFraction.java \
gc/startup_warnings/TestDefNewCMS.java \
gc/startup_warnings/TestParallelGC.java \
gc/startup_warnings/TestParallelScavengeSerialOld.java \
--- a/hotspot/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java Mon Oct 12 14:41:36 2015 -0700
@@ -23,8 +23,8 @@
import sun.hotspot.WhiteBox;
import sun.misc.Unsafe;
-import sun.misc.IOUtils;
+import java.io.IOException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLConnection;
@@ -109,7 +109,13 @@
// (1) Load an anonymous version of this class using the corresponding Unsafe method
URL classUrl = TestAnonymousClassUnloading.class.getResource("TestAnonymousClassUnloading.class");
URLConnection connection = classUrl.openConnection();
- byte[] classBytes = IOUtils.readFully(connection.getInputStream(), connection.getContentLength(), true);
+
+ int length = connection.getContentLength();
+ byte[] classBytes = connection.getInputStream().readAllBytes();
+ if (length != -1 && classBytes.length != length) {
+ throw new IOException("Expected:" + length + ", actual: " + classBytes.length);
+ }
+
Class<?> anonymousClass = UNSAFE.defineAnonymousClass(TestAnonymousClassUnloading.class, classBytes, null);
// (2) Make sure all paths of doWork are profiled and compiled
--- a/hotspot/test/gc/logging/TestPrintReferences.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2015, 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.
- *
- * 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.
- */
-
-/*
- * @test TestPrintReferences
- * @bug 8133818
- * @summary Validate the reference processing logging
- * @key gc
- * @library /testlibrary
- * @modules java.base/sun.misc
- * java.management
- */
-
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
-
-public class TestPrintReferences {
- public static void main(String[] args) throws Exception {
- ProcessBuilder pb_enabled =
- ProcessTools.createJavaProcessBuilder("-XX:+PrintGCDetails", "-XX:+PrintReferenceGC", "-Xmx10M", GCTest.class.getName());
- OutputAnalyzer output = new OutputAnalyzer(pb_enabled.start());
-
- output.shouldMatch(
- "#[0-9]+: \\[SoftReference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
- "#[0-9]+: \\[WeakReference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
- "#[0-9]+: \\[FinalReference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
- "#[0-9]+: \\[PhantomReference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
- "#[0-9]+: \\[Cleaners, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]" +
- "#[0-9]+: \\[JNI Weak Reference, [0-9]+ refs, [0-9]+\\.[0-9]+ secs\\]");
-
- output.shouldHaveExitValue(0);
- }
-
- static class GCTest {
- public static void main(String [] args) {
- System.gc();
- }
- }
-}
--- a/hotspot/test/gc/startup_warnings/TestDefaultMaxRAMFraction.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2013, 2015, 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.
-*
-* 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.
-*/
-
-/*
-* @test TestDefaultMaxRAMFraction
-* @key gc
-* @bug 8021967
-* @summary Test that the deprecated TestDefaultMaxRAMFraction flag print a warning message
-* @library /testlibrary
-* @modules java.base/sun.misc
-* java.management
-*/
-
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
-
-public class TestDefaultMaxRAMFraction {
- public static void main(String[] args) throws Exception {
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:DefaultMaxRAMFraction=4", "-version");
- OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("warning: DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. Use MaxRAMFraction instead.");
- output.shouldNotContain("error");
- output.shouldHaveExitValue(0);
- }
-
-}
--- a/hotspot/test/gc/startup_warnings/TestNoParNew.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2014, 2015, 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.
-*
-* 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.
-*/
-
-/*
-* @test TestNoParNew
-* @key gc
-* @bug 8065972
-* @summary Test that specifying -XX:-UseParNewGC on the command line logs a warning message
-* @library /testlibrary
-* @modules java.base/sun.misc
-* java.management
-*/
-
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
-
-
-public class TestNoParNew {
-
- public static void main(String args[]) throws Exception {
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:-UseParNewGC", "-version");
- OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("warning: The UseParNewGC flag is deprecated and will likely be removed in a future release");
- output.shouldNotContain("error");
- output.shouldHaveExitValue(0);
- }
-
-}
--- a/hotspot/test/gc/startup_warnings/TestParNewCMS.java Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/test/gc/startup_warnings/TestParNewCMS.java Mon Oct 12 14:41:36 2015 -0700
@@ -40,7 +40,7 @@
public static void main(String args[]) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("warning: The UseParNewGC flag is deprecated and will likely be removed in a future release");
+ output.shouldContain("warning: Option UseParNewGC was deprecated in version");
output.shouldNotContain("error");
output.shouldHaveExitValue(0);
}
--- a/hotspot/test/runtime/8003720/VictimClassLoader.java Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/test/runtime/8003720/VictimClassLoader.java Mon Oct 12 14:41:36 2015 -0700
@@ -72,8 +72,10 @@
}
static byte[] readFully(java.io.InputStream in, int len) throws java.io.IOException {
- // Warning here:
- return sun.misc.IOUtils.readFully(in, len, true);
+ byte[] b = in.readAllBytes();
+ if (len != -1 && b.length != len)
+ throw new java.io.IOException("Expected:" + len + ", actual:" + b.length);
+ return b;
}
public void finalize() {
--- a/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java Mon Oct 12 14:41:36 2015 -0700
@@ -46,7 +46,7 @@
"-XX:NmethodSweepFraction=10", "-version");
OutputAnalyzer output2 = new OutputAnalyzer(pb2.start());
- output2.shouldContain("ignoring option").shouldContain("support was removed");
+ output2.shouldContain("Ignoring option").shouldContain("support was removed");
output2.shouldContain("NmethodSweepFraction");
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/CommandLine/VMAliasOptions.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import jdk.test.lib.*;
+import jdk.test.lib.cli.*;
+
+/*
+ * @test
+ * @bug 8061611
+ * @summary Test that various alias options correctly set the target options. See aliased_jvm_flags in arguments.cpp.
+ * @library /testlibrary
+ */
+public class VMAliasOptions {
+
+ /**
+ * each entry is {[0]: alias name, [1]: alias target, [2]: value to set
+ * (true/false/n/string)}.
+ */
+ public static final String[][] ALIAS_OPTIONS = {
+ {"DefaultMaxRAMFraction", "MaxRAMFraction", "1032"},
+ {"CMSMarkStackSizeMax", "MarkStackSizeMax", "1032"},
+ {"CMSMarkStackSize", "MarkStackSize", "1032"},
+ {"G1MarkStackSize", "MarkStackSize", "1032"},
+ {"ParallelMarkingThreads", "ConcGCThreads", "2"},
+ {"ParallelCMSThreads", "ConcGCThreads", "2"},
+ {"CreateMinidumpOnCrash", "CreateCoredumpOnCrash", "false" },
+ };
+
+ static void testAliases(String[][] optionInfo) throws Throwable {
+ String aliasNames[] = new String[optionInfo.length];
+ String optionNames[] = new String[optionInfo.length];
+ String expectedValues[] = new String[optionInfo.length];
+ for (int i = 0; i < optionInfo.length; i++) {
+ aliasNames[i] = optionInfo[i][0];
+ optionNames[i] = optionInfo[i][1];
+ expectedValues[i] = optionInfo[i][2];
+ }
+
+ OutputAnalyzer output = CommandLineOptionTest.startVMWithOptions(aliasNames, expectedValues, "-XX:+PrintFlagsFinal");
+ CommandLineOptionTest.verifyOptionValuesFromOutput(output, optionNames, expectedValues);
+ }
+
+ public static void main(String[] args) throws Throwable {
+ testAliases(ALIAS_OPTIONS);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import jdk.test.lib.*;
+import jdk.test.lib.cli.*;
+
+/*
+ * @test
+ * @bug 8066821
+ * @summary Test that various options are deprecated. See deprecated_jvm_flags in arguments.cpp.
+ * @library /testlibrary
+ */
+public class VMDeprecatedOptions {
+
+ /**
+ * each entry is {[0]: option name, [1]: value to set
+ * (true/false/n/string)}.
+ */
+ public static final String[][] DEPRECATED_OPTIONS = {
+ // deprecated non-alias flags:
+ {"MaxGCMinorPauseMillis", "1032"},
+ {"UseParNewGC", "false"},
+
+ // deprecated alias flags (see also aliased_jvm_flags):
+ {"DefaultMaxRAMFraction", "4"},
+ {"CMSMarkStackSizeMax", "1032"},
+ {"CMSMarkStackSize", "1032"},
+ {"G1MarkStackSize", "1032"},
+ {"ParallelMarkingThreads", "2"},
+ {"ParallelCMSThreads", "2"},
+ {"CreateMinidumpOnCrash", "false"}
+ };
+
+ static String getDeprecationString(String optionName) {
+ return "Option " + optionName
+ + " was deprecated in version [\\S]+ and will likely be removed in a future release";
+ }
+
+ static void testDeprecated(String[][] optionInfo) throws Throwable {
+ String optionNames[] = new String[optionInfo.length];
+ String expectedValues[] = new String[optionInfo.length];
+ for (int i = 0; i < optionInfo.length; i++) {
+ optionNames[i] = optionInfo[i][0];
+ expectedValues[i] = optionInfo[i][1];
+ }
+
+ OutputAnalyzer output = CommandLineOptionTest.startVMWithOptions(optionNames, expectedValues);
+
+ // check for option deprecation messages:
+ output.shouldHaveExitValue(0);
+ for (String[] deprecated : optionInfo) {
+ String match = getDeprecationString(deprecated[0]);
+ output.shouldMatch(match);
+ }
+ }
+
+ public static void main(String[] args) throws Throwable {
+ testDeprecated(DEPRECATED_OPTIONS); // Make sure that each deprecated option is mentioned in the output.
+ }
+}
--- a/hotspot/test/runtime/NMT/AutoshutdownNMT.java Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/test/runtime/NMT/AutoshutdownNMT.java Mon Oct 12 14:41:36 2015 -0700
@@ -41,6 +41,6 @@
"-XX:-AutoShutdownNMT",
"-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("ignoring option AutoShutdownNMT");
+ output.shouldContain("Ignoring option AutoShutdownNMT");
}
}
--- a/hotspot/test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java Mon Oct 12 16:26:58 2015 +0300
+++ b/hotspot/test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -261,6 +261,73 @@
}
/**
+ * Start VM with given options and values.
+ * Generates command line option flags from
+ * {@code optionNames} and {@code optionValues}.
+ *
+ * @param optionNames names of options to pass in
+ * @param optionValues values of option
+ * @param additionalVMOpts additional options that should be
+ * passed to JVM.
+ * @return output from vm process
+ */
+ public static OutputAnalyzer startVMWithOptions(String[] optionNames,
+ String[] optionValues,
+ String... additionalVMOpts) throws Throwable {
+ List<String> vmOpts = new ArrayList<>();
+ if (optionNames == null || optionValues == null || optionNames.length != optionValues.length) {
+ throw new IllegalArgumentException("optionNames and/or optionValues");
+ }
+
+ for (int i = 0; i < optionNames.length; i++) {
+ vmOpts.add(prepareFlag(optionNames[i], optionValues[i]));
+ }
+ Collections.addAll(vmOpts, additionalVMOpts);
+ Collections.addAll(vmOpts, "-version");
+
+ ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
+ vmOpts.toArray(new String[vmOpts.size()]));
+
+ return new OutputAnalyzer(processBuilder.start());
+ }
+
+ /**
+ * Verifies from the output that values of specified JVM options were the same as
+ * expected values.
+ *
+ * @param outputAnalyzer search output for expect options and values.
+ * @param optionNames names of tested options.
+ * @param expectedValues expected values of tested options.
+ * @throws Throwable if verification fails or some other issues occur.
+ */
+ public static void verifyOptionValuesFromOutput(OutputAnalyzer outputAnalyzer,
+ String[] optionNames,
+ String[] expectedValues) throws Throwable {
+ outputAnalyzer.shouldHaveExitValue(0);
+ for (int i = 0; i < optionNames.length; i++) {
+ outputAnalyzer.shouldMatch(String.format(
+ CommandLineOptionTest.PRINT_FLAGS_FINAL_FORMAT,
+ optionNames[i], expectedValues[i]));
+ }
+ }
+
+ /**
+ * Verifies that value of specified JVM options are the same as
+ * expected values.
+ * Generates command line option flags from
+ * {@code optionNames} and {@code expectedValues}.
+ *
+ * @param optionNames names of tested options.
+ * @param expectedValues expected values of tested options.
+ * @throws Throwable if verification fails or some other issues occur.
+ */
+ public static void verifyOptionValues(String[] optionNames,
+ String[] expectedValues) throws Throwable {
+ OutputAnalyzer outputAnalyzer = startVMWithOptions(optionNames, expectedValues, "-XX:+PrintFlagsFinal");
+ verifyOptionValuesFromOutput(outputAnalyzer, optionNames, expectedValues);
+ }
+
+ /**
* Verifies that value of specified JVM when type of newly started VM
* is the same as the type of current.
* This method filter out option with {@code optionName}
@@ -312,6 +379,24 @@
}
/**
+ * Prepares generic command line flag with name {@code name} by setting
+ * it's value to {@code value}.
+ *
+ * @param name the name of option to be prepared
+ * @param value the value of option ("+" or "-" can be used instead of "true" or "false")
+ * @return prepared command line flag
+ */
+ public static String prepareFlag(String name, String value) {
+ if (value.equals("+") || value.equalsIgnoreCase("true")) {
+ return "-XX:+" + name;
+ } else if (value.equals("-") || value.equalsIgnoreCase("false")) {
+ return "-XX:-" + name;
+ } else {
+ return "-XX:" + name + "=" + value;
+ }
+ }
+
+ /**
* Returns message that should occur in VM output if option
* {@code optionName} if unrecognized.
*
--- a/jaxp/.hgtags Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxp/.hgtags Mon Oct 12 14:41:36 2015 -0700
@@ -326,3 +326,5 @@
6a418934997fc4b56664b88f8417e2f0fe658091 jdk9-b81
53fe3c103b6fdf48e2b2676c0c4818ef5a10fa21 jdk9-b82
497bc2654e11684b11de46744227883d7e760f35 jdk9-b83
+91795d86744f3074d1e59b1e75d9c851c098688f jdk9-b84
+1d9850c1b35c74e8b5c17970ed5d46dc0fc33f06 jdk9-b85
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java Mon Oct 12 14:41:36 2015 -0700
@@ -101,7 +101,7 @@
* This is interpreted as "Version of the DOM API supported for the
* specified Feature", and in Level 1 should be "1.0"
*
- * @return true iff this implementation is compatable with the specified
+ * @return true if this implementation is compatible with the specified
* feature and version.
*/
public boolean hasFeature(String feature, String version) {
@@ -111,19 +111,22 @@
if (feature.startsWith("+")) {
feature = feature.substring(1);
}
- return (
- feature.equalsIgnoreCase("Core")
- && (anyVersion
- || version.equals("1.0")
- || version.equals("2.0")
- || version.equals("3.0")))
- || (feature.equalsIgnoreCase("XML")
- && (anyVersion
- || version.equals("1.0")
- || version.equals("2.0")
- || version.equals("3.0")))
- || (feature.equalsIgnoreCase("LS")
- && (anyVersion || version.equals("3.0")));
+ return (feature.equalsIgnoreCase("Core")
+ && (anyVersion
+ || version.equals("1.0")
+ || version.equals("2.0")
+ || version.equals("3.0")))
+ || (feature.equalsIgnoreCase("XML")
+ && (anyVersion
+ || version.equals("1.0")
+ || version.equals("2.0")
+ || version.equals("3.0")))
+ || (feature.equalsIgnoreCase("LS")
+ && (anyVersion
+ || version.equals("3.0")))
+ || (feature.equalsIgnoreCase("ElementTraversal")
+ && (anyVersion
+ || version.equals("1.0")));
} // hasFeature(String,String):boolean
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationImpl.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationImpl.java Mon Oct 12 14:41:36 2015 -0700
@@ -83,6 +83,9 @@
* specified feature and version.
*/
public boolean hasFeature(String feature, String version) {
+ if (feature == null || feature.length() == 0) {
+ return false;
+ }
boolean result = super.hasFeature(feature, version);
if (!result) {
--- a/jaxp/src/java.xml/share/classes/org/w3c/dom/ElementTraversal.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/ElementTraversal.java Mon Oct 12 14:41:36 2015 -0700
@@ -50,7 +50,7 @@
* elements of an element, for preprocessing before navigation.
*
* @see
- * <a href='http://www.w3.org/TR/ElementTraversal/'><cite>Element Traversal Specification</cite></a>.
+ * <a href='http://www.w3.org/TR/ElementTraversal/'><cite>Element Traversal Specification</cite></a>
*
* @since 9
*/
--- a/jaxp/test/javax/xml/jaxp/unittest/dom/ElementTraversal.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ElementTraversal.java Mon Oct 12 14:41:36 2015 -0700
@@ -31,16 +31,35 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.w3c.dom.Document;
+import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
/*
- * @bug 8135283
+ * @bug 8135283 8138721
* @summary Tests for the Element Traversal interface.
*/
public class ElementTraversal {
/*
+ Verifies that ElementTraversal is supported.
+ */
+ @Test(dataProvider = "doc")
+ public void testHasFeature(Document doc) {
+ DOMImplementation di = doc.getImplementation();
+
+ //return false if feasure == null
+ Assert.assertFalse(di.hasFeature(null, null));
+
+ //A feature is supported without specifying version
+ Assert.assertTrue(di.hasFeature("ElementTraversal", null));
+ Assert.assertTrue(di.hasFeature("ElementTraversal", ""));
+
+ //ElementTraversal Version 1.0 is supported
+ Assert.assertTrue(di.hasFeature("ElementTraversal", "1.0"));
+ }
+
+ /*
Verifies the ElementTraversal interface by exercising all of its five
methods while reading through the xml document.
*/
--- a/jaxws/.hgtags Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/.hgtags Mon Oct 12 14:41:36 2015 -0700
@@ -329,3 +329,5 @@
139338618c77d793ab8b550f06819ddb8381316f jdk9-b81
52d9ad2536ba6c6f1cc5561c0a0ee2b4847fd62c jdk9-b82
d7ee8157f4feced67924e421225c6f844079a03d jdk9-b83
+51729143f8fe038f52cf55720c4c1f89267f5948 jdk9-b84
+67b626ec730d2601d95ef036d06be34b37fa9ce6 jdk9-b85
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Language.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Language.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -31,7 +31,5 @@
public enum Language {
DTD,
XMLSCHEMA,
- RELAXNG,
- RELAXNG_COMPACT,
WSDL
}
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle.properties Mon Oct 12 14:41:36 2015 -0700
@@ -73,8 +73,6 @@
\ \ -disableXmlSecurity : disables XML security features when parsing XML documents \n\
\ \ -contentForWildcard : generates content property for types with multiple xs:any derived elements \n\
\ \ -xmlschema : treat input as W3C XML Schema (default)\n\
-\ \ -relaxng : treat input as RELAX NG (experimental,unsupported)\n\
-\ \ -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)\n\
\ \ -dtd : treat input as XML DTD (experimental,unsupported)\n\
\ \ -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)\n\
\ \ -verbose : be extra verbose\n\
@@ -85,7 +83,7 @@
Driver.AddonUsage = \nExtensions:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = \
Are you trying to compile {0}? Support for {0} is experimental. \
You may enable it by using the {1} option.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_de.properties Mon Oct 12 14:41:36 2015 -0700
@@ -33,10 +33,41 @@
ConsoleErrorReporter.UnknownFile = unbekannte Datei
Driver.Private.Usage = Zus\u00e4tzliche private Testoptionen:\n\\ \\ -debug : Ausf\u00fchrung im Debug-Modus (umfasst -verbose)\n\\ \\ -mode <mode> : F\u00fchrt XJC in einem anderen Ausf\u00fchrungsmodus aus\n\\ \\ -private : Zeigt diese Hilfemeldung an\nModus:\n\\ \\ code : Generiert Java-Quellcode (Standard)\n\\ \\ dryrun : Kompiliert das Schema im Speicher, generiert die Java-Quelle jedoch nicht\n\\ \\ zip : Generiert den Java-Quellcode in einer .zip-Datei, wie mit der Option -d angegeben\n\\ \\ sig : Gibt die Signaturen des generierten Codes aus\n\\ \\ forest : Gibt transformierte DOM-Gesamtstruktur aus\n
-Driver.Public.Usage = Verwendung: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nWenn dir angegeben wird, werden alle Schemadateien im Verzeichnis kompiliert.\nWenn jar angegeben wird, wird die /META-INF/sun-jaxb.episode-Binding-Datei kompiliert.\nOptionen:\n\\ \\ -nv : F\u00fchrt keine strikte Validierung der Eingabeschemas durch\n\\ \\ -extension : L\u00e4sst Herstellererweiterungen zu - Befolgt die \n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Kompatibilit\u00e4tsregeln und App E.2 der JAXB-Spezifikation nicht strikt\n\\ \\ -b <file/dir> : Gibt externe Bindings-Dateien an (jede <file> muss ihre eigene Option -b haben)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Wenn ein Verzeichnis angegeben wird, wird **/*.xjb durchsucht\n\\ \\ -d <dir> : Generierte Dateien werden in diesem Verzeichnis gespeichert\n\\ \\ -p <pkg> : Gibt das Zielpackage an\n\\ \\ -httpproxy <proxy> : set HTTP/HTTPS proxy. Format ist [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : Wird wie -httpproxy verwendet, verwendet jedoch das Argument in einer Datei zum Schutz des Kennwortes \n\\ \\ -classpath <arg> : Gibt an, wo die Benutzerklassendateien gefunden werden\n\\ \\ -catalog <file> : Gibt Katalogdateien zur Aufl\u00f6sung von externen Entity-Referenzen an\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Unterst\u00fctzt TR9401, XCatalog und OASIS-XML-Katalogformat.\n\\ \\ -readOnly : Generierte Dateien werden im schreibgesch\u00fctzten Modus gelesen\n\\ \\ -npa : Unterdr\u00fcckt die Generierung von Annotationen auf Packageebene (**/package-info.java)\n\\ \\ -no-header : Unterdr\u00fcckt die Generierung eines Datei-Headers mit Zeitstempel\n\\ \\ -target (2.0|2.1) : Verh\u00e4lt sich wie XJC 2.0 oder 2.1 und generiert Code, der keine 2.2-Features verwendet.\n\\ \\ -encoding <encoding> : Gibt Zeichencodierung f\u00fcr generierte Quelldateien an\n\\ \\ -enableIntrospection : Aktiviert die ordnungsgem\u00e4\u00dfe Generierung von booleschen Gettern/Settern zur Aktivierung von Bean Introspection-APIs \n\\ \\ -contentForWildcard : Generiert Contenteigenschaft f\u00fcr Typen mit mehreren von xs:any abgeleiteten Elementen \n\\ \\ -xmlschema : Behandelt Eingabe als W3C-XML-Schema (Standard)\n\\ \\ -relaxng : Behandelt Eingabe als RELAX NG (experimentell, nicht unterst\u00fctzt)\n\\ \\ -relaxng-compact : Behandelt Eingabe als RELAX NG-Kompaktsyntax (experimentell, nicht unterst\u00fctzt)\n\\ \\ -dtd : Behandelt Eingabe als XML DTD (experimentell, nicht unterst\u00fctzt)\n\\ \\ -wsdl : Behandelt Eingabe als WSDL und kompiliert enthaltene Schemas (experimentell, nicht unterst\u00fctzt)\n\\ \\ -verbose : Verwendet extra-verbose\n\\ \\ -quiet : Unterdr\u00fcckt die Compilerausgabe\n\\ \\ -help : Zeigt diese Hilfemeldung an\n\\ \\ -version : Zeigt Versionsinformationen an\n\\ \\ -fullversion : Zeigt vollst\u00e4ndige Versionsinformationen an\n
+Driver.Public.Usage = Verwendung: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+Wenn dir angegeben wird, werden alle Schemadateien im Verzeichnis kompiliert.\n\
+Wenn jar angegeben wird, wird die /META-INF/sun-jaxb.episode-Binding-Datei kompiliert.\n\
+Optionen:\n\
+\ \ -nv : F\u00fchrt keine strikte Validierung der Eingabeschemas durch\n\
+\ \ -extension : L\u00e4sst Herstellererweiterungen zu - Befolgt die \n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Kompatibilit\u00e4tsregeln und App E.2 der JAXB-Spezifikation nicht strikt\n\
+\ \ -b <file/dir> : Gibt externe Bindings-Dateien an (jede <file> muss ihre eigene Option -b haben)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Wenn ein Verzeichnis angegeben wird, wird **/*.xjb durchsucht\n\
+\ \ -d <dir> : Generierte Dateien werden in diesem Verzeichnis gespeichert\n\
+\ \ -p <pkg> : Gibt das Zielpackage an\n\
+\ \ -httpproxy <proxy> : set HTTP/HTTPS proxy. Format ist [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> : Wird wie -httpproxy verwendet, verwendet jedoch das Argument in einer Datei zum Schutz des Kennwortes \n\
+\ \ -classpath <arg> : Gibt an, wo die Benutzerklassendateien gefunden werden\n\
+\ \ -catalog <file> : Gibt Katalogdateien zur Aufl\u00f6sung von externen Entity-Referenzen an\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Unterst\u00fctzt TR9401, XCatalog und OASIS-XML-Katalogformat.\n\
+\ \ -readOnly : Generierte Dateien werden im schreibgesch\u00fctzten Modus gelesen\n\
+\ \ -npa : Unterdr\u00fcckt die Generierung von Annotationen auf Packageebene (**/package-info.java)\n\
+\ \ -no-header : Unterdr\u00fcckt die Generierung eines Datei-Headers mit Zeitstempel\n\
+\ \ -target (2.0|2.1) : Verh\u00e4lt sich wie XJC 2.0 oder 2.1 und generiert Code, der keine 2.2-Features verwendet.\n\
+\ \ -encoding <encoding> : Gibt Zeichencodierung f\u00fcr generierte Quelldateien an\n\
+\ \ -enableIntrospection : Aktiviert die ordnungsgem\u00e4\u00dfe Generierung von booleschen Gettern/Settern zur Aktivierung von Bean Introspection-APIs \n\
+\ \ -contentForWildcard : Generiert Contenteigenschaft f\u00fcr Typen mit mehreren von xs:any abgeleiteten Elementen \n\
+\ \ -xmlschema : Behandelt Eingabe als W3C-XML-Schema (Standard)\n\
+\ \ -dtd : Behandelt Eingabe als XML DTD (experimentell, nicht unterst\u00fctzt)\n\
+\ \ -wsdl : Behandelt Eingabe als WSDL und kompiliert enthaltene Schemas (experimentell, nicht unterst\u00fctzt)\n\
+\ \ -verbose : Verwendet extra-verbose\n\
+\ \ -quiet : Unterdr\u00fcckt die Compilerausgabe\n\
+\ \ -help : Zeigt diese Hilfemeldung an\n\
+\ \ -version : Zeigt Versionsinformationen an\n\
+\ \ -fullversion : Zeigt vollst\u00e4ndige Versionsinformationen an\n\
+
Driver.AddonUsage = \nErweiterungen:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = Versuchen Sie, {0} zu kompilieren? Unterst\u00fctzung f\u00fcr {0} ist zu Testzwecken bestimmt. Eine Aktivierung ist mit der Option {1} m\u00f6glich.
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_es.properties Mon Oct 12 14:41:36 2015 -0700
@@ -33,10 +33,41 @@
ConsoleErrorReporter.UnknownFile = archivo desconocido
Driver.Private.Usage = Opciones de pruebas privadas adicionales:\n\\ \\ -debug : se ejecuta en modo de depuraci\u00f3n (incluye -verbose)\n\\ \\ -mode <modo> : ejecuta XJC en otro modo de ejecuci\u00f3n\n\\ \\ -private : muestra este mensaje de ayuda\nModo:\n\\ \\ code : genera c\u00f3digo fuente Java (por defecto)\n\\ \\ dryrun : compila el esquema en la memoria, pero no genera el c\u00f3digo fuente Java\n\\ \\ zip : genera c\u00f3digo fuente Java en un archivo zip especificado por la opci\u00f3n -d\n\\ \\ sig : vuelca las firmas del c\u00f3digo generado\n\\ \\ forest : vuelca el bosque DOM transformado\n
-Driver.Public.Usage = Sintaxis: xjc [-options ...] <archivo de esquema/URL/dir/jar> ... [-b <infoenlace>] ...\nSi se especifica dir, se compilar\u00e1n todos los archivos de esquema que hay en \u00e9l.\nSi se especifica jar, se compilar\u00e1 el archivo de enlace /META-INF/sun-jaxb.episode.\nOpciones:\n\\ \\ -nv : no realiza una validaci\u00f3n estricta de los esquemas de entrada\n\\ \\ -extension : permite extensiones de proveedor - no cumple estrictamente las\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ reglas de compatibilidad y el ap\u00e9ndice E.2 de la especificaci\u00f3n JAXB\n\\ \\ -b <archivo/dir> : especifica archivos de enlace externos (cada <archivo> debe tener su propio -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Si se proporciona un directorio, se busca **/*.xjb\n\\ \\ -d <directorio> : los archivos generados ir\u00e1n a este directorio\n\\ \\ -p <paquete> : especifica el paquete de destino\n\\ \\ -httpproxy <proxy> : define el proxy HTTP/HTTPS. El formato es [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : funciona como -httpproxy, pero toma el argumento de un archivo para proteger la contrase\u00f1a \n\\ \\ -classpath <arg> : especifica d\u00f3nde encontrar archivos de clase de usuario\n\\ \\ -catalog <archivo> : especifica archivos de cat\u00e1logo para resolver referencias de entidades externas\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ soporta el formato de cat\u00e1logo TR9401, XCatalog y OASIS XML.\n\\ \\ -readOnly : los archivos generados estar\u00e1n en modo de s\u00f3lo lectura\n\\ \\ -npa : suprime la generaci\u00f3n de anotaciones de nivel de paquete (**/package-info.java)\n\\ \\ -no-header : suprime la generaci\u00f3n de una cabecera de archivo con registro de hora\n\\ \\ -target (2.0|2.1) : se comporta como XJC 2.0 o 2.1 y genera c\u00f3digo que no utiliza ninguna de las funciones de 2.2.\n\\ \\ -encoding <codificaci\u00f3n> :especifica la codificaci\u00f3n de caracteres de los archivos de origen generados\n\\ \\ -enableIntrospection : permite la generaci\u00f3n correcta de getters/setters booleanos para permitir API de introspecci\u00f3n de bean \n\\ \\ -contentForWildcard : genera la propiedad de contenido para tipos con m\u00faltiples elementos derivados de xs:any \n\\ \\ -xmlschema : trata la entrada como un esquema XML de W3C (por defecto)\n\\ \\ -relaxng : trata la entrada como RELAX NG (experimental, no soportado)\n\\ \\ -relaxng-compact : trata la entrada como sintaxis compacta de RELAX NG (experimental, no soportado)\n\\ \\ -dtd : trata la entrada como DTD de XML (experimental, no soportado)\n\\ \\ -wsdl : trata la entrada como WSDL y compila esquemas en su interior (experimental, no soportado)\n\\ \\ -verbose : con detalles adicionales\n\\ \\ -quiet : suprime la salida del compilador\n\\ \\ -help : muestra este mensaje de ayuda\n\\ \\ -version : muestra informaci\u00f3n de la versi\u00f3n\n\\ \\ -fullversion : muestra informaci\u00f3n completa de la versi\u00f3n\n
+Driver.Public.Usage = Sintaxis: xjc [-options ...] <archivo de esquema/URL/dir/jar> ... [-b <infoenlace>] ...\n\
+Si se especifica dir, se compilar\u00e1n todos los archivos de esquema que hay en \u00e9l.\n\
+Si se especifica jar, se compilar\u00e1 el archivo de enlace /META-INF/sun-jaxb.episode.\n\
+Opciones:\n\
+\ \ -nv : no realiza una validaci\u00f3n estricta de los esquemas de entrada\n\
+\ \ -extension : permite extensiones de proveedor - no cumple estrictamente las\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ reglas de compatibilidad y el ap\u00e9ndice E.2 de la especificaci\u00f3n JAXB\n\
+\ \ -b <archivo/dir> : especifica archivos de enlace externos (cada <archivo> debe tener su propio -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Si se proporciona un directorio, se busca **/*.xjb\n\
+\ \ -d <directorio> : los archivos generados ir\u00e1n a este directorio\n\
+\ \ -p <paquete> : especifica el paquete de destino\n\
+\ \ -httpproxy <proxy> : define el proxy HTTP/HTTPS. El formato es [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> : funciona como -httpproxy, pero toma el argumento de un archivo para proteger la contrase\u00f1a \n\
+\ \ -classpath <arg> : especifica d\u00f3nde encontrar archivos de clase de usuario\n\
+\ \ -catalog <archivo> : especifica archivos de cat\u00e1logo para resolver referencias de entidades externas\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ soporta el formato de cat\u00e1logo TR9401, XCatalog y OASIS XML.\n\
+\ \ -readOnly : los archivos generados estar\u00e1n en modo de s\u00f3lo lectura\n\
+\ \ -npa : suprime la generaci\u00f3n de anotaciones de nivel de paquete (**/package-info.java)\n\
+\ \ -no-header : suprime la generaci\u00f3n de una cabecera de archivo con registro de hora\n\
+\ \ -target (2.0|2.1) : se comporta como XJC 2.0 o 2.1 y genera c\u00f3digo que no utiliza ninguna de las funciones de 2.2.\n\
+\ \ -encoding <codificaci\u00f3n> :especifica la codificaci\u00f3n de caracteres de los archivos de origen generados\n\
+\ \ -enableIntrospection : permite la generaci\u00f3n correcta de getters/setters booleanos para permitir API de introspecci\u00f3n de bean \n\
+\ \ -contentForWildcard : genera la propiedad de contenido para tipos con m\u00faltiples elementos derivados de xs:any \n\
+\ \ -xmlschema : trata la entrada como un esquema XML de W3C (por defecto)\n\
+\ \ -dtd : trata la entrada como DTD de XML (experimental, no soportado)\n\
+\ \ -wsdl : trata la entrada como WSDL y compila esquemas en su interior (experimental, no soportado)\n\
+\ \ -verbose : con detalles adicionales\n\
+\ \ -quiet : suprime la salida del compilador\n\
+\ \ -help : muestra este mensaje de ayuda\n\
+\ \ -version : muestra informaci\u00f3n de la versi\u00f3n\n\
+\ \ -fullversion : muestra informaci\u00f3n completa de la versi\u00f3n\n\
+
Driver.AddonUsage = \nExtensiones:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = \u00bfEst\u00e1 intentando compilar {0}? El soporte de {0} es experimental. Para activarlo, utilice la opci\u00f3n {1}.
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties Mon Oct 12 14:41:36 2015 -0700
@@ -36,7 +36,42 @@
Driver.Public.Usage = Syntaxe : xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nSi le r\u00e9pertoire est indiqu\u00e9, tous les fichiers de sch\u00e9ma qu'il contient seront compil\u00e9s.\nSi le fichier JAR est indiqu\u00e9, le fichier de binding /META-INF/sun-jaxb.episode sera compil\u00e9.\nOptions :\n\ \ -nv : n'effectuez pas de validation stricte des sch\u00e9mas d'entr\u00e9e\n\ \ -extension : autorisez les extensions fournisseur, ne suivez pas strictement les\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ R\u00e8gles de compatibilit\u00e9 et App E.2 de la sp\u00e9cification JAXB\n\ \ -b <file/dir> : indiquez les fichiers de binding externes (chaque \u00e9l\u00e9ment <file> doit avoir sa propre option -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Si un r\u00e9pertoire est indiqu\u00e9, **/*.xjb est recherch\u00e9\n\ \ -d <dir> : les fichiers g\u00e9n\u00e9r\u00e9s seront plac\u00e9s dans ce r\u00e9pertoire\n\ \ -p <pkg> : indique le package cible\n\ \ -httpproxy <proxy> : d\u00e9finissez le proxy HTTP/HTTPS. Le format est [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> : fonctionne comme -httpproxy mais prend l'argument dans un fichier pour prot\u00e9ger le mot de passe \n\ \ -classpath <arg> : indiquez o\u00f9 trouver les fichiers de classe utilisateur\n\ \ -catalog <file> : indiquez les fichiers de catalogue pour r\u00e9soudre les r\u00e9f\u00e9rences d'entit\u00e9 externes\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ prenez en charge le format de catalogue TR9401, XCatalog et OASIS XML.\n\ \ -readOnly : les fichiers g\u00e9n\u00e9r\u00e9s seront en mode lecture seule\n\ \ -npa : supprimez la g\u00e9n\u00e9ration des annotations de niveau package (**/package-info.java)\n\ \ -no-header : supprimez la g\u00e9n\u00e9ration d'un en-t\u00eate de fichier avec horodatage\n\ \ -target (2.0|2.1) : comportez-vous comme XJC 2.0 ou 2.1 et g\u00e9n\u00e9rez du code qui n'utilise aucune fonctionnalit\u00e9 2.2.\n\ \ -encoding <encoding> : indiquez l'encodage de caract\u00e8res pour les fichiers source g\u00e9n\u00e9r\u00e9s\n\ \ -enableIntrospection : activez la g\u00e9n\u00e9ration correcte des m\u00e9thodes get/set bool\u00e9ennes pour activer les API d'introspection de bean \n\ \ -contentForWildcard : g\u00e9n\u00e8re la propri\u00e9t\u00e9 de contenu pour les types avec plusieurs \u00e9l\u00e9ments d\u00e9riv\u00e9s xs:any \n\ \ -xmlschema : traitez l'entr\u00e9e en tant que W3C XML Schema (par d\u00e9faut)\n\ \ -relaxng : traitez l'entr\u00e9e en tant que RELAX NG (exp\u00e9rimental, non pris en charge)\n\ \ -relaxng-compact : traitez l'entr\u00e9e en tant que syntaxe compacte RELAX NG (exp\u00e9rimental, non pris en charge)\n\ \ -dtd : traitez l'entr\u00e9e en tant que DTD XML (exp\u00e9rimental, non pris en charge)\n\ \ -wsdl : traitez l'entr\u00e9e en tant que WSDL et compilez-y les sch\u00e9mas (exp\u00e9rimental, non pris en charge)\n\ \ -verbose : agissez en mode extra verbose\n\ \ -quiet : supprimez la sortie de compilateur\n\ \ -help : affichez ce message d'aide\n\ \ -version : affichez ces informations de version\n\ \ -fullversion : affichez ces informations de version compl\u00e8te\n
Driver.AddonUsage = \nExtensions :
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+Driver.Public.Usage = Syntaxe : xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+Si le r\u00e9pertoire est indiqu\u00e9, tous les fichiers de sch\u00e9ma qu'il contient seront compil\u00e9s.\n\
+Si le fichier JAR est indiqu\u00e9, le fichier de binding /META-INF/sun-jaxb.episode sera compil\u00e9.\n\
+Options :\n\
+\ \ -nv : n'effectuez pas de validation stricte des sch\u00e9mas d'entr\u00e9e\n\
+\ \ -extension : autorisez les extensions fournisseur, ne suivez pas strictement les\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ R\u00e8gles de compatibilit\u00e9 et App E.2 de la sp\u00e9cification JAXB\n\
+\ \ -b <file/dir> : indiquez les fichiers de binding externes (chaque \u00e9l\u00e9ment <file> doit avoir sa propre option -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Si un r\u00e9pertoire est indiqu\u00e9, **/*.xjb est recherch\u00e9\n\
+\ \ -d <dir> : les fichiers g\u00e9n\u00e9r\u00e9s seront plac\u00e9s dans ce r\u00e9pertoire\n\
+\ \ -p <pkg> : indique le package cible\n\
+\ \ -httpproxy <proxy> : d\u00e9finissez le proxy HTTP/HTTPS. Le format est [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> : fonctionne comme -httpproxy mais prend l'argument dans un fichier pour prot\u00e9ger le mot de passe \n\
+\ \ -classpath <arg> : indiquez o\u00f9 trouver les fichiers de classe utilisateur\n\
+\ \ -catalog <file> : indiquez les fichiers de catalogue pour r\u00e9soudre les r\u00e9f\u00e9rences d'entit\u00e9 externes\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ prenez en charge le format de catalogue TR9401, XCatalog et OASIS XML.\n\
+\ \ -readOnly : les fichiers g\u00e9n\u00e9r\u00e9s seront en mode lecture seule\n\
+\ \ -npa : supprimez la g\u00e9n\u00e9ration des annotations de niveau package (**/package-info.java)\n\
+\ \ -no-header : supprimez la g\u00e9n\u00e9ration d'un en-t\u00eate de fichier avec horodatage\n\
+\ \ -target (2.0|2.1) : comportez-vous comme XJC 2.0 ou 2.1 et g\u00e9n\u00e9rez du code qui n'utilise aucune fonctionnalit\u00e9 2.2.\n\
+\ \ -encoding <encoding> : indiquez l'encodage de caract\u00e8res pour les fichiers source g\u00e9n\u00e9r\u00e9s\n\
+\ \ -enableIntrospection : activez la g\u00e9n\u00e9ration correcte des m\u00e9thodes get/set bool\u00e9ennes pour activer les API d'introspection de bean \n\
+\ \ -contentForWildcard : g\u00e9n\u00e8re la propri\u00e9t\u00e9 de contenu pour les types avec plusieurs \u00e9l\u00e9ments d\u00e9riv\u00e9s xs:any \n\
+\ \ -xmlschema : traitez l'entr\u00e9e en tant que W3C XML Schema (par d\u00e9faut)\n\
+\ \ -dtd : traitez l'entr\u00e9e en tant que DTD XML (exp\u00e9rimental, non pris en charge)\n\
+\ \ -wsdl : traitez l'entr\u00e9e en tant que WSDL et compilez-y les sch\u00e9mas (exp\u00e9rimental, non pris en charge)\n\
+\ \ -verbose : agissez en mode extra verbose\n\
+\ \ -quiet : supprimez la sortie de compilateur\n\
+\ \ -help : affichez ce message d'aide\n\
+\ \ -version : affichez ces informations de version\n\
+\ \ -fullversion : affichez ces informations de version compl\u00e8te\n\
+
+Driver.AddonUsage = \n\
+Extensions :
+
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = Essayez-vous de compiler {0} ? La prise en charge de {0} est exp\u00e9rimentale. Vous pouvez l''activer \u00e0 l''aide de l''option {1}.
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_it.properties Mon Oct 12 14:41:36 2015 -0700
@@ -33,10 +33,41 @@
ConsoleErrorReporter.UnknownFile = file sconosciuto
Driver.Private.Usage = Opzioni di test private aggiuntive:\n\ \ -debug : l'esecuzione avviene in modalit\u00e0 debug (include -verbose)\n\ \ -mode <modalit\u00e0> : XJC viene eseguito in un'altra modalit\u00e0 di esecuzione\n\ \ -private : visualizza questo messaggio della Guida\nModalit\u00e0:\n\ \ code : genera il codice sorgente Java (valore predefinito)\n\ \ dryrun : compila lo schema nella memoria ma non genera il codice sorgente Java\n\ \ zip : genera il codice sorgente Java in un file zip specificato dall'opzione -d\n\ \ sig : esegue il dump del firme del codice generato\n\ \ forest : esegue il dump dell'insieme di strutture DOM trasformato\n
-Driver.Public.Usage = Uso: xjc [-options ...] <file schema/URL/dir/jar> ... [-b <bindinfo>] ...\nSe viene specificato dir, verranno compilati tutti i file dello schema in essa contenuti.\nSe viene specificato jar, verr\u00e0 compilato il file di associazione /META-INF/sun-jaxb.episode.\nOpzioni:\n\ \ -nv : non esegue la convalida rigorosa degli schemi di input\n\ \ -extension : consente le estensioni del fornitore; non segue in modo rigoroso le\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ regole di compatibilit\u00e0 e App E.2 dalla specifica JAXB\n\ \ -b <file/dir> : specifica i file di associazione esterni (ogni <file> deve avere la relativa -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Se viene fornita una directory, la ricerca viene eseguita in **/*.xjb\n\ \ -d <dir> : i file generati andranno in questa directory\n\ \ -p <pkg> : specifica il package di destinazione\n\ \ -httpproxy <proxy> : imposta il proxy HTTP/HTTPS. Il formato \u00e8 [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> : funziona come -httpproxy ma prende l'argomento da un file per proteggere la password \n\ \ -classpath <arg> : specifica dove trovare i file delle classi utente\n\ \ -catalog <file> : specifica i file di catalogo per risolvere i riferimenti a entit\u00e0 esterne\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ supporta il formato di catalogo XML TR9401, XCatalog e OASIS.\n\ \ -readOnly : i file generati saranno in modalit\u00e0 di sola lettura\n\ \ -npa : elimina la generazione delle annotazioni a livello di package (**/package-info.java)\n\ \ -no-header : elimina la generazione di un'intestazione di file con indicatore orario\n\ \ -target (2.0|2.1) : funziona come XJC 2.0 o 2.1 e genera del codice che non usa alcuna funzione 2.2.\n\ \ -encoding <encoding> : specifica la codifica di caratteri per i file di origine generati\n\ \ -enableIntrospection : abilita la generazione di getter/setter booleani per abilitare le API di introspezione dei bean \n\ \ -contentForWildcard : genera la propriet\u00e0 di contenuto per i tipi con pi\u00f9 elementi derivati xs:any \n\ \ -xmlschema : tratta l'input come schema XML W3C (valore predefinito)\n\ \ -relaxng : tratta l'input come NG RELAX (sperimentale, non supportato)\n\ \ -relaxng-compact : tratta l'input come sintassi compatta NG RELAX (sperimentale, non supportato)\n\ \ -dtd : tratta l'input come DTD XML (sperimentale, non supportato)\n\ \ -wsdl : tratta l'input come WSDL e compila gli schemi al suo interno (sperimentale, non supportato)\n\ \ -verbose : be extra verbose\n\ \ -quiet : elimina l'output del compilatore\n\ \ -help : visualizza questo messaggio della Guida\n\ \ -version : visualizza le informazioni sulla versione\n\ \ -fullversion : visualizza le informazioni sulla versione completa\n
+Driver.Public.Usage = Uso: xjc [-options ...] <file schema/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+Se viene specificato dir, verranno compilati tutti i file dello schema in essa contenuti.\n\
+Se viene specificato jar, verr\u00e0 compilato il file di associazione /META-INF/sun-jaxb.episode.\n\
+Opzioni:\n\
+\ \ -nv : non esegue la convalida rigorosa degli schemi di input\n\
+\ \ -extension : consente le estensioni del fornitore; non segue in modo rigoroso le\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ regole di compatibilit\u00e0 e App E.2 dalla specifica JAXB\n\
+\ \ -b <file/dir> : specifica i file di associazione esterni (ogni <file> deve avere la relativa -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Se viene fornita una directory, la ricerca viene eseguita in **/*.xjb\n\
+\ \ -d <dir> : i file generati andranno in questa directory\n\
+\ \ -p <pkg> : specifica il package di destinazione\n\
+\ \ -httpproxy <proxy> : imposta il proxy HTTP/HTTPS. Il formato \u00e8 [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> : funziona come -httpproxy ma prende l'argomento da un file per proteggere la password \n\
+\ \ -classpath <arg> : specifica dove trovare i file delle classi utente\n\
+\ \ -catalog <file> : specifica i file di catalogo per risolvere i riferimenti a entit\u00e0 esterne\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ supporta il formato di catalogo XML TR9401, XCatalog e OASIS.\n\
+\ \ -readOnly : i file generati saranno in modalit\u00e0 di sola lettura\n\
+\ \ -npa : elimina la generazione delle annotazioni a livello di package (**/package-info.java)\n\
+\ \ -no-header : elimina la generazione di un'intestazione di file con indicatore orario\n\
+\ \ -target (2.0|2.1) : funziona come XJC 2.0 o 2.1 e genera del codice che non usa alcuna funzione 2.2.\n\
+\ \ -encoding <encoding> : specifica la codifica di caratteri per i file di origine generati\n\
+\ \ -enableIntrospection : abilita la generazione di getter/setter booleani per abilitare le API di introspezione dei bean \n\
+\ \ -contentForWildcard : genera la propriet\u00e0 di contenuto per i tipi con pi\u00f9 elementi derivati xs:any \n\
+\ \ -xmlschema : tratta l'input come schema XML W3C (valore predefinito)\n\
+\ \ -dtd : tratta l'input come DTD XML (sperimentale, non supportato)\n\
+\ \ -wsdl : tratta l'input come WSDL e compila gli schemi al suo interno (sperimentale, non supportato)\n\
+\ \ -verbose : be extra verbose\n\
+\ \ -quiet : elimina l'output del compilatore\n\
+\ \ -help : visualizza questo messaggio della Guida\n\
+\ \ -version : visualizza le informazioni sulla versione\n\
+\ \ -fullversion : visualizza le informazioni sulla versione completa\n\
+
Driver.AddonUsage = \nEstensioni:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = Si sta tentando di compilare {0}? Il supporto per {0} \u00e8 sperimentale. \u00c8 possibile abilitarlo usando l''opzione {1}.
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties Mon Oct 12 14:41:36 2015 -0700
@@ -33,10 +33,41 @@
ConsoleErrorReporter.UnknownFile = \u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb
Driver.Private.Usage = \u8ffd\u52a0\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30fb\u30c6\u30b9\u30c8\u30fb\u30aa\u30d7\u30b7\u30e7\u30f3:\n\ \ -debug : \u30c7\u30d0\u30c3\u30b0\u30fb\u30e2\u30fc\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059(-verbose\u3092\u542b\u3080)\n\ \ -mode <mode> : XJC\u3092\u4ed6\u306e\u5b9f\u884c\u30e2\u30fc\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059\n\ \ -private : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\u30e2\u30fc\u30c9:\n\ \ code : Java\u30bd\u30fc\u30b9\u30fb\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\ \ dryrun : \u30e1\u30e2\u30ea\u30fc\u5185\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u304c\u3001Java\u30bd\u30fc\u30b9\u306f\u751f\u6210\u3057\u307e\u305b\u3093\n\ \ zip : Java\u30bd\u30fc\u30b9\u30fb\u30b3\u30fc\u30c9\u3092\u3001-d\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3055\u308c\u305fzip\u30d5\u30a1\u30a4\u30eb\u306b\u751f\u6210\u3057\u307e\u3059\n\ \ sig : \u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306e\u7f72\u540d\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059\n\ \ forest : \u5909\u63db\u3055\u308c\u305fDOM\u30d5\u30a9\u30ec\u30b9\u30c8\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059\n
-Driver.Public.Usage = \u4f7f\u7528\u65b9\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\ndir\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001dir\u5185\u306e\u3059\u3079\u3066\u306e\u30b9\u30ad\u30fc\u30de\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\njar\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001/META-INF/sun-jaxb.episode\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\n\u30aa\u30d7\u30b7\u30e7\u30f3:\n\ \ -nv : \u5165\u529b\u30b9\u30ad\u30fc\u30de\u306e\u53b3\u5bc6\u306a\u691c\u8a3c\u3092\u5b9f\u884c\u3057\u307e\u305b\u3093\n\ \ -extension : \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3057\u307e\u3059 - JAXB\u4ed5\u69d8\u306e\u4e92\u63db\u6027\u30eb\u30fc\u30eb\u304a\u3088\u3073App E.2\u306b\u306f\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u53b3\u5bc6\u306b\u5f93\u3044\u307e\u305b\u3093\n\ \ -b <file/dir> : \u5916\u90e8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059(\u5404<file>\u306b\u72ec\u81ea\u306e-b\u304c\u5fc5\u8981\u3067\u3059)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001**/*.xjb\u304c\u691c\u7d22\u3055\u308c\u307e\u3059\n\ \ -d <dir> : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u9077\u79fb\u3057\u307e\u3059\n\ \ -p <pkg> : \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -httpproxy <proxy> : HTTP/HTTPS\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u5f62\u5f0f\u306f[user[:password]@]proxyHost:proxyPort\u3067\u3059\n\ \ -httpproxyfile <f> : -httpproxy\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u5f15\u6570\u3092\u53d6\u308a\u307e\u3059\n\ \ -classpath <arg> : \u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -catalog <file> : \u5916\u90e8\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u30ab\u30bf\u30ed\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401\u3001XCatalog\u304a\u3088\u3073OASIS XML Catalog\u5f62\u5f0f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\n\ \ -readOnly : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u8aad\u53d6\u308a\u5c02\u7528\u30e2\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\n\ \ -npa : \u30d1\u30c3\u30b1\u30fc\u30b8\u30fb\u30ec\u30d9\u30eb\u6ce8\u91c8(**/package-info.java)\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\ \ -no-header : \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u4ed8\u304d\u306e\u30d5\u30a1\u30a4\u30eb\u30fb\u30d8\u30c3\u30c0\u30fc\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\ \ -target (2.0|2.1) : XJC 2.0\u307e\u305f\u306f2.1\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3057\u30012.2\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u306a\u3044\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\n\ \ -encoding <encoding> : \u751f\u6210\u3055\u308c\u305f\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -enableIntrospection : Boolean getters/setters\u3092\u6b63\u3057\u304f\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3001Bean Introspection apis\u3092\u6709\u52b9\u306b\u3057\u307e\u3059 \n\ \ -contentForWildcard : \u8907\u6570\u306exs:any\u5c0e\u51fa\u8981\u7d20\u3092\u6301\u3064\u30bf\u30a4\u30d7\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u751f\u6210\u3057\u307e\u3059\n\ \ -xmlschema : \u5165\u529b\u3092W3C XML\u30b9\u30ad\u30fc\u30de\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\ \ -relaxng : \u5165\u529b\u3092RELAX NG\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -relaxng-compact : \u5165\u529b\u3092RELAX NG\u306e\u7c21\u5358\u306a\u69cb\u6587\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -dtd : \u5165\u529b\u3092XML DTD\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -wsdl : \u5165\u529b\u3092WSDL\u3068\u3057\u3066\u51e6\u7406\u3057\u3001\u305d\u306e\u5185\u90e8\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -verbose : \u5197\u9577\u306b\u306a\u308a\u307e\u3059\n\ \ -quiet : \u30b3\u30f3\u30d1\u30a4\u30e9\u51fa\u529b\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\n\ \ -help : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\ \ -version : \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\ \ -fullversion : \u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n
+Driver.Public.Usage = \u4f7f\u7528\u65b9\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+dir\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001dir\u5185\u306e\u3059\u3079\u3066\u306e\u30b9\u30ad\u30fc\u30de\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\n\
+jar\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001/META-INF/sun-jaxb.episode\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\n\
+\u30aa\u30d7\u30b7\u30e7\u30f3:\n\
+\ \ -nv : \u5165\u529b\u30b9\u30ad\u30fc\u30de\u306e\u53b3\u5bc6\u306a\u691c\u8a3c\u3092\u5b9f\u884c\u3057\u307e\u305b\u3093\n\
+\ \ -extension : \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3057\u307e\u3059 - JAXB\u4ed5\u69d8\u306e\u4e92\u63db\u6027\u30eb\u30fc\u30eb\u304a\u3088\u3073App E.2\u306b\u306f\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u53b3\u5bc6\u306b\u5f93\u3044\u307e\u305b\u3093\n\
+\ \ -b <file/dir> : \u5916\u90e8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059(\u5404<file>\u306b\u72ec\u81ea\u306e-b\u304c\u5fc5\u8981\u3067\u3059)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001**/*.xjb\u304c\u691c\u7d22\u3055\u308c\u307e\u3059\n\
+\ \ -d <dir> : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u9077\u79fb\u3057\u307e\u3059\n\
+\ \ -p <pkg> : \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u307e\u3059\n\
+\ \ -httpproxy <proxy> : HTTP/HTTPS\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u5f62\u5f0f\u306f[user[:password]@]proxyHost:proxyPort\u3067\u3059\n\
+\ \ -httpproxyfile <f> : -httpproxy\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u5f15\u6570\u3092\u53d6\u308a\u307e\u3059\n\
+\ \ -classpath <arg> : \u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\n\
+\ \ -catalog <file> : \u5916\u90e8\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u30ab\u30bf\u30ed\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401\u3001XCatalog\u304a\u3088\u3073OASIS XML Catalog\u5f62\u5f0f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\n\
+\ \ -readOnly : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u8aad\u53d6\u308a\u5c02\u7528\u30e2\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\n\
+\ \ -npa : \u30d1\u30c3\u30b1\u30fc\u30b8\u30fb\u30ec\u30d9\u30eb\u6ce8\u91c8(**/package-info.java)\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\
+\ \ -no-header : \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u4ed8\u304d\u306e\u30d5\u30a1\u30a4\u30eb\u30fb\u30d8\u30c3\u30c0\u30fc\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\
+\ \ -target (2.0|2.1) : XJC 2.0\u307e\u305f\u306f2.1\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3057\u30012.2\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u306a\u3044\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\n\
+\ \ -encoding <encoding> : \u751f\u6210\u3055\u308c\u305f\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3057\u307e\u3059\n\
+\ \ -enableIntrospection : Boolean getters/setters\u3092\u6b63\u3057\u304f\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3001Bean Introspection apis\u3092\u6709\u52b9\u306b\u3057\u307e\u3059 \n\
+\ \ -contentForWildcard : \u8907\u6570\u306exs:any\u5c0e\u51fa\u8981\u7d20\u3092\u6301\u3064\u30bf\u30a4\u30d7\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u751f\u6210\u3057\u307e\u3059\n\
+\ \ -xmlschema : \u5165\u529b\u3092W3C XML\u30b9\u30ad\u30fc\u30de\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\
+\ \ -dtd : \u5165\u529b\u3092XML DTD\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\
+\ \ -wsdl : \u5165\u529b\u3092WSDL\u3068\u3057\u3066\u51e6\u7406\u3057\u3001\u305d\u306e\u5185\u90e8\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\
+\ \ -verbose : \u5197\u9577\u306b\u306a\u308a\u307e\u3059\n\
+\ \ -quiet : \u30b3\u30f3\u30d1\u30a4\u30e9\u51fa\u529b\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\n\
+\ \ -help : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\
+\ \ -version : \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\
+\ \ -fullversion : \u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\
+
Driver.AddonUsage = \n\u62e1\u5f35:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = {0}\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u304b\u3002{0}\u306e\u30b5\u30dd\u30fc\u30c8\u306f\u8a66\u9a13\u7684\u3067\u3059\u3002{1}\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u6709\u52b9\u306b\u3067\u304d\u307e\u3059\u3002
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties Mon Oct 12 14:41:36 2015 -0700
@@ -33,10 +33,41 @@
ConsoleErrorReporter.UnknownFile = \uc54c \uc218 \uc5c6\ub294 \ud30c\uc77c
Driver.Private.Usage = \ucd94\uac00 \uc804\uc6a9 \ud14c\uc2a4\ud2b8 \uc635\uc158:\n\ \ -debug : \ub514\ubc84\uadf8 \ubaa8\ub4dc\ub85c \uc2e4\ud589\ud569\ub2c8\ub2e4(-verbose \ud3ec\ud568).\n\ \ -mode <mode> : \uae30\ud0c0 \uc2e4\ud589 \ubaa8\ub4dc\ub85c XJC\ub97c \uc2e4\ud589\ud569\ub2c8\ub2e4.\n\ \ -private : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ubaa8\ub4dc:\n\ \ code : Java \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\ \ dryrun : \uba54\ubaa8\ub9ac\uc758 \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub418 Java \uc18c\uc2a4\ub97c \uc0dd\uc131\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ zip : -d \uc635\uc158\uc73c\ub85c \uc9c0\uc815\ub41c zip \ud30c\uc77c\uc5d0 Java \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \ sig : \uc0dd\uc131\ub41c \ucf54\ub4dc\uc758 \uc11c\uba85\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.\n\ \ forest : \ubcc0\ud658\ub41c DOM \uc601\uc5ed\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.\n
-Driver.Public.Usage = \uc0ac\uc6a9\ubc95: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\ndir\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 \ud3ec\ud568\ub41c \ubaa8\ub4e0 \uc2a4\ud0a4\ub9c8 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\njar\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 /META-INF/sun-jaxb.episode \ubc14\uc778\ub529 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\n\uc635\uc158:\n\ \ -nv : \uc785\ub825 \uc2a4\ud0a4\ub9c8\uc5d0 \ub300\ud574 \uc5c4\uaca9\ud55c \uac80\uc99d\uc744 \uc218\ud589\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -extension : \uacf5\uae09\uc5c5\uccb4 \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \uc0ac\uc591\uc758 \ud638\ud658\uc131 \uaddc\uce59 \ubc0f \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 E.2\ub97c \uc5c4\uaca9\ud558\uac8c \ub530\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -b <file/dir> : \uc678\ubd80 \ubc14\uc778\ub529 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4. \uac01 <file>\uc5d0\ub294 \uace0\uc720\ud55c -b\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ub514\ub809\ud1a0\ub9ac\uac00 \uc81c\uacf5\ub41c \uacbd\uc6b0 **/*.xjb\uac00 \uac80\uc0c9\ub429\ub2c8\ub2e4.\n\ \ -d <dir> : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc774 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4.\n\ \ -p <pkg> : \ub300\uc0c1 \ud328\ud0a4\uc9c0\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -httpproxy <proxy> : HTTP/HTTPS \ud504\ub85d\uc2dc\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \ud615\uc2dd\uc740 [user[:password]@]proxyHost:proxyPort\uc785\ub2c8\ub2e4.\n\ \ -httpproxyfile <f> : -httpproxy\uc640 \ub3d9\uc77c\ud558\uac8c \uc791\ub3d9\ud558\uc9c0\ub9cc \ube44\ubc00\ubc88\ud638\ub97c \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ud30c\uc77c\uc5d0 \uc778\uc218\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \n\ \ -classpath <arg> : \uc0ac\uc6a9\uc790 \ud074\ub798\uc2a4 \ud30c\uc77c\uc744 \ucc3e\uc744 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -catalog <file> : \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub97c \ubd84\uc11d\ud560 \uce74\ud0c8\ub85c\uadf8 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401, XCatalog \ubc0f OASIS XML \uce74\ud0c8\ub85c\uadf8 \ud615\uc2dd\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n\ \ -readOnly : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc77d\uae30 \uc804\uc6a9 \ubaa8\ub4dc\ub85c \uc124\uc815\ub429\ub2c8\ub2e4.\n\ \ -npa : \ud328\ud0a4\uc9c0 \ub808\ubca8 \uc8fc\uc11d(**/package-info.java)\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\ \ -no-header : \uc2dc\uac04 \uae30\ub85d\uc744 \ud3ec\ud568\ud558\ub294 \ud30c\uc77c \uba38\ub9ac\uae00\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\ \ -target (2.0|2.1) : XJC 2.0 \ub610\ub294 2.1\ucc98\ub7fc \uc791\ub3d9\ud558\uba70 2.2 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \ -encoding <encoding> : \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \ub300\ud55c \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -enableIntrospection : \ubd80\uc6b8 getter/setter\uac00 \uc62c\ubc14\ub974\uac8c \uc0dd\uc131\ub418\ub3c4\ub85d \ud558\uc5ec Bean \uac80\uc0ac API\ub97c \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. \n\ \ -contentForWildcard : xs:any \ud30c\uc0dd \uc694\uc18c\uac00 \uc5ec\ub7ec \uac1c\uc778 \uc720\ud615\uc5d0 \ub300\ud574 \ucf58\ud150\uce20 \uc18d\uc131\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \n\ \ -xmlschema : \uc785\ub825\uac12\uc744 W3C XML \uc2a4\ud0a4\ub9c8\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\ \ -relaxng : \uc785\ub825\uac12\uc744 RELAX NG\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -relaxng-compact : \uc785\ub825\uac12\uc744 RELAX NG \uc555\ucd95 \uad6c\ubb38\uc73c\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -dtd : \uc785\ub825\uac12\uc744 XML DTD\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -wsdl : \uc785\ub825\uac12\uc744 WSDL\ub85c \ucc98\ub9ac\ud558\uace0 \ud3ec\ud568\ub41c \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -verbose : \ucd94\uac00 \uc138\ubd80 \uc815\ubcf4 \ud45c\uc2dc \ubaa8\ub4dc\uc785\ub2c8\ub2e4.\n\ \ -quiet : \ucef4\ud30c\uc77c\ub7ec \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -help : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ \ -version : \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ \ -fullversion : \uc815\uc2dd \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n
+Driver.Public.Usage = \uc0ac\uc6a9\ubc95: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+dir\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 \ud3ec\ud568\ub41c \ubaa8\ub4e0 \uc2a4\ud0a4\ub9c8 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\n\
+jar\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 /META-INF/sun-jaxb.episode \ubc14\uc778\ub529 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\n\
+\uc635\uc158:\n\
+\ \ -nv : \uc785\ub825 \uc2a4\ud0a4\ub9c8\uc5d0 \ub300\ud574 \uc5c4\uaca9\ud55c \uac80\uc99d\uc744 \uc218\ud589\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\
+\ \ -extension : \uacf5\uae09\uc5c5\uccb4 \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4.\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \uc0ac\uc591\uc758 \ud638\ud658\uc131 \uaddc\uce59 \ubc0f \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 E.2\ub97c \uc5c4\uaca9\ud558\uac8c \ub530\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\
+\ \ -b <file/dir> : \uc678\ubd80 \ubc14\uc778\ub529 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4. \uac01 <file>\uc5d0\ub294 \uace0\uc720\ud55c -b\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ub514\ub809\ud1a0\ub9ac\uac00 \uc81c\uacf5\ub41c \uacbd\uc6b0 **/*.xjb\uac00 \uac80\uc0c9\ub429\ub2c8\ub2e4.\n\
+\ \ -d <dir> : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc774 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4.\n\
+\ \ -p <pkg> : \ub300\uc0c1 \ud328\ud0a4\uc9c0\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\
+\ \ -httpproxy <proxy> : HTTP/HTTPS \ud504\ub85d\uc2dc\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \ud615\uc2dd\uc740 [user[:password]@]proxyHost:proxyPort\uc785\ub2c8\ub2e4.\n\
+\ \ -httpproxyfile <f> : -httpproxy\uc640 \ub3d9\uc77c\ud558\uac8c \uc791\ub3d9\ud558\uc9c0\ub9cc \ube44\ubc00\ubc88\ud638\ub97c \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ud30c\uc77c\uc5d0 \uc778\uc218\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \n\
+\ \ -classpath <arg> : \uc0ac\uc6a9\uc790 \ud074\ub798\uc2a4 \ud30c\uc77c\uc744 \ucc3e\uc744 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\
+\ \ -catalog <file> : \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub97c \ubd84\uc11d\ud560 \uce74\ud0c8\ub85c\uadf8 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401, XCatalog \ubc0f OASIS XML \uce74\ud0c8\ub85c\uadf8 \ud615\uc2dd\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n\
+\ \ -readOnly : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc77d\uae30 \uc804\uc6a9 \ubaa8\ub4dc\ub85c \uc124\uc815\ub429\ub2c8\ub2e4.\n\
+\ \ -npa : \ud328\ud0a4\uc9c0 \ub808\ubca8 \uc8fc\uc11d(**/package-info.java)\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\
+\ \ -no-header : \uc2dc\uac04 \uae30\ub85d\uc744 \ud3ec\ud568\ud558\ub294 \ud30c\uc77c \uba38\ub9ac\uae00\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\
+\ \ -target (2.0|2.1) : XJC 2.0 \ub610\ub294 2.1\ucc98\ub7fc \uc791\ub3d9\ud558\uba70 2.2 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\
+\ \ -encoding <encoding> : \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \ub300\ud55c \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\
+\ \ -enableIntrospection : \ubd80\uc6b8 getter/setter\uac00 \uc62c\ubc14\ub974\uac8c \uc0dd\uc131\ub418\ub3c4\ub85d \ud558\uc5ec Bean \uac80\uc0ac API\ub97c \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. \n\
+\ \ -contentForWildcard : xs:any \ud30c\uc0dd \uc694\uc18c\uac00 \uc5ec\ub7ec \uac1c\uc778 \uc720\ud615\uc5d0 \ub300\ud574 \ucf58\ud150\uce20 \uc18d\uc131\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \n\
+\ \ -xmlschema : \uc785\ub825\uac12\uc744 W3C XML \uc2a4\ud0a4\ub9c8\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\
+\ \ -dtd : \uc785\ub825\uac12\uc744 XML DTD\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\
+\ \ -wsdl : \uc785\ub825\uac12\uc744 WSDL\ub85c \ucc98\ub9ac\ud558\uace0 \ud3ec\ud568\ub41c \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\
+\ \ -verbose : \ucd94\uac00 \uc138\ubd80 \uc815\ubcf4 \ud45c\uc2dc \ubaa8\ub4dc\uc785\ub2c8\ub2e4.\n\
+\ \ -quiet : \ucef4\ud30c\uc77c\ub7ec \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\
+\ \ -help : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
+\ \ -version : \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
+\ \ -fullversion : \uc815\uc2dd \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\
+
Driver.AddonUsage = \n\ud655\uc7a5:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = {0} \ucef4\ud30c\uc77c\uc744 \uc2dc\ub3c4\ud558\uace0 \uc788\uc2b5\ub2c8\uae4c? {0}\uc5d0 \ub300\ud55c \uc9c0\uc6d0\uc740 \uc2e4\ud5d8 \ub2e8\uacc4\uc785\ub2c8\ub2e4. {1} \uc635\uc158\uc744 \ud1b5\ud574 \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties Mon Oct 12 14:41:36 2015 -0700
@@ -33,10 +33,41 @@
ConsoleErrorReporter.UnknownFile = arquivo desconhecido
Driver.Private.Usage = Op\u00e7\u00f5es adicionais de teste privado:\n\\ \\ -debug : executar no modo de depura\u00e7\u00e3o (inclui -verbose)\n\\ \\ -mode <mode> : executar XJC em outro modo de execu\u00e7\u00e3o\n\\ \\ -private : exibir esta mensagem de ajuda\nModo:\n\\ \\ code : gerar c\u00f3digo de origem Java (default)\n\\ \\ dryrun : compilar o esquema na mem\u00f3ria, mas n\u00e3o gerar a origem Java\n\\ \\ zip : gerar c\u00f3digo de origem Java em um arquivo zip especificado pela op\u00e7\u00e3o -d\n\\ \\ sig : fazer dump das assinaturas do c\u00f3digo gerado\n\\ \\ forest : fazer dump do DOM transformado\n
-Driver.Public.Usage = Uso: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nSe dir for especificado, todos os arquivos do esquema dele ser\u00e3o compilados.\nSe jar for especificado, o arquivo de bind /META-INF/sun-jaxb.episode ser\u00e1 compilado.\nOp\u00e7\u00f5es:\n\\ \\ -nv : n\u00e3o executar valida\u00e7\u00e3o restrita do(s) esquema(s) de entrada\n\\ \\ -extension : permitir extens\u00f5es do fornecedor - n\u00e3o seguir rigorosamente as\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Regras de Compatibilidade e Ap\u00eandice E.2 da Espec. JAXB\n\\ \\ -b <file/dir> : especifica arquivos de bind externos (cada <file> deve ter seu pr\u00f3prio -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Se for fornecido um diret\u00f3rio, **/*.xjb ser\u00e1 pesquisado\n\\ \\ -d <dir> : os arquivos gerados ficar\u00e3o neste diret\u00f3rio\n\\ \\ -p <pkg> : especifica o pacote do alvo\n\\ \\ -httpproxy <proxy> : definir proxy HTTP/HTTPS. O formato \u00e9 [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : Funciona como -httpproxy, mas usa o argumento em um arquivo para proteger a senha \n\\ \\ -classpath <arg> : especifica onde localizar os arquivos de classe do usu\u00e1rio\n\\ \\ -catalog <file> : especifica arquivos do cat\u00e1logo para resolver refer\u00eancias da entidade externa\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ suporta TR9401, formato de XCatalog e do Cat\u00e1logo XML do OASIS.\n\\ \\ -readOnly : os arquivos gerados ficar\u00e3o no modo somente leitura\n\\ \\ -npa : suprime a gera\u00e7\u00e3o de anota\u00e7\u00f5es do n\u00edvel do pacote (**/package-info.java)\n\\ \\ -no-header : suprime a gera\u00e7\u00e3o de um cabe\u00e7alho do arquivo com timestamp\n\\ \\ -target (2.0|2.1) : atua como XJC 2.0 ou 2.1 e gera c\u00f3digo que n\u00e3o usa nenhum recurso 2.2.\n\\ \\ -encoding <encoding> : especifica codifica\u00e7\u00e3o de caracteres para arquivos de origem gerados\n\\ \\ -enableIntrospection : ativa a gera\u00e7\u00e3o correta de getters/setters Boolianos para ativar apis de Introspec\u00e7\u00e3o de Bean \n\\ \\ -contentForWildcard : gera a propriedade do conte\u00fado dos tipos com v\u00e1rios xs:todos elementos derivados \n\\ \\ -xmlschema : trata a sa\u00edda como Esquema XML de W3C (default)\n\\ \\ -relaxng : trata a entrada como RELAX NG (experimental, n\u00e3o suportada)\n\\ \\ -relaxng-compact : trata a entrada como sintaxe compacta RELAX NG (experimental, n\u00e3o suportada)\n\\ \\ -dtd : trata a entrada como XML DTD (experimental,n\u00e3o suportada)\n\\ \\ -wsdl : trata a entrada como WSDL e compila esquemas dentro dela (experimental,n\u00e3o suportada)\n\\ \\ -verbose : verbose extra\n\\ \\ -quiet : suprime a sa\u00edda do compilador\n\\ \\ -help : exibe esta mensagem de ajuda\n\\ \\ -version : exibe informa\u00e7\u00f5es da vers\u00e3o\n\\ \\ -fullversion : exibe informa\u00e7\u00f5es da vers\u00e3o completa\n
+Driver.Public.Usage = Uso: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+Se dir for especificado, todos os arquivos do esquema dele ser\u00e3o compilados.\n\
+Se jar for especificado, o arquivo de bind /META-INF/sun-jaxb.episode ser\u00e1 compilado.\n\
+Op\u00e7\u00f5es:\n\
+\ \ -nv : n\u00e3o executar valida\u00e7\u00e3o restrita do(s) esquema(s) de entrada\n\
+\ \ -extension : permitir extens\u00f5es do fornecedor - n\u00e3o seguir rigorosamente as\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Regras de Compatibilidade e Ap\u00eandice E.2 da Espec. JAXB\n\
+\ \ -b <file/dir> : especifica arquivos de bind externos (cada <file> deve ter seu pr\u00f3prio -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Se for fornecido um diret\u00f3rio, **/*.xjb ser\u00e1 pesquisado\n\
+\ \ -d <dir> : os arquivos gerados ficar\u00e3o neste diret\u00f3rio\n\
+\ \ -p <pkg> : especifica o pacote do alvo\n\
+\ \ -httpproxy <proxy> : definir proxy HTTP/HTTPS. O formato \u00e9 [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> : Funciona como -httpproxy, mas usa o argumento em um arquivo para proteger a senha \n\
+\ \ -classpath <arg> : especifica onde localizar os arquivos de classe do usu\u00e1rio\n\
+\ \ -catalog <file> : especifica arquivos do cat\u00e1logo para resolver refer\u00eancias da entidade externa\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ suporta TR9401, formato de XCatalog e do Cat\u00e1logo XML do OASIS.\n\
+\ \ -readOnly : os arquivos gerados ficar\u00e3o no modo somente leitura\n\
+\ \ -npa : suprime a gera\u00e7\u00e3o de anota\u00e7\u00f5es do n\u00edvel do pacote (**/package-info.java)\n\
+\ \ -no-header : suprime a gera\u00e7\u00e3o de um cabe\u00e7alho do arquivo com timestamp\n\
+\ \ -target (2.0|2.1) : atua como XJC 2.0 ou 2.1 e gera c\u00f3digo que n\u00e3o usa nenhum recurso 2.2.\n\
+\ \ -encoding <encoding> : especifica codifica\u00e7\u00e3o de caracteres para arquivos de origem gerados\n\
+\ \ -enableIntrospection : ativa a gera\u00e7\u00e3o correta de getters/setters Boolianos para ativar apis de Introspec\u00e7\u00e3o de Bean \n\
+\ \ -contentForWildcard : gera a propriedade do conte\u00fado dos tipos com v\u00e1rios xs:todos elementos derivados \n\
+\ \ -xmlschema : trata a sa\u00edda como Esquema XML de W3C (default)\n\
+\ \ -dtd : trata a entrada como XML DTD (experimental,n\u00e3o suportada)\n\
+\ \ -wsdl : trata a entrada como WSDL e compila esquemas dentro dela (experimental,n\u00e3o suportada)\n\
+\ \ -verbose : verbose extra\n\
+\ \ -quiet : suprime a sa\u00edda do compilador\n\
+\ \ -help : exibe esta mensagem de ajuda\n\
+\ \ -version : exibe informa\u00e7\u00f5es da vers\u00e3o\n\
+\ \ -fullversion : exibe informa\u00e7\u00f5es da vers\u00e3o completa\n\
+
Driver.AddonUsage = \nExtens\u00f5es:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = Voc\u00ea est\u00e1 tentando compilar {0}? O suporte para {0} \u00e9 experimental. Voc\u00ea pode ativ\u00e1-lo usando a op\u00e7\u00e3o {1}.
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties Mon Oct 12 14:41:36 2015 -0700
@@ -36,7 +36,42 @@
Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\u5982\u679c\u6307\u5b9a dir, \u5c06\u7f16\u8bd1\u8be5\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6a21\u5f0f\u6587\u4ef6\u3002\n\u5982\u679c\u6307\u5b9a jar, \u5c06\u7f16\u8bd1 /META-INF/sun-jaxb.episode \u7ed1\u5b9a\u6587\u4ef6\u3002\n\u9009\u9879:\n\ \ -nv : \u4e0d\u5bf9\u8f93\u5165\u6a21\u5f0f\u6267\u884c\u4e25\u683c\u9a8c\u8bc1\n\ \ -extension : \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u4e25\u683c\u9075\u5faa\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \u89c4\u8303\u4e2d\u7684\u517c\u5bb9\u6027\u89c4\u5219\u548c\u5e94\u7528\u7a0b\u5e8f E.2\n\ \ -b <file/dir> : \u6307\u5b9a\u5916\u90e8\u7ed1\u5b9a\u6587\u4ef6 (\u6bcf\u4e2a <file> \u5fc5\u987b\u5177\u6709\u81ea\u5df1\u7684 -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u5982\u679c\u6307\u5b9a\u76ee\u5f55, \u5219\u5c06\u641c\u7d22 **/*.xjb\n\ \ -d <dir> : \u751f\u6210\u7684\u6587\u4ef6\u5c06\u653e\u5165\u6b64\u76ee\u5f55\u4e2d\n\ \ -p <pkg> : \u6307\u5b9a\u76ee\u6807\u7a0b\u5e8f\u5305\n\ \ -httpproxy <proxy> : \u8bbe\u7f6e HTTP/HTTPS \u4ee3\u7406\u3002\u683c\u5f0f\u4e3a [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> : \u4f5c\u7528\u4e0e -httpproxy \u7c7b\u4f3c, \u4f46\u5728\u6587\u4ef6\u4e2d\u91c7\u7528\u53c2\u6570\u6765\u4fdd\u62a4\u53e3\u4ee4\n\ \ -classpath <arg> : \u6307\u5b9a\u67e5\u627e\u7528\u6237\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ \ -catalog <file> : \u6307\u5b9a\u7528\u4e8e\u89e3\u6790\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u7684\u76ee\u5f55\u6587\u4ef6\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u652f\u6301 TR9401, XCatalog \u548c OASIS XML \u76ee\u5f55\u683c\u5f0f\u3002\n\ \ -readOnly : \u751f\u6210\u7684\u6587\u4ef6\u5c06\u5904\u4e8e\u53ea\u8bfb\u6a21\u5f0f\n\ \ -npa : \u7981\u6b62\u751f\u6210\u7a0b\u5e8f\u5305\u7ea7\u522b\u6ce8\u91ca (**/package-info.java)\n\ \ -no-header : \u7981\u6b62\u751f\u6210\u5e26\u6709\u65f6\u95f4\u6233\u7684\u6587\u4ef6\u5934\n\ \ -target (2.0|2.1) : \u884c\u4e3a\u4e0e XJC 2.0 \u6216 2.1 \u7c7b\u4f3c, \u7528\u4e8e\u751f\u6210\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u4ee3\u7801\u3002\n\ \ -encoding <encoding> : \u4e3a\u751f\u6210\u7684\u6e90\u6587\u4ef6\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\n\ \ -enableIntrospection : \u7528\u4e8e\u6b63\u786e\u751f\u6210\u5e03\u5c14\u578b getter/setter \u4ee5\u542f\u7528 Bean \u81ea\u6d4b apis \n\ \ -contentForWildcard : \u4e3a\u5177\u6709\u591a\u4e2a xs:any \u6d3e\u751f\u5143\u7d20\u7684\u7c7b\u578b\u751f\u6210\u5185\u5bb9\u5c5e\u6027\n\ \ -xmlschema : \u91c7\u7528 W3C XML \u6a21\u5f0f\u5904\u7406\u8f93\u5165 (\u9ed8\u8ba4\u503c)\n\ \ -relaxng : \u91c7\u7528 RELAX NG \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -relaxng-compact : \u91c7\u7528 RELAX NG \u7b80\u6d01\u8bed\u6cd5\u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -dtd : \u91c7\u7528 XML DTD \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -wsdl : \u91c7\u7528 WSDL \u5904\u7406\u8f93\u5165\u5e76\u7f16\u8bd1\u5176\u4e2d\u7684\u6a21\u5f0f (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -verbose : \u7279\u522b\u8be6\u7ec6\n\ \ -quiet : \u9690\u85cf\u7f16\u8bd1\u5668\u8f93\u51fa\n\ \ -help : \u663e\u793a\u6b64\u5e2e\u52a9\u6d88\u606f\n\ \ -version : \u663e\u793a\u7248\u672c\u4fe1\u606f\n\ \ -fullversion : \u663e\u793a\u5b8c\u6574\u7684\u7248\u672c\u4fe1\u606f\n
Driver.AddonUsage = \n\u6269\u5c55:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+\u5982\u679c\u6307\u5b9a dir, \u5c06\u7f16\u8bd1\u8be5\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6a21\u5f0f\u6587\u4ef6\u3002\n\
+\u5982\u679c\u6307\u5b9a jar, \u5c06\u7f16\u8bd1 /META-INF/sun-jaxb.episode \u7ed1\u5b9a\u6587\u4ef6\u3002\n\
+\u9009\u9879:\n\
+\ \ -nv : \u4e0d\u5bf9\u8f93\u5165\u6a21\u5f0f\u6267\u884c\u4e25\u683c\u9a8c\u8bc1\n\
+\ \ -extension : \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u4e25\u683c\u9075\u5faa\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \u89c4\u8303\u4e2d\u7684\u517c\u5bb9\u6027\u89c4\u5219\u548c\u5e94\u7528\u7a0b\u5e8f E.2\n\
+\ \ -b <file/dir> : \u6307\u5b9a\u5916\u90e8\u7ed1\u5b9a\u6587\u4ef6 (\u6bcf\u4e2a <file> \u5fc5\u987b\u5177\u6709\u81ea\u5df1\u7684 -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u5982\u679c\u6307\u5b9a\u76ee\u5f55, \u5219\u5c06\u641c\u7d22 **/*.xjb\n\
+\ \ -d <dir> : \u751f\u6210\u7684\u6587\u4ef6\u5c06\u653e\u5165\u6b64\u76ee\u5f55\u4e2d\n\
+\ \ -p <pkg> : \u6307\u5b9a\u76ee\u6807\u7a0b\u5e8f\u5305\n\
+\ \ -httpproxy <proxy> : \u8bbe\u7f6e HTTP/HTTPS \u4ee3\u7406\u3002\u683c\u5f0f\u4e3a [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> : \u4f5c\u7528\u4e0e -httpproxy \u7c7b\u4f3c, \u4f46\u5728\u6587\u4ef6\u4e2d\u91c7\u7528\u53c2\u6570\u6765\u4fdd\u62a4\u53e3\u4ee4\n\
+\ \ -classpath <arg> : \u6307\u5b9a\u67e5\u627e\u7528\u6237\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n\
+\ \ -catalog <file> : \u6307\u5b9a\u7528\u4e8e\u89e3\u6790\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u7684\u76ee\u5f55\u6587\u4ef6\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u652f\u6301 TR9401, XCatalog \u548c OASIS XML \u76ee\u5f55\u683c\u5f0f\u3002\n\
+\ \ -readOnly : \u751f\u6210\u7684\u6587\u4ef6\u5c06\u5904\u4e8e\u53ea\u8bfb\u6a21\u5f0f\n\
+\ \ -npa : \u7981\u6b62\u751f\u6210\u7a0b\u5e8f\u5305\u7ea7\u522b\u6ce8\u91ca (**/package-info.java)\n\
+\ \ -no-header : \u7981\u6b62\u751f\u6210\u5e26\u6709\u65f6\u95f4\u6233\u7684\u6587\u4ef6\u5934\n\
+\ \ -target (2.0|2.1) : \u884c\u4e3a\u4e0e XJC 2.0 \u6216 2.1 \u7c7b\u4f3c, \u7528\u4e8e\u751f\u6210\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u4ee3\u7801\u3002\n\
+\ \ -encoding <encoding> : \u4e3a\u751f\u6210\u7684\u6e90\u6587\u4ef6\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\n\
+\ \ -enableIntrospection : \u7528\u4e8e\u6b63\u786e\u751f\u6210\u5e03\u5c14\u578b getter/setter \u4ee5\u542f\u7528 Bean \u81ea\u6d4b apis \n\
+\ \ -contentForWildcard : \u4e3a\u5177\u6709\u591a\u4e2a xs:any \u6d3e\u751f\u5143\u7d20\u7684\u7c7b\u578b\u751f\u6210\u5185\u5bb9\u5c5e\u6027\n\
+\ \ -xmlschema : \u91c7\u7528 W3C XML \u6a21\u5f0f\u5904\u7406\u8f93\u5165 (\u9ed8\u8ba4\u503c)\n\
+\ \ -dtd : \u91c7\u7528 XML DTD \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\
+\ \ -wsdl : \u91c7\u7528 WSDL \u5904\u7406\u8f93\u5165\u5e76\u7f16\u8bd1\u5176\u4e2d\u7684\u6a21\u5f0f (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\
+\ \ -verbose : \u7279\u522b\u8be6\u7ec6\n\
+\ \ -quiet : \u9690\u85cf\u7f16\u8bd1\u5668\u8f93\u51fa\n\
+\ \ -help : \u663e\u793a\u6b64\u5e2e\u52a9\u6d88\u606f\n\
+\ \ -version : \u663e\u793a\u7248\u672c\u4fe1\u606f\n\
+\ \ -fullversion : \u663e\u793a\u5b8c\u6574\u7684\u7248\u672c\u4fe1\u606f\n\
+
+Driver.AddonUsage = \n\
+\u6269\u5c55:
+
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = \u662f\u5426\u8981\u5c1d\u8bd5\u7f16\u8bd1{0}? \u5bf9{0}\u7684\u652f\u6301\u662f\u5b9e\u9a8c\u6027\u7684\u3002\u53ef\u901a\u8fc7\u4f7f\u7528{1}\u9009\u9879\u542f\u7528\u5b83\u3002
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties Mon Oct 12 14:41:36 2015 -0700
@@ -33,10 +33,41 @@
ConsoleErrorReporter.UnknownFile = \u4e0d\u660e\u7684\u6a94\u6848
Driver.Private.Usage = \u5176\u4ed6\u5c08\u7528\u6e2c\u8a66\u9078\u9805:\n\\ \\ -debug : \u5728\u9664\u932f\u6a21\u5f0f\u4e2d\u57f7\u884c (\u5305\u542b -verbose)\n\\ \\ -mode <mode> : \u5728\u5176\u4ed6\u57f7\u884c\u4e2d\u6a21\u5f0f\u4e0b\u57f7\u884c XJC\n\\ \\ -private : \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\u6a21\u5f0f:\n\\ \\ code : \u7522\u751f Java \u4f86\u6e90\u7a0b\u5f0f\u78bc (\u9810\u8a2d\u503c)\n\\ \\ dryrun : \u5728\u8a18\u61b6\u9ad4\u4e2d\u7de8\u8b6f\u7db1\u8981, \u4f46\u4e0d\u7522\u751f Java \u4f86\u6e90\n\\ \\ zip : \u5c07 Java \u4f86\u6e90\u7a0b\u5f0f\u78bc\u8f49\u63db\u70ba -d \u9078\u9805\u6307\u5b9a\u7684 zip \u6a94\u6848\n\\ \\ sig : \u50be\u5370\u7522\u751f\u4e4b\u7a0b\u5f0f\u78bc\u7684\u7c3d\u7ae0\n\\ \\ forest : \u50be\u5370\u8f49\u63db\u7684 DOM \u6a39\u7cfb\n
-Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\u82e5\u6307\u5b9a dir, \u5c07\u7de8\u8b6f\u5176\u4e2d\u7684\u6240\u6709\u7db1\u8981\u6a94\u6848.\n\u82e5\u6307\u5b9a jar, \u5c07\u7de8\u8b6f /META-INF/sun-jaxb.episode \u9023\u7d50\u6a94.\n\u9078\u9805:\n\\ \\ -nv : \u4e0d\u57f7\u884c\u56b4\u683c\u7684\u8f38\u5165\u7db1\u8981\u9a57\u8b49\n\\ \\ -extension : \u5141\u8a31\u5ee0\u5546\u64f4\u5145\u5957\u4ef6 - \u4e0d\u56b4\u683c\u9075\u5faa\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ JAXB \u898f\u683c\u4e2d\u7684\u76f8\u5bb9\u6027\u898f\u5247\u8207 App E.2\n\\ \\ -b <file/dir> : \u6307\u5b9a\u5916\u90e8\u9023\u7d50\u6a94 (\u6bcf\u500b <file> \u9700\u6709\u81ea\u5df1\u7684 -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \u82e5\u6307\u5b9a\u76ee\u9304, \u5247\u6703\u641c\u5c0b **/*.xjb\n\\ \\ -d <dir> : \u7522\u751f\u7684\u6a94\u6848\u5c07\u79fb\u81f3\u6b64\u76ee\u9304\n\\ \\ -p <pkg> : \u6307\u5b9a\u76ee\u6a19\u5957\u88dd\u7a0b\u5f0f\n\\ \\ -httpproxy <proxy> : \u8a2d\u5b9a HTTP/HTTPS \u4ee3\u7406\u4e3b\u6a5f. \u683c\u5f0f\u70ba [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : \u4f5c\u7528\u5982\u540c -httpproxy, \u4f46\u63a5\u53d7\u6a94\u6848\u4e2d\u7684\u5f15\u6578\u4ee5\u4fdd\u8b77\u5bc6\u78bc \n\\ \\ -classpath <arg> : \u6307\u5b9a\u5c0b\u627e\u4f7f\u7528\u8005\u985e\u5225\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ \\ -catalog <file> : \u6307\u5b9a\u89e3\u6790\u5916\u90e8\u5be6\u9ad4\u53c3\u7167\u7684\u76ee\u9304\u6a94\u6848\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \u652f\u63f4 TR9401\u3001XCatalog \u4ee5\u53ca OASIS XML \u76ee\u9304\u683c\u5f0f.\n\\ \\ -readOnly : \u7522\u751f\u7684\u6a94\u6848\u5c07\u662f\u552f\u8b80\u6a21\u5f0f\n\\ \\ -npa : \u6291\u5236\u5957\u88dd\u7a0b\u5f0f\u5c64\u6b21\u8a3b\u89e3 (**/package-info.java) \u7684\u7522\u751f\n\\ \\ -no-header : \u6291\u5236\u6a94\u6848\u6a19\u982d\u548c\u6642\u6233\u7684\u7522\u751f\n\\ \\ -target (2.0|2.1) : \u4f5c\u7528\u5982\u540c XJC 2.0 \u6216 2.1, \u4e26\u4e14\u6703\u7522\u751f\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u7a0b\u5f0f\u78bc.\n\\ \\ -encoding <encoding> : \u70ba\u7522\u751f\u7684\u4f86\u6e90\u6a94\u6848\u6307\u5b9a\u5b57\u5143\u7de8\u78bc\n\\ \\ -enableIntrospection : \u6b63\u78ba\u7522\u751f\u5e03\u6797\u503c getter/setter \u4ee5\u555f\u7528 Bean \u81ea\u6211\u6aa2\u67e5 api \n\\ \\ -contentForWildcard : \u70ba\u542b\u6709\u591a\u500b xs:any \u884d\u751f\u4e4b\u5143\u7d20\u7684\u985e\u578b\u7522\u751f\u5167\u5bb9\u7279\u6027 \n\\ \\ -xmlschema : \u5c07\u8f38\u5165\u8996\u70ba W3C XML \u7db1\u8981 (\u9810\u8a2d\u503c)\n\\ \\ -relaxng : \u5c07\u8f38\u5165\u8996\u70ba RELAX NG (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -relaxng-compact : \u5c07\u8f38\u5165\u8996\u70ba RELAX NG \u7cbe\u7c21\u8a9e\u6cd5 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u4e0d\u652f\u63f4)\n\\ \\ -dtd : \u5c07\u8f38\u5165\u8996\u70ba XML DTD (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -wsdl : \u5c07\u8f38\u5165\u8996\u70ba WSDL, \u4e26\u7de8\u8b6f\u5176\u4e2d\u7684\u7db1\u8981 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -verbose : \u63d0\u4f9b\u984d\u5916\u7684\u8a73\u7d30\u8cc7\u8a0a\n\\ \\ -quiet : \u6291\u5236\u7de8\u8b6f\u5668\u8f38\u51fa\n\\ \\ -help : \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\\ \\ -version : \u986f\u793a\u7248\u672c\u8cc7\u8a0a\n\\ \\ -fullversion : \u986f\u793a\u5b8c\u6574\u7248\u672c\u8cc7\u8a0a\n
+Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
+\u82e5\u6307\u5b9a dir, \u5c07\u7de8\u8b6f\u5176\u4e2d\u7684\u6240\u6709\u7db1\u8981\u6a94\u6848.\n\
+\u82e5\u6307\u5b9a jar, \u5c07\u7de8\u8b6f /META-INF/sun-jaxb.episode \u9023\u7d50\u6a94.\n\
+\u9078\u9805:\n\
+\ \ -nv : \u4e0d\u57f7\u884c\u56b4\u683c\u7684\u8f38\u5165\u7db1\u8981\u9a57\u8b49\n\
+\ \ -extension : \u5141\u8a31\u5ee0\u5546\u64f4\u5145\u5957\u4ef6 - \u4e0d\u56b4\u683c\u9075\u5faa\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \u898f\u683c\u4e2d\u7684\u76f8\u5bb9\u6027\u898f\u5247\u8207 App E.2\n\
+\ \ -b <file/dir> : \u6307\u5b9a\u5916\u90e8\u9023\u7d50\u6a94 (\u6bcf\u500b <file> \u9700\u6709\u81ea\u5df1\u7684 -b)\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u82e5\u6307\u5b9a\u76ee\u9304, \u5247\u6703\u641c\u5c0b **/*.xjb\n\
+\ \ -d <dir> : \u7522\u751f\u7684\u6a94\u6848\u5c07\u79fb\u81f3\u6b64\u76ee\u9304\n\
+\ \ -p <pkg> : \u6307\u5b9a\u76ee\u6a19\u5957\u88dd\u7a0b\u5f0f\n\
+\ \ -httpproxy <proxy> : \u8a2d\u5b9a HTTP/HTTPS \u4ee3\u7406\u4e3b\u6a5f. \u683c\u5f0f\u70ba [user[:password]@]proxyHost:proxyPort\n\
+\ \ -httpproxyfile <f> : \u4f5c\u7528\u5982\u540c -httpproxy, \u4f46\u63a5\u53d7\u6a94\u6848\u4e2d\u7684\u5f15\u6578\u4ee5\u4fdd\u8b77\u5bc6\u78bc \n\
+\ \ -classpath <arg> : \u6307\u5b9a\u5c0b\u627e\u4f7f\u7528\u8005\u985e\u5225\u6a94\u6848\u7684\u4f4d\u7f6e\n\
+\ \ -catalog <file> : \u6307\u5b9a\u89e3\u6790\u5916\u90e8\u5be6\u9ad4\u53c3\u7167\u7684\u76ee\u9304\u6a94\u6848\n\
+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u652f\u63f4 TR9401\u3001XCatalog \u4ee5\u53ca OASIS XML \u76ee\u9304\u683c\u5f0f.\n\
+\ \ -readOnly : \u7522\u751f\u7684\u6a94\u6848\u5c07\u662f\u552f\u8b80\u6a21\u5f0f\n\
+\ \ -npa : \u6291\u5236\u5957\u88dd\u7a0b\u5f0f\u5c64\u6b21\u8a3b\u89e3 (**/package-info.java) \u7684\u7522\u751f\n\
+\ \ -no-header : \u6291\u5236\u6a94\u6848\u6a19\u982d\u548c\u6642\u6233\u7684\u7522\u751f\n\
+\ \ -target (2.0|2.1) : \u4f5c\u7528\u5982\u540c XJC 2.0 \u6216 2.1, \u4e26\u4e14\u6703\u7522\u751f\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u7a0b\u5f0f\u78bc.\n\
+\ \ -encoding <encoding> : \u70ba\u7522\u751f\u7684\u4f86\u6e90\u6a94\u6848\u6307\u5b9a\u5b57\u5143\u7de8\u78bc\n\
+\ \ -enableIntrospection : \u6b63\u78ba\u7522\u751f\u5e03\u6797\u503c getter/setter \u4ee5\u555f\u7528 Bean \u81ea\u6211\u6aa2\u67e5 api \n\
+\ \ -contentForWildcard : \u70ba\u542b\u6709\u591a\u500b xs:any \u884d\u751f\u4e4b\u5143\u7d20\u7684\u985e\u578b\u7522\u751f\u5167\u5bb9\u7279\u6027 \n\
+\ \ -xmlschema : \u5c07\u8f38\u5165\u8996\u70ba W3C XML \u7db1\u8981 (\u9810\u8a2d\u503c)\n\
+\ \ -dtd : \u5c07\u8f38\u5165\u8996\u70ba XML DTD (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\
+\ \ -wsdl : \u5c07\u8f38\u5165\u8996\u70ba WSDL, \u4e26\u7de8\u8b6f\u5176\u4e2d\u7684\u7db1\u8981 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\
+\ \ -verbose : \u63d0\u4f9b\u984d\u5916\u7684\u8a73\u7d30\u8cc7\u8a0a\n\
+\ \ -quiet : \u6291\u5236\u7de8\u8b6f\u5668\u8f38\u51fa\n\
+\ \ -help : \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\
+\ \ -version : \u986f\u793a\u7248\u672c\u8cc7\u8a0a\n\
+\ \ -fullversion : \u986f\u793a\u5b8c\u6574\u7248\u672c\u8cc7\u8a0a\n\
+
Driver.AddonUsage = \n\u64f4\u5145\u5957\u4ef6:
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
+# {0} - one of: DTD, WSDL; {1} - one of (respectively): -dtd, -wsdl
Driver.ExperimentalLanguageWarning = \u60a8\u6b63\u5728\u5617\u8a66\u7de8\u8b6f {0} \u55ce? \u5c0d {0} \u7684\u652f\u63f4\u662f\u5be6\u9a57\u6027\u7684. \u60a8\u53ef\u4f7f\u7528 {1} \u9078\u9805\u4f86\u555f\u7528.
# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/ModelLoader.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/ModelLoader.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -38,8 +38,6 @@
import com.sun.tools.internal.xjc.reader.internalizer.InternalizationLogic;
import com.sun.tools.internal.xjc.reader.internalizer.SCDBasedBindingSet;
import com.sun.tools.internal.xjc.reader.internalizer.VersionChecker;
-import com.sun.tools.internal.xjc.reader.relaxng.RELAXNGCompiler;
-import com.sun.tools.internal.xjc.reader.relaxng.RELAXNGInternalizationLogic;
import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl;
import com.sun.tools.internal.xjc.reader.xmlschema.parser.CustomizationContextChecker;
@@ -54,15 +52,6 @@
import com.sun.xml.internal.xsom.parser.XSOMParser;
import javax.xml.XMLConstants;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.util.CheckingSchemaBuilder;
-import com.sun.xml.internal.rngom.digested.DPattern;
-import com.sun.xml.internal.rngom.digested.DSchemaBuilderImpl;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.parse.compact.CompactParseable;
-import com.sun.xml.internal.rngom.parse.xml.SAXParseable;
-import com.sun.xml.internal.rngom.xml.sax.XMLReaderCreator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -73,8 +62,6 @@
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLFilter;
-import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLFilterImpl;
/**
@@ -141,16 +128,6 @@
grammar = loadDTD(opt.getGrammars()[0], bindFile );
break;
- case RELAXNG :
- checkTooManySchemaErrors();
- grammar = loadRELAXNG();
- break;
-
- case RELAXNG_COMPACT :
- checkTooManySchemaErrors();
- grammar = loadRELAXNGCompact();
- break;
-
case WSDL:
grammar = annotateXMLSchema( loadWSDL() );
break;
@@ -206,12 +183,6 @@
case DTD:
msg = new String[]{"DTD","-dtd"};
break;
- case RELAXNG:
- msg = new String[]{"RELAX NG","-relaxng"};
- break;
- case RELAXNG_COMPACT:
- msg = new String[]{"RELAX NG compact syntax","-relaxng-compact"};
- break;
case WSDL:
msg = new String[]{"WSDL","-wsdl"};
break;
@@ -528,71 +499,4 @@
return result;
}
- /**
- * Parses a RELAX NG grammar into an annotated grammar.
- */
- private Model loadRELAXNG() throws SAXException {
-
- // build DOM forest
- final DOMForest forest = buildDOMForest( new RELAXNGInternalizationLogic() );
-
- // use JAXP masquerading to validate the input document.
- // DOMForest -> ExtensionBindingChecker -> RNGOM
-
- XMLReaderCreator xrc = new XMLReaderCreator() {
- public XMLReader createXMLReader() {
-
- // foreset parser cannot change the receivers while it's working,
- // so we need to have one XMLFilter that works as a buffer
- XMLFilter buffer = new XMLFilterImpl() {
- @Override
- public void parse(InputSource source) throws IOException, SAXException {
- forest.createParser().parse( source, this, this, this );
- }
- };
-
- XMLFilter f = new ExtensionBindingChecker(Const.RELAXNG_URI,opt,errorReceiver);
- f.setParent(buffer);
-
- f.setEntityResolver(opt.entityResolver);
-
- return f;
- }
- };
-
- Parseable p = new SAXParseable( opt.getGrammars()[0], errorReceiver, xrc );
-
- return loadRELAXNG(p);
-
- }
-
- /**
- * Loads RELAX NG compact syntax
- */
- private Model loadRELAXNGCompact() {
- if(opt.getBindFiles().length>0)
- errorReceiver.error(new SAXParseException(
- Messages.format(Messages.ERR_BINDING_FILE_NOT_SUPPORTED_FOR_RNC),null));
-
- // TODO: entity resolver?
- Parseable p = new CompactParseable( opt.getGrammars()[0], errorReceiver );
-
- return loadRELAXNG(p);
-
- }
-
- /**
- * Common part between the XML syntax and the compact syntax.
- */
- private Model loadRELAXNG(Parseable p) {
- SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);
-
- try {
- DPattern out = (DPattern)p.parse(sb);
- return RELAXNGCompiler.build(out,codeModel,opt);
- } catch (IllegalSchemaException e) {
- errorReceiver.error(e.getMessage(),e);
- return null;
- }
- }
}
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -562,14 +562,6 @@
schemaLanguage = Language.DTD;
return 1;
}
- if (args[i].equals("-relaxng")) {
- schemaLanguage = Language.RELAXNG;
- return 1;
- }
- if (args[i].equals("-relaxng-compact")) {
- schemaLanguage = Language.RELAXNG_COMPACT;
- return 1;
- }
if (args[i].equals("-xmlschema")) {
schemaLanguage = Language.XMLSCHEMA;
return 1;
@@ -869,10 +861,6 @@
if ((grammars != null) && (grammars.size() > 0)) {
String name = grammars.get(0).getSystemId().toLowerCase();
- if (name.endsWith(".rng"))
- return Language.RELAXNG;
- if (name.endsWith(".rnc"))
- return Language.RELAXNG_COMPACT;
if (name.endsWith(".dtd"))
return Language.DTD;
if (name.endsWith(".wsdl"))
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/util/NamespaceContextAdapter.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/util/NamespaceContextAdapter.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -32,7 +32,7 @@
import com.sun.xml.internal.xsom.XmlString;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
/**
* Take a {@link ValidationContext} and make it look like a {@link NamespaceContext}.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/Datatype.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Datatype object.
+ *
+ * This object has the following functionality:
+ *
+ * <ol>
+ * <li> functionality to identify a class of character sequences. This is
+ * done through the isValid method.
+ *
+ * <li> functionality to produce a "value object" from a character sequence and
+ * context information.
+ *
+ * <li> functionality to test the equality of two value objects.
+ * </ol>
+ *
+ * This interface also defines the createStreamingValidator method,
+ * which is intended to efficiently support the validation of
+ * large character sequences.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface Datatype {
+
+ /**
+ * Checks if the specified 'literal' matches this Datatype
+ * with respect to the current context.
+ *
+ * @param literal
+ * the lexical representation to be checked.
+ * @param context
+ * If this datatype is context-dependent
+ * (i.e. the {@link #isContextDependent} method returns true),
+ * then the caller must provide a non-null valid context object.
+ * Otherwise, the caller can pass null.
+ *
+ * @return
+ * true if the 'literal' is a member of this Datatype;
+ * false if it's not a member of this Datatype.
+ */
+ boolean isValid( String literal, ValidationContext context );
+
+ /**
+ * Similar to the isValid method but throws an exception with diagnosis
+ * in case of errors.
+ *
+ * <p>
+ * If the specified 'literal' is a valid lexical representation for this
+ * datatype, then this method must return without throwing any exception.
+ * If not, the callee must throw an exception (with diagnosis message,
+ * if possible.)
+ *
+ * <p>
+ * The application can use this method to provide detailed error message
+ * to users. This method is kept separate from the isValid method to
+ * achieve higher performance during normal validation.
+ *
+ * @exception DatatypeException
+ * If the given literal is invalid, then this exception is thrown.
+ * If the callee supports error diagnosis, then the exception should
+ * contain a diagnosis message.
+ */
+ void checkValid( String literal, ValidationContext context )
+ throws DatatypeException;
+
+ /**
+ * Creates an instance of a streaming validator for this type.
+ *
+ * <p>
+ * By using streaming validators instead of the isValid method,
+ * the caller can avoid keeping the entire string, which is
+ * sometimes quite big, in memory.
+ *
+ * @param context
+ * If this datatype is context-dependent
+ * (i.e. the {@link #isContextDependent} method returns true),
+ * then the caller must provide a non-null valid context object.
+ * Otherwise, the caller can pass null.
+ * The callee may keep a reference to this context object
+ * only while the returned streaming validator is being used.
+ */
+ DatatypeStreamingValidator createStreamingValidator( ValidationContext context );
+
+ /**
+ * Converts lexcial value and the current context to the corresponding
+ * value object.
+ *
+ * <p>
+ * The caller cannot generally assume that the value object is
+ * a meaningful Java object. For example, the caller cannot expect
+ * this method to return <code>java.lang.Number</code> type for
+ * the "integer" type of XML Schema Part 2.
+ *
+ * <p>
+ * Also, the caller cannot assume that the equals method and
+ * the hashCode method of the value object are consistent with
+ * the semantics of the datatype. For that purpose, the sameValue
+ * method and the valueHashCode method have to be used. Note that
+ * this means you cannot use classes like
+ * <code>java.util.Hashtable</code> to store the value objects.
+ *
+ * <p>
+ * The returned value object should be used solely for the sameValue
+ * and valueHashCode methods.
+ *
+ * @param context
+ * If this datatype is context-dependent
+ * (when the {@link #isContextDependent} method returns true),
+ * then the caller must provide a non-null valid context object.
+ * Otherwise, the caller can pass null.
+ *
+ * @return null
+ * when the given lexical value is not a valid lexical
+ * value for this type.
+ */
+ Object createValue( String literal, ValidationContext context );
+
+ /**
+ * Tests the equality of two value objects which were originally
+ * created by the createValue method of this object.
+ *
+ * The behavior is undefined if objects not created by this type
+ * are passed. It is the caller's responsibility to ensure that
+ * value objects belong to this type.
+ *
+ * @return
+ * true if two value objects are considered equal according to
+ * the definition of this datatype; false if otherwise.
+ */
+ boolean sameValue( Object value1, Object value2 );
+
+
+ /**
+ * Computes the hash code for a value object,
+ * which is consistent with the sameValue method.
+ *
+ * @return
+ * hash code for the specified value object.
+ */
+ int valueHashCode( Object value );
+
+
+
+
+ /**
+ * Indicates that the datatype doesn't have ID/IDREF semantics.
+ *
+ * This value is one of the possible return values of the
+ * {@link #getIdType} method.
+ */
+ public static final int ID_TYPE_NULL = 0;
+
+ /**
+ * Indicates that RELAX NG compatibility processors should
+ * treat this datatype as having ID semantics.
+ *
+ * This value is one of the possible return values of the
+ * {@link #getIdType} method.
+ */
+ public static final int ID_TYPE_ID = 1;
+
+ /**
+ * Indicates that RELAX NG compatibility processors should
+ * treat this datatype as having IDREF semantics.
+ *
+ * This value is one of the possible return values of the
+ * {@link #getIdType} method.
+ */
+ public static final int ID_TYPE_IDREF = 2;
+
+ /**
+ * Indicates that RELAX NG compatibility processors should
+ * treat this datatype as having IDREFS semantics.
+ *
+ * This value is one of the possible return values of the
+ * {@link #getIdType} method.
+ */
+ public static final int ID_TYPE_IDREFS = 3;
+
+ /**
+ * Checks if the ID/IDREF semantics is associated with this
+ * datatype.
+ *
+ * <p>
+ * This method is introduced to support the RELAX NG DTD
+ * compatibility spec. (Of course it's always free to use
+ * this method for other purposes.)
+ *
+ * <p>
+ * If you are implementing a datatype library and have no idea about
+ * the "RELAX NG DTD compatibility" thing, just return
+ * <code>ID_TYPE_NULL</code> is fine.
+ *
+ * @return
+ * If this datatype doesn't have any ID/IDREF semantics,
+ * it returns {@link #ID_TYPE_NULL}. If it has such a semantics
+ * (for example, XSD:ID, XSD:IDREF and comp:ID type), then
+ * it returns {@link #ID_TYPE_ID}, {@link #ID_TYPE_IDREF} or
+ * {@link #ID_TYPE_IDREFS}.
+ */
+ public int getIdType();
+
+
+ /**
+ * Checks if this datatype may need a context object for
+ * the validation.
+ *
+ * <p>
+ * The callee must return true even when the context
+ * is not always necessary. (For example, the "QName" type
+ * doesn't need a context object when validating unprefixed
+ * string. But nonetheless QName must return true.)
+ *
+ * <p>
+ * XSD's <code>string</code> and <code>short</code> types
+ * are examples of context-independent datatypes.
+ * Its <code>QName</code> and <code>ENTITY</code> types
+ * are examples of context-dependent datatypes.
+ *
+ * <p>
+ * When a datatype is context-independent, then
+ * the {@link #isValid} method, the {@link #checkValid} method,
+ * the {@link #createStreamingValidator} method and
+ * the {@link #createValue} method can be called without
+ * providing a context object.
+ *
+ * @return
+ * <b>true</b> if this datatype is context-dependent
+ * (it needs a context object sometimes);
+ *
+ * <b>false</b> if this datatype is context-<b>in</b>dependent
+ * (it never needs a context object).
+ */
+ public boolean isContextDependent();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeBuilder.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Creates a user-defined type by adding parameters to
+ * the pre-defined type.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeBuilder {
+
+ /**
+ * Adds a new parameter.
+ *
+ * @param name
+ * The name of the parameter to be added.
+ * @param strValue
+ * The raw value of the parameter. Caller may not normalize
+ * this value because any white space is potentially significant.
+ * @param context
+ * The context information which can be used by the callee to
+ * acquire additional information. This context object is
+ * valid only during this method call. The callee may not
+ * keep a reference to this object.
+ * @exception DatatypeException
+ * When the given parameter is inappropriate for some reason.
+ * The callee is responsible to recover from this error.
+ * That is, the object should behave as if no such error
+ * was occured.
+ */
+ void addParameter( String name, String strValue, ValidationContext context )
+ throws DatatypeException;
+
+ /**
+ * Derives a new Datatype from a Datatype by parameters that
+ * were already set through the addParameter method.
+ *
+ * @exception DatatypeException
+ * DatatypeException must be thrown if the derivation is
+ * somehow invalid. For example, a required parameter is missing,
+ * etc. The exception should contain a diagnosis message
+ * if possible.
+ */
+ Datatype createDatatype() throws DatatypeException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeException.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Signals Datatype related exceptions.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public class DatatypeException extends Exception {
+
+ public DatatypeException( int index, String msg ) {
+ super(msg);
+ this.index = index;
+ }
+ public DatatypeException( String msg ) {
+ this(UNKNOWN,msg);
+ }
+ /**
+ * A constructor for those datatype libraries which don't support any
+ * diagnostic information at all.
+ */
+ public DatatypeException() {
+ this(UNKNOWN,null);
+ }
+
+
+ private final int index;
+
+ public static final int UNKNOWN = -1;
+
+ /**
+ * Gets the index of the content where the error occured.
+ * UNKNOWN can be returned to indicate that no index information
+ * is available.
+ */
+ public int getIndex() {
+ return index;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeLibrary.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * A Datatype library
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeLibrary {
+
+ /**
+ * Creates a new instance of DatatypeBuilder.
+ *
+ * The callee should throw a DatatypeException in case of an error.
+ *
+ * @param baseTypeLocalName
+ * The local name of the base type.
+ *
+ * @return
+ * A non-null valid datatype object.
+ */
+ DatatypeBuilder createDatatypeBuilder( String baseTypeLocalName )
+ throws DatatypeException;
+
+ /**
+ * Gets or creates a pre-defined type.
+ *
+ * This is just a short-cut of
+ * <code>createDatatypeBuilder(typeLocalName).createDatatype();</code>
+ *
+ * The callee should throw a DatatypeException in case of an error.
+ *
+ * @return
+ * A non-null valid datatype object.
+ */
+ Datatype createDatatype( String typeLocalName ) throws DatatypeException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeLibraryFactory.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Factory class for the DatatypeLibrary class.
+ *
+ * <p>
+ * The datatype library should provide the implementation of
+ * this interface if it wants to be found by the schema processors.
+ * The implementor also have to place a file in your jar file.
+ * See the reference datatype library implementation for detail.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeLibraryFactory
+{
+ /**
+ * Creates a new instance of a DatatypeLibrary that supports
+ * the specified namespace URI.
+ *
+ * @return
+ * <code>null</code> if the specified namespace URI is not
+ * supported.
+ */
+ DatatypeLibrary createDatatypeLibrary( String namespaceURI );
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/DatatypeStreamingValidator.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * Datatype streaming validator.
+ *
+ * <p>
+ * The streaming validator is an optional feature that is useful for
+ * certain Datatypes. It allows the caller to incrementally provide
+ * the literal.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeStreamingValidator {
+
+ /**
+ * Passes an additional fragment of the literal.
+ *
+ * <p>
+ * The application can call this method several times, then call
+ * the isValid method (or the checkValid method) to check the validity
+ * of the accumulated characters.
+ */
+ void addCharacters( char[] buf, int start, int len );
+
+ /**
+ * Tells if the accumulated literal is valid with respect to
+ * the underlying Datatype.
+ *
+ * @return
+ * True if it is valid. False if otherwise.
+ */
+ boolean isValid();
+
+ /**
+ * Similar to the isValid method, but this method throws
+ * Exception (with possibly diagnostic information), instead of
+ * returning false.
+ *
+ * @exception DatatypeException
+ * If the callee supports the diagnosis and the accumulated
+ * literal is invalid, then this exception that possibly
+ * contains diagnosis information is thrown.
+ */
+ void checkValid() throws DatatypeException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/ValidationContext.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype;
+
+/**
+ * An interface that must be implemented by caller to
+ * provide context information that is necessary to
+ * perform validation of some Datatypes.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface ValidationContext {
+
+ /**
+ * Resolves a namespace prefix to the corresponding namespace URI.
+ *
+ * This method is used for validating the QName type, for example.
+ *
+ * <p>
+ * If the prefix is "" (empty string), it indicates
+ * an unprefixed value. The callee
+ * should resolve it as for an unprefixed
+ * element, rather than for an unprefixed attribute.
+ *
+ * <p>
+ * If the prefix is "xml", then the callee must resolve
+ * this prefix into "http://www.w3.org/XML/1998/namespace",
+ * as defined in the XML Namespaces Recommendation.
+ *
+ * @return
+ * namespace URI of this prefix.
+ * If the specified prefix is not declared,
+ * the implementation must return null.
+ */
+ String resolveNamespacePrefix( String prefix );
+
+ /**
+ * Returns the base URI of the context. The null string may be returned
+ * if no base URI is known.
+ */
+ String getBaseUri();
+
+ /**
+ * Checks if an unparsed entity is declared with the
+ * specified name.
+ *
+ * @return
+ * true
+ * if the DTD has an unparsed entity declaration for
+ * the specified name.
+ * false
+ * otherwise.
+ */
+ boolean isUnparsedEntity( String entityName );
+
+ /**
+ * Checks if a notation is declared with the
+ * specified name.
+ *
+ * @return
+ * true
+ * if the DTD has a notation declaration for the specified name.
+ * false
+ * otherwise.
+ */
+ boolean isNotation( String notationName );
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,261 @@
+/**
+ * Copyright (c) 2001, 2015 Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.sun.xml.internal.org.relaxng.datatype.helpers;
+
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+import java.util.Vector;
+import java.io.Reader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URL;
+
+/**
+ * Discovers the datatype library implementation from the classpath.
+ *
+ * <p>
+ * The call of the createDatatypeLibrary method finds an implementation
+ * from a given datatype library URI at run-time.
+ */
+public class DatatypeLibraryLoader implements DatatypeLibraryFactory {
+ private final Service service = new Service(DatatypeLibraryFactory.class);
+
+ public DatatypeLibrary createDatatypeLibrary(String uri) {
+ for (Enumeration e = service.getProviders();
+ e.hasMoreElements();) {
+ DatatypeLibraryFactory factory
+ = (DatatypeLibraryFactory)e.nextElement();
+ DatatypeLibrary library = factory.createDatatypeLibrary(uri);
+ if (library != null)
+ return library;
+ }
+ return null;
+ }
+
+ private static class Service {
+ private final Class serviceClass;
+ private final Enumeration configFiles;
+ private Enumeration classNames = null;
+ private final Vector providers = new Vector();
+ private Loader loader;
+
+ private class ProviderEnumeration implements Enumeration {
+ private int nextIndex = 0;
+
+ public boolean hasMoreElements() {
+ return nextIndex < providers.size() || moreProviders();
+ }
+
+ public Object nextElement() {
+ try {
+ return providers.elementAt(nextIndex++);
+ }
+ catch (ArrayIndexOutOfBoundsException e) {
+ throw new NoSuchElementException();
+ }
+ }
+ }
+
+ private static class Singleton implements Enumeration {
+ private Object obj;
+ private Singleton(Object obj) {
+ this.obj = obj;
+ }
+
+ public boolean hasMoreElements() {
+ return obj != null;
+ }
+
+ public Object nextElement() {
+ if (obj == null)
+ throw new NoSuchElementException();
+ Object tem = obj;
+ obj = null;
+ return tem;
+ }
+ }
+
+ // JDK 1.1
+ private static class Loader {
+ Enumeration getResources(String resName) {
+ ClassLoader cl = Loader.class.getClassLoader();
+ URL url;
+ if (cl == null)
+ url = ClassLoader.getSystemResource(resName);
+ else
+ url = cl.getResource(resName);
+ return new Singleton(url);
+ }
+
+ Class loadClass(String name) throws ClassNotFoundException {
+ return Class.forName(name);
+ }
+ }
+
+ // JDK 1.2+
+ private static class Loader2 extends Loader {
+ private ClassLoader cl;
+
+ Loader2() {
+ cl = Loader2.class.getClassLoader();
+ // If the thread context class loader has the class loader
+ // of this class as an ancestor, use the thread context class
+ // loader. Otherwise, the thread context class loader
+ // probably hasn't been set up properly, so don't use it.
+ ClassLoader clt = Thread.currentThread().getContextClassLoader();
+ for (ClassLoader tem = clt; tem != null; tem = tem.getParent())
+ if (tem == cl) {
+ cl = clt;
+ break;
+ }
+ }
+
+ Enumeration getResources(String resName) {
+ try {
+ return cl.getResources(resName);
+ }
+ catch (IOException e) {
+ return new Singleton(null);
+ }
+ }
+
+ Class loadClass(String name) throws ClassNotFoundException {
+ return Class.forName(name, true, cl);
+ }
+ }
+
+ public Service(Class cls) {
+ try {
+ loader = new Loader2();
+ }
+ catch (NoSuchMethodError e) {
+ loader = new Loader();
+ }
+ serviceClass = cls;
+ String resName = "META-INF/services/" + serviceClass.getName();
+ configFiles = loader.getResources(resName);
+ }
+
+ public Enumeration getProviders() {
+ return new ProviderEnumeration();
+ }
+
+ synchronized private boolean moreProviders() {
+ for (;;) {
+ while (classNames == null) {
+ if (!configFiles.hasMoreElements())
+ return false;
+ classNames = parseConfigFile((URL)configFiles.nextElement());
+ }
+ while (classNames.hasMoreElements()) {
+ String className = (String)classNames.nextElement();
+ try {
+ Class cls = loader.loadClass(className);
+ Object obj = cls.newInstance();
+ if (serviceClass.isInstance(obj)) {
+ providers.addElement(obj);
+ return true;
+ }
+ }
+ catch (ClassNotFoundException e) { }
+ catch (InstantiationException e) { }
+ catch (IllegalAccessException e) { }
+ catch (LinkageError e) { }
+ }
+ classNames = null;
+ }
+ }
+
+ private static final int START = 0;
+ private static final int IN_NAME = 1;
+ private static final int IN_COMMENT = 2;
+
+ private static Enumeration parseConfigFile(URL url) {
+ try {
+ InputStream in = url.openStream();
+ Reader r;
+ try {
+ r = new InputStreamReader(in, "UTF-8");
+ }
+ catch (UnsupportedEncodingException e) {
+ r = new InputStreamReader(in, "UTF8");
+ }
+ r = new BufferedReader(r);
+ Vector tokens = new Vector();
+ StringBuffer tokenBuf = new StringBuffer();
+ int state = START;
+ for (;;) {
+ int n = r.read();
+ if (n < 0)
+ break;
+ char c = (char)n;
+ switch (c) {
+ case '\r':
+ case '\n':
+ state = START;
+ break;
+ case ' ':
+ case '\t':
+ break;
+ case '#':
+ state = IN_COMMENT;
+ break;
+ default:
+ if (state != IN_COMMENT) {
+ state = IN_NAME;
+ tokenBuf.append(c);
+ }
+ break;
+ }
+ if (tokenBuf.length() != 0 && state != IN_NAME) {
+ tokens.addElement(tokenBuf.toString());
+ tokenBuf.setLength(0);
+ }
+ }
+ if (tokenBuf.length() != 0)
+ tokens.addElement(tokenBuf.toString());
+ return tokens.elements();
+ }
+ catch (IOException e) {
+ return null;
+ }
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype.helpers;
+
+import com.sun.xml.internal.org.relaxng.datatype.*;
+
+/**
+ * Dummy implementation of {@link DatatypeBuilder}.
+ *
+ * This implementation can be used for Datatypes which have no parameters.
+ * Any attempt to add parameters will be rejected.
+ *
+ * <p>
+ * Typical usage would be:
+ * <PRE>{@code
+ * class MyDatatypeLibrary implements DatatypeLibrary {
+ * ....
+ * DatatypeBuilder createDatatypeBuilder( String typeName ) {
+ * return new ParameterleessDatatypeBuilder(createDatatype(typeName));
+ * }
+ * ....
+ * }
+ * }</PRE>
+ *
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public final class ParameterlessDatatypeBuilder implements DatatypeBuilder {
+
+ /** This type object is returned for the derive method. */
+ private final Datatype baseType;
+
+ public ParameterlessDatatypeBuilder( Datatype baseType ) {
+ this.baseType = baseType;
+ }
+
+ public void addParameter( String name, String strValue, ValidationContext context )
+ throws DatatypeException {
+ throw new DatatypeException();
+ }
+
+ public Datatype createDatatype() throws DatatypeException {
+ return baseType;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/org/relaxng/datatype/helpers/StreamingValidatorImpl.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2005, 2015, Thai Open Source Software Center Ltd
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Thai Open Source Software Center Ltd nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.sun.xml.internal.org.relaxng.datatype.helpers;
+
+import com.sun.xml.internal.org.relaxng.datatype.*;
+
+/**
+ * Dummy implementation of {@link DatatypeStreamingValidator}.
+ *
+ * <p>
+ * This implementation can be used as a quick hack when the performance
+ * of streaming validation is not important. And this implementation
+ * also shows you how to implement the DatatypeStreamingValidator interface.
+ *
+ * <p>
+ * Typical usage would be:
+ * <PRE>{@code
+ * class MyDatatype implements Datatype {
+ * ....
+ * public DatatypeStreamingValidator createStreamingValidator( ValidationContext context ) {
+ * return new StreamingValidatorImpl(this,context);
+ * }
+ * ....
+ * }
+ * }</PRE>
+ *
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public final class StreamingValidatorImpl implements DatatypeStreamingValidator {
+
+ /** This buffer accumulates characters. */
+ private final StringBuffer buffer = new StringBuffer();
+
+ /** Datatype obejct that creates this streaming validator. */
+ private final Datatype baseType;
+
+ /** The current context. */
+ private final ValidationContext context;
+
+ public void addCharacters( char[] buf, int start, int len ) {
+ // append characters to the current buffer.
+ buffer.append(buf,start,len);
+ }
+
+ public boolean isValid() {
+ return baseType.isValid(buffer.toString(),context);
+ }
+
+ public void checkValid() throws DatatypeException {
+ baseType.checkValid(buffer.toString(),context);
+ }
+
+ public StreamingValidatorImpl( Datatype baseType, ValidationContext context ) {
+ this.baseType = baseType;
+ this.context = context;
+ }
+}
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/ast/util/CheckingSchemaBuilder.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/ast/util/CheckingSchemaBuilder.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -53,7 +53,7 @@
import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
import com.sun.xml.internal.rngom.parse.host.ParsedPatternHost;
import com.sun.xml.internal.rngom.parse.host.SchemaBuilderHost;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
import org.xml.sax.ErrorHandler;
/**
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/DataExceptPattern.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/DataExceptPattern.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -47,7 +47,7 @@
import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
import org.xml.sax.Locator;
public class DataExceptPattern extends DataPattern {
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/DataPattern.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/DataPattern.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -47,7 +47,7 @@
import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
public class DataPattern extends StringPattern {
private Datatype dt;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -75,13 +75,13 @@
import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
import com.sun.xml.internal.rngom.parse.Parseable;
import com.sun.xml.internal.rngom.util.Localizer;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.ValidationContext;
-import org.relaxng.datatype.helpers.DatatypeLibraryLoader;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.helpers.DatatypeLibraryLoader;
import org.xml.sax.ErrorHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaPatternBuilder.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/SchemaPatternBuilder.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -46,7 +46,7 @@
package com.sun.xml.internal.rngom.binary;
import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
import org.xml.sax.Locator;
public class SchemaPatternBuilder extends PatternBuilder {
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/ValuePattern.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/ValuePattern.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -47,7 +47,7 @@
import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
public class ValuePattern extends StringPattern {
Object obj;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/visitor/PatternVisitor.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/visitor/PatternVisitor.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -47,7 +47,7 @@
import com.sun.xml.internal.rngom.binary.Pattern;
import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
public interface PatternVisitor {
void visitEmpty();
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/visitor/PatternWalker.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/binary/visitor/PatternWalker.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -47,7 +47,7 @@
import com.sun.xml.internal.rngom.binary.Pattern;
import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
/**
* Walks the pattern tree.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/CachedDatatypeLibraryFactory.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/CachedDatatypeLibraryFactory.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -45,8 +45,8 @@
*/
package com.sun.xml.internal.rngom.dt;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
/**
*
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/CascadingDatatypeLibraryFactory.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/CascadingDatatypeLibraryFactory.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -45,8 +45,8 @@
*/
package com.sun.xml.internal.rngom.dt;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
/**
*
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/DoNothingDatatypeLibraryFactoryImpl.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/DoNothingDatatypeLibraryFactoryImpl.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -45,14 +45,14 @@
*/
package com.sun.xml.internal.rngom.dt;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.ValidationContext;
-import org.relaxng.datatype.DatatypeStreamingValidator;
-import org.relaxng.datatype.helpers.StreamingValidatorImpl;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeStreamingValidator;
+import com.sun.xml.internal.org.relaxng.datatype.helpers.StreamingValidatorImpl;
/**
* {@link DatatypeLibraryFactory} implementation
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeBuilder.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeBuilder.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -45,10 +45,10 @@
*/
package com.sun.xml.internal.rngom.dt.builtin;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
import com.sun.xml.internal.rngom.util.Localizer;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibrary.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibrary.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -45,11 +45,11 @@
*/
package com.sun.xml.internal.rngom.dt.builtin;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibraryFactory.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibraryFactory.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -45,8 +45,8 @@
*/
package com.sun.xml.internal.rngom.dt.builtin;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/CompatibilityDatatypeLibrary.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/dt/builtin/CompatibilityDatatypeLibrary.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -45,11 +45,11 @@
*/
package com.sun.xml.internal.rngom.dt.builtin;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
+import com.sun.xml.internal.org.relaxng.datatype.Datatype;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeBuilder;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeException;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibrary;
+import com.sun.xml.internal.org.relaxng.datatype.DatatypeLibraryFactory;
import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
class CompatibilityDatatypeLibrary implements DatatypeLibrary {
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/parse/Context.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/parse/Context.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -46,7 +46,7 @@
package com.sun.xml.internal.rngom.parse;
import java.util.Enumeration;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
/**
* Provides contextual information.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/parse/xml/DtdContext.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/rngom/parse/xml/DtdContext.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -47,7 +47,7 @@
import org.xml.sax.DTDHandler;
import org.xml.sax.SAXException;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
import java.util.Hashtable;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/ForeignAttributes.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/ForeignAttributes.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -27,7 +27,7 @@
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
/**
* Foreign attributes on schema elements.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/XmlString.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/XmlString.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -25,7 +25,7 @@
package com.sun.xml.internal.xsom;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
/**
* String with in-scope namespace binding information.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ForeignAttributesImpl.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/ForeignAttributesImpl.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -26,7 +26,7 @@
package com.sun.xml.internal.xsom.impl;
import com.sun.xml.internal.xsom.ForeignAttributes;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
import org.xml.sax.Locator;
import org.xml.sax.helpers.AttributesImpl;
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -36,7 +36,7 @@
import com.sun.xml.internal.xsom.impl.parser.state.Schema;
import com.sun.xml.internal.xsom.impl.util.Uri;
import com.sun.xml.internal.xsom.parser.AnnotationParser;
-import org.relaxng.datatype.ValidationContext;
+import com.sun.xml.internal.org.relaxng.datatype.ValidationContext;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/Datatype.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Datatype object.
- *
- * This object has the following functionality:
- *
- * <ol>
- * <li> functionality to identify a class of character sequences. This is
- * done through the isValid method.
- *
- * <li> functionality to produce a "value object" from a character sequence and
- * context information.
- *
- * <li> functionality to test the equality of two value objects.
- * </ol>
- *
- * This interface also defines the createStreamingValidator method,
- * which is intended to efficiently support the validation of
- * large character sequences.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface Datatype {
-
- /**
- * Checks if the specified 'literal' matches this Datatype
- * with respect to the current context.
- *
- * @param literal
- * the lexical representation to be checked.
- * @param context
- * If this datatype is context-dependent
- * (i.e. the {@link #isContextDependent} method returns true),
- * then the caller must provide a non-null valid context object.
- * Otherwise, the caller can pass null.
- *
- * @return
- * true if the 'literal' is a member of this Datatype;
- * false if it's not a member of this Datatype.
- */
- boolean isValid( String literal, ValidationContext context );
-
- /**
- * Similar to the isValid method but throws an exception with diagnosis
- * in case of errors.
- *
- * <p>
- * If the specified 'literal' is a valid lexical representation for this
- * datatype, then this method must return without throwing any exception.
- * If not, the callee must throw an exception (with diagnosis message,
- * if possible.)
- *
- * <p>
- * The application can use this method to provide detailed error message
- * to users. This method is kept separate from the isValid method to
- * achieve higher performance during normal validation.
- *
- * @exception DatatypeException
- * If the given literal is invalid, then this exception is thrown.
- * If the callee supports error diagnosis, then the exception should
- * contain a diagnosis message.
- */
- void checkValid( String literal, ValidationContext context )
- throws DatatypeException;
-
- /**
- * Creates an instance of a streaming validator for this type.
- *
- * <p>
- * By using streaming validators instead of the isValid method,
- * the caller can avoid keeping the entire string, which is
- * sometimes quite big, in memory.
- *
- * @param context
- * If this datatype is context-dependent
- * (i.e. the {@link #isContextDependent} method returns true),
- * then the caller must provide a non-null valid context object.
- * Otherwise, the caller can pass null.
- * The callee may keep a reference to this context object
- * only while the returned streaming validator is being used.
- */
- DatatypeStreamingValidator createStreamingValidator( ValidationContext context );
-
- /**
- * Converts lexcial value and the current context to the corresponding
- * value object.
- *
- * <p>
- * The caller cannot generally assume that the value object is
- * a meaningful Java object. For example, the caller cannot expect
- * this method to return <code>java.lang.Number</code> type for
- * the "integer" type of XML Schema Part 2.
- *
- * <p>
- * Also, the caller cannot assume that the equals method and
- * the hashCode method of the value object are consistent with
- * the semantics of the datatype. For that purpose, the sameValue
- * method and the valueHashCode method have to be used. Note that
- * this means you cannot use classes like
- * <code>java.util.Hashtable</code> to store the value objects.
- *
- * <p>
- * The returned value object should be used solely for the sameValue
- * and valueHashCode methods.
- *
- * @param context
- * If this datatype is context-dependent
- * (when the {@link #isContextDependent} method returns true),
- * then the caller must provide a non-null valid context object.
- * Otherwise, the caller can pass null.
- *
- * @return null
- * when the given lexical value is not a valid lexical
- * value for this type.
- */
- Object createValue( String literal, ValidationContext context );
-
- /**
- * Tests the equality of two value objects which were originally
- * created by the createValue method of this object.
- *
- * The behavior is undefined if objects not created by this type
- * are passed. It is the caller's responsibility to ensure that
- * value objects belong to this type.
- *
- * @return
- * true if two value objects are considered equal according to
- * the definition of this datatype; false if otherwise.
- */
- boolean sameValue( Object value1, Object value2 );
-
-
- /**
- * Computes the hash code for a value object,
- * which is consistent with the sameValue method.
- *
- * @return
- * hash code for the specified value object.
- */
- int valueHashCode( Object value );
-
-
-
-
- /**
- * Indicates that the datatype doesn't have ID/IDREF semantics.
- *
- * This value is one of the possible return values of the
- * {@link #getIdType} method.
- */
- public static final int ID_TYPE_NULL = 0;
-
- /**
- * Indicates that RELAX NG compatibility processors should
- * treat this datatype as having ID semantics.
- *
- * This value is one of the possible return values of the
- * {@link #getIdType} method.
- */
- public static final int ID_TYPE_ID = 1;
-
- /**
- * Indicates that RELAX NG compatibility processors should
- * treat this datatype as having IDREF semantics.
- *
- * This value is one of the possible return values of the
- * {@link #getIdType} method.
- */
- public static final int ID_TYPE_IDREF = 2;
-
- /**
- * Indicates that RELAX NG compatibility processors should
- * treat this datatype as having IDREFS semantics.
- *
- * This value is one of the possible return values of the
- * {@link #getIdType} method.
- */
- public static final int ID_TYPE_IDREFS = 3;
-
- /**
- * Checks if the ID/IDREF semantics is associated with this
- * datatype.
- *
- * <p>
- * This method is introduced to support the RELAX NG DTD
- * compatibility spec. (Of course it's always free to use
- * this method for other purposes.)
- *
- * <p>
- * If you are implementing a datatype library and have no idea about
- * the "RELAX NG DTD compatibility" thing, just return
- * <code>ID_TYPE_NULL</code> is fine.
- *
- * @return
- * If this datatype doesn't have any ID/IDREF semantics,
- * it returns {@link #ID_TYPE_NULL}. If it has such a semantics
- * (for example, XSD:ID, XSD:IDREF and comp:ID type), then
- * it returns {@link #ID_TYPE_ID}, {@link #ID_TYPE_IDREF} or
- * {@link #ID_TYPE_IDREFS}.
- */
- public int getIdType();
-
-
- /**
- * Checks if this datatype may need a context object for
- * the validation.
- *
- * <p>
- * The callee must return true even when the context
- * is not always necessary. (For example, the "QName" type
- * doesn't need a context object when validating unprefixed
- * string. But nonetheless QName must return true.)
- *
- * <p>
- * XSD's <code>string</code> and <code>short</code> types
- * are examples of context-independent datatypes.
- * Its <code>QName</code> and <code>ENTITY</code> types
- * are examples of context-dependent datatypes.
- *
- * <p>
- * When a datatype is context-independent, then
- * the {@link #isValid} method, the {@link #checkValid} method,
- * the {@link #createStreamingValidator} method and
- * the {@link #createValue} method can be called without
- * providing a context object.
- *
- * @return
- * <b>true</b> if this datatype is context-dependent
- * (it needs a context object sometimes);
- *
- * <b>false</b> if this datatype is context-<b>in</b>dependent
- * (it never needs a context object).
- */
- public boolean isContextDependent();
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeBuilder.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Creates a user-defined type by adding parameters to
- * the pre-defined type.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeBuilder {
-
- /**
- * Adds a new parameter.
- *
- * @param name
- * The name of the parameter to be added.
- * @param strValue
- * The raw value of the parameter. Caller may not normalize
- * this value because any white space is potentially significant.
- * @param context
- * The context information which can be used by the callee to
- * acquire additional information. This context object is
- * valid only during this method call. The callee may not
- * keep a reference to this object.
- * @exception DatatypeException
- * When the given parameter is inappropriate for some reason.
- * The callee is responsible to recover from this error.
- * That is, the object should behave as if no such error
- * was occured.
- */
- void addParameter( String name, String strValue, ValidationContext context )
- throws DatatypeException;
-
- /**
- * Derives a new Datatype from a Datatype by parameters that
- * were already set through the addParameter method.
- *
- * @exception DatatypeException
- * DatatypeException must be thrown if the derivation is
- * somehow invalid. For example, a required parameter is missing,
- * etc. The exception should contain a diagnosis message
- * if possible.
- */
- Datatype createDatatype() throws DatatypeException;
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeException.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Signals Datatype related exceptions.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class DatatypeException extends Exception {
-
- public DatatypeException( int index, String msg ) {
- super(msg);
- this.index = index;
- }
- public DatatypeException( String msg ) {
- this(UNKNOWN,msg);
- }
- /**
- * A constructor for those datatype libraries which don't support any
- * diagnostic information at all.
- */
- public DatatypeException() {
- this(UNKNOWN,null);
- }
-
-
- private final int index;
-
- public static final int UNKNOWN = -1;
-
- /**
- * Gets the index of the content where the error occured.
- * UNKNOWN can be returned to indicate that no index information
- * is available.
- */
- public int getIndex() {
- return index;
- }
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeLibrary.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * A Datatype library
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeLibrary {
-
- /**
- * Creates a new instance of DatatypeBuilder.
- *
- * The callee should throw a DatatypeException in case of an error.
- *
- * @param baseTypeLocalName
- * The local name of the base type.
- *
- * @return
- * A non-null valid datatype object.
- */
- DatatypeBuilder createDatatypeBuilder( String baseTypeLocalName )
- throws DatatypeException;
-
- /**
- * Gets or creates a pre-defined type.
- *
- * This is just a short-cut of
- * <code>createDatatypeBuilder(typeLocalName).createDatatype();</code>
- *
- * The callee should throw a DatatypeException in case of an error.
- *
- * @return
- * A non-null valid datatype object.
- */
- Datatype createDatatype( String typeLocalName ) throws DatatypeException;
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeLibraryFactory.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Factory class for the DatatypeLibrary class.
- *
- * <p>
- * The datatype library should provide the implementation of
- * this interface if it wants to be found by the schema processors.
- * The implementor also have to place a file in your jar file.
- * See the reference datatype library implementation for detail.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeLibraryFactory
-{
- /**
- * Creates a new instance of a DatatypeLibrary that supports
- * the specified namespace URI.
- *
- * @return
- * <code>null</code> if the specified namespace URI is not
- * supported.
- */
- DatatypeLibrary createDatatypeLibrary( String namespaceURI );
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/DatatypeStreamingValidator.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Datatype streaming validator.
- *
- * <p>
- * The streaming validator is an optional feature that is useful for
- * certain Datatypes. It allows the caller to incrementally provide
- * the literal.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeStreamingValidator {
-
- /**
- * Passes an additional fragment of the literal.
- *
- * <p>
- * The application can call this method several times, then call
- * the isValid method (or the checkValid method) to check the validity
- * of the accumulated characters.
- */
- void addCharacters( char[] buf, int start, int len );
-
- /**
- * Tells if the accumulated literal is valid with respect to
- * the underlying Datatype.
- *
- * @return
- * True if it is valid. False if otherwise.
- */
- boolean isValid();
-
- /**
- * Similar to the isValid method, but this method throws
- * Exception (with possibly diagnostic information), instead of
- * returning false.
- *
- * @exception DatatypeException
- * If the callee supports the diagnosis and the accumulated
- * literal is invalid, then this exception that possibly
- * contains diagnosis information is thrown.
- */
- void checkValid() throws DatatypeException;
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/ValidationContext.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * An interface that must be implemented by caller to
- * provide context information that is necessary to
- * perform validation of some Datatypes.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface ValidationContext {
-
- /**
- * Resolves a namespace prefix to the corresponding namespace URI.
- *
- * This method is used for validating the QName type, for example.
- *
- * <p>
- * If the prefix is "" (empty string), it indicates
- * an unprefixed value. The callee
- * should resolve it as for an unprefixed
- * element, rather than for an unprefixed attribute.
- *
- * <p>
- * If the prefix is "xml", then the callee must resolve
- * this prefix into "http://www.w3.org/XML/1998/namespace",
- * as defined in the XML Namespaces Recommendation.
- *
- * @return
- * namespace URI of this prefix.
- * If the specified prefix is not declared,
- * the implementation must return null.
- */
- String resolveNamespacePrefix( String prefix );
-
- /**
- * Returns the base URI of the context. The null string may be returned
- * if no base URI is known.
- */
- String getBaseUri();
-
- /**
- * Checks if an unparsed entity is declared with the
- * specified name.
- *
- * @return
- * true
- * if the DTD has an unparsed entity declaration for
- * the specified name.
- * false
- * otherwise.
- */
- boolean isUnparsedEntity( String entityName );
-
- /**
- * Checks if a notation is declared with the
- * specified name.
- *
- * @return
- * true
- * if the DTD has a notation declaration for the specified name.
- * false
- * otherwise.
- */
- boolean isNotation( String notationName );
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.DatatypeLibrary;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-import java.util.Vector;
-import java.io.Reader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-
-/**
- * Discovers the datatype library implementation from the classpath.
- *
- * <p>
- * The call of the createDatatypeLibrary method finds an implementation
- * from a given datatype library URI at run-time.
- */
-public class DatatypeLibraryLoader implements DatatypeLibraryFactory {
- private final Service service = new Service(DatatypeLibraryFactory.class);
-
- public DatatypeLibrary createDatatypeLibrary(String uri) {
- for (Enumeration e = service.getProviders();
- e.hasMoreElements();) {
- DatatypeLibraryFactory factory
- = (DatatypeLibraryFactory)e.nextElement();
- DatatypeLibrary library = factory.createDatatypeLibrary(uri);
- if (library != null)
- return library;
- }
- return null;
- }
-
- private static class Service {
- private final Class serviceClass;
- private final Enumeration configFiles;
- private Enumeration classNames = null;
- private final Vector providers = new Vector();
- private Loader loader;
-
- private class ProviderEnumeration implements Enumeration {
- private int nextIndex = 0;
-
- public boolean hasMoreElements() {
- return nextIndex < providers.size() || moreProviders();
- }
-
- public Object nextElement() {
- try {
- return providers.elementAt(nextIndex++);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- throw new NoSuchElementException();
- }
- }
- }
-
- private static class Singleton implements Enumeration {
- private Object obj;
- private Singleton(Object obj) {
- this.obj = obj;
- }
-
- public boolean hasMoreElements() {
- return obj != null;
- }
-
- public Object nextElement() {
- if (obj == null)
- throw new NoSuchElementException();
- Object tem = obj;
- obj = null;
- return tem;
- }
- }
-
- // JDK 1.1
- private static class Loader {
- Enumeration getResources(String resName) {
- ClassLoader cl = Loader.class.getClassLoader();
- URL url;
- if (cl == null)
- url = ClassLoader.getSystemResource(resName);
- else
- url = cl.getResource(resName);
- return new Singleton(url);
- }
-
- Class loadClass(String name) throws ClassNotFoundException {
- return Class.forName(name);
- }
- }
-
- // JDK 1.2+
- private static class Loader2 extends Loader {
- private ClassLoader cl;
-
- Loader2() {
- cl = Loader2.class.getClassLoader();
- // If the thread context class loader has the class loader
- // of this class as an ancestor, use the thread context class
- // loader. Otherwise, the thread context class loader
- // probably hasn't been set up properly, so don't use it.
- ClassLoader clt = Thread.currentThread().getContextClassLoader();
- for (ClassLoader tem = clt; tem != null; tem = tem.getParent())
- if (tem == cl) {
- cl = clt;
- break;
- }
- }
-
- Enumeration getResources(String resName) {
- try {
- return cl.getResources(resName);
- }
- catch (IOException e) {
- return new Singleton(null);
- }
- }
-
- Class loadClass(String name) throws ClassNotFoundException {
- return Class.forName(name, true, cl);
- }
- }
-
- public Service(Class cls) {
- try {
- loader = new Loader2();
- }
- catch (NoSuchMethodError e) {
- loader = new Loader();
- }
- serviceClass = cls;
- String resName = "META-INF/services/" + serviceClass.getName();
- configFiles = loader.getResources(resName);
- }
-
- public Enumeration getProviders() {
- return new ProviderEnumeration();
- }
-
- synchronized private boolean moreProviders() {
- for (;;) {
- while (classNames == null) {
- if (!configFiles.hasMoreElements())
- return false;
- classNames = parseConfigFile((URL)configFiles.nextElement());
- }
- while (classNames.hasMoreElements()) {
- String className = (String)classNames.nextElement();
- try {
- Class cls = loader.loadClass(className);
- Object obj = cls.newInstance();
- if (serviceClass.isInstance(obj)) {
- providers.addElement(obj);
- return true;
- }
- }
- catch (ClassNotFoundException e) { }
- catch (InstantiationException e) { }
- catch (IllegalAccessException e) { }
- catch (LinkageError e) { }
- }
- classNames = null;
- }
- }
-
- private static final int START = 0;
- private static final int IN_NAME = 1;
- private static final int IN_COMMENT = 2;
-
- private static Enumeration parseConfigFile(URL url) {
- try {
- InputStream in = url.openStream();
- Reader r;
- try {
- r = new InputStreamReader(in, "UTF-8");
- }
- catch (UnsupportedEncodingException e) {
- r = new InputStreamReader(in, "UTF8");
- }
- r = new BufferedReader(r);
- Vector tokens = new Vector();
- StringBuffer tokenBuf = new StringBuffer();
- int state = START;
- for (;;) {
- int n = r.read();
- if (n < 0)
- break;
- char c = (char)n;
- switch (c) {
- case '\r':
- case '\n':
- state = START;
- break;
- case ' ':
- case '\t':
- break;
- case '#':
- state = IN_COMMENT;
- break;
- default:
- if (state != IN_COMMENT) {
- state = IN_NAME;
- tokenBuf.append(c);
- }
- break;
- }
- if (tokenBuf.length() != 0 && state != IN_NAME) {
- tokens.addElement(tokenBuf.toString());
- tokenBuf.setLength(0);
- }
- }
- if (tokenBuf.length() != 0)
- tokens.addElement(tokenBuf.toString());
- return tokens.elements();
- }
- catch (IOException e) {
- return null;
- }
- }
- }
-
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.*;
-
-/**
- * Dummy implementation of {@link DatatypeBuilder}.
- *
- * This implementation can be used for Datatypes which have no parameters.
- * Any attempt to add parameters will be rejected.
- *
- * <p>
- * Typical usage would be:
- * <PRE>{@code
- * class MyDatatypeLibrary implements DatatypeLibrary {
- * ....
- * DatatypeBuilder createDatatypeBuilder( String typeName ) {
- * return new ParameterleessDatatypeBuilder(createDatatype(typeName));
- * }
- * ....
- * }
- * }</PRE>
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class ParameterlessDatatypeBuilder implements DatatypeBuilder {
-
- /** This type object is returned for the derive method. */
- private final Datatype baseType;
-
- public ParameterlessDatatypeBuilder( Datatype baseType ) {
- this.baseType = baseType;
- }
-
- public void addParameter( String name, String strValue, ValidationContext context )
- throws DatatypeException {
- throw new DatatypeException();
- }
-
- public Datatype createDatatype() throws DatatypeException {
- return baseType;
- }
-}
--- a/jaxws/src/jdk.xml.bind/share/classes/org/relaxng/datatype/helpers/StreamingValidatorImpl.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.*;
-
-/**
- * Dummy implementation of {@link DatatypeStreamingValidator}.
- *
- * <p>
- * This implementation can be used as a quick hack when the performance
- * of streaming validation is not important. And this implementation
- * also shows you how to implement the DatatypeStreamingValidator interface.
- *
- * <p>
- * Typical usage would be:
- * <PRE>{@code
- * class MyDatatype implements Datatype {
- * ....
- * public DatatypeStreamingValidator createStreamingValidator( ValidationContext context ) {
- * return new StreamingValidatorImpl(this,context);
- * }
- * ....
- * }
- * }</PRE>
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class StreamingValidatorImpl implements DatatypeStreamingValidator {
-
- /** This buffer accumulates characters. */
- private final StringBuffer buffer = new StringBuffer();
-
- /** Datatype obejct that creates this streaming validator. */
- private final Datatype baseType;
-
- /** The current context. */
- private final ValidationContext context;
-
- public void addCharacters( char[] buf, int start, int len ) {
- // append characters to the current buffer.
- buffer.append(buf,start,len);
- }
-
- public boolean isValid() {
- return baseType.isValid(buffer.toString(),context);
- }
-
- public void checkValid() throws DatatypeException {
- baseType.checkValid(buffer.toString(),context);
- }
-
- public StreamingValidatorImpl( Datatype baseType, ValidationContext context ) {
- this.baseType = baseType;
- this.context = context;
- }
-}
--- a/jdk/.hgtags Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/.hgtags Mon Oct 12 14:41:36 2015 -0700
@@ -327,3 +327,4 @@
b10b64263b563e21f055c881444f625ec618b826 jdk9-b82
d11f25ce3c545823f53bb978d454a4d2901abac3 jdk9-b83
757ef7f6d0042934edea3e0bf616fad2c1a22789 jdk9-b84
+fe40b31c0e526d357cf5b62044fea006e43b53a5 jdk9-b85
--- a/jdk/make/src/classes/build/tools/module/ModuleArchive.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/make/src/classes/build/tools/module/ModuleArchive.java Mon Oct 12 14:41:36 2015 -0700
@@ -105,6 +105,7 @@
entries.addAll(stream
.filter(p -> !Files.isDirectory(p)
&& !classes.relativize(p).toString().startsWith("_the.")
+ && !classes.relativize(p).toString().endsWith(".bc")
&& !classes.relativize(p).toString().equals("javac_state"))
.sorted()
.map(p -> toEntry(p, classes, EntryType.CLASS_OR_RESOURCE))
--- a/jdk/src/java.base/share/classes/java/lang/ArrayIndexOutOfBoundsException.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/ArrayIndexOutOfBoundsException.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2015, 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
@@ -26,42 +26,58 @@
package java.lang;
/**
- * Thrown to indicate that an array has been accessed with an
- * illegal index. The index is either negative or greater than or
- * equal to the size of the array.
+ * Thrown to indicate that an array has been accessed with an illegal index. The
+ * index is either negative or greater than or equal to the size of the array.
*
- * @author unascribed
- * @since 1.0
+ * @since 1.0
*/
-public
-class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {
+public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException {
private static final long serialVersionUID = -5116101128118950844L;
/**
- * Constructs an <code>ArrayIndexOutOfBoundsException</code> with no
- * detail message.
+ * Constructs an {@code ArrayIndexOutOfBoundsException} with no detail
+ * message.
*/
public ArrayIndexOutOfBoundsException() {
super();
}
/**
- * Constructs a new <code>ArrayIndexOutOfBoundsException</code>
- * class with an argument indicating the illegal index.
+ * Constructs an {@code ArrayIndexOutOfBoundsException} class with the
+ * specified detail message.
*
- * @param index the illegal index.
+ * @param s the detail message.
+ */
+ public ArrayIndexOutOfBoundsException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a new {@code ArrayIndexOutOfBoundsException} class with an
+ * argument indicating the illegal index.
+ *
+ * <p>The index is included in this exception's detail message. The
+ * exact presentation format of the detail message is unspecified.
+ *
+ * @param index the illegal index.
*/
public ArrayIndexOutOfBoundsException(int index) {
super("Array index out of range: " + index);
}
/**
- * Constructs an <code>ArrayIndexOutOfBoundsException</code> class
- * with the specified detail message.
+ * Constructs a new {@code ArrayIndexOutOfBoundsException} class with
+ * arguments indicating two out of bound values.
+ *
+ * <p>The out of bound values are included in this exception's detail
+ * message. The exact presentation format of the detail message is
+ * unspecified.
*
- * @param s the detail message.
+ * @param a the first out of bound value.
+ * @param b the second out of bound value.
+ * @since 9
*/
- public ArrayIndexOutOfBoundsException(String s) {
- super(s);
+ public ArrayIndexOutOfBoundsException(int a, int b) {
+ super("Array indexed access out of bounds: " + a + ", " + b);
}
}
--- a/jdk/src/java.base/share/classes/java/lang/FdLibm.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/FdLibm.java Mon Oct 12 14:41:36 2015 -0700
@@ -182,7 +182,7 @@
}
int k = 0;
- if (a > 0x1.0p500) { // a > 2**500
+ if (a > 0x1.00000_ffff_ffffp500) { // a > ~2**500
// scale a and b by 2**-600
ha -= 0x25800000;
hb -= 0x25800000;
--- a/jdk/src/java.base/share/classes/java/lang/IndexOutOfBoundsException.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/IndexOutOfBoundsException.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2015, 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
@@ -31,28 +31,57 @@
* <p>
* Applications can subclass this class to indicate similar exceptions.
*
- * @author Frank Yellin
- * @since 1.0
+ * @author Frank Yellin
+ * @since 1.0
*/
-public
-class IndexOutOfBoundsException extends RuntimeException {
+public class IndexOutOfBoundsException extends RuntimeException {
private static final long serialVersionUID = 234122996006267687L;
/**
- * Constructs an <code>IndexOutOfBoundsException</code> with no
- * detail message.
+ * Constructs an {@code IndexOutOfBoundsException} with no detail message.
*/
public IndexOutOfBoundsException() {
super();
}
/**
- * Constructs an <code>IndexOutOfBoundsException</code> with the
- * specified detail message.
+ * Constructs an {@code IndexOutOfBoundsException} with the specified detail
+ * message.
*
- * @param s the detail message.
+ * @param s the detail message
*/
public IndexOutOfBoundsException(String s) {
super(s);
}
+
+ /**
+ * Constructs a new {@code IndexOutOfBoundsException} class with an
+ * argument indicating the illegal index.
+ *
+ * <p>The index is included in this exception's detail message. The
+ * exact presentation format of the detail message is unspecified.
+ *
+ * @param index the illegal index.
+ * @since 9
+ */
+ public IndexOutOfBoundsException(int index) {
+ super("Index out of range: " + index);
+ }
+
+ /**
+ * Constructs an {@code IndexOutOfBoundsException} with arguments indicating
+ * two out of bound values.
+ *
+ * <p>The out of bound values are included in this exception's detail
+ * message. The exact presentation format of the detail message is
+ * unspecified.
+ *
+ * @param a the first out of bound value
+ * @param b the second out of bound value
+ * @since 9
+ */
+ public IndexOutOfBoundsException(int a, int b) {
+ super("Indexed access out of bounds: " + a + ", " + b);
+ }
+
}
--- a/jdk/src/java.base/share/classes/java/lang/StringIndexOutOfBoundsException.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/StringIndexOutOfBoundsException.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2015, 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
@@ -26,44 +26,61 @@
package java.lang;
/**
- * Thrown by {@code String} methods to indicate that an index
- * is either negative or greater than the size of the string. For
- * some methods such as the charAt method, this exception also is
- * thrown when the index is equal to the size of the string.
+ * Thrown by {@code String} methods to indicate that an index is either negative
+ * or greater than the size of the string. For some methods such as the
+ * {@link String#charAt charAt} method, this exception also is thrown when the
+ * index is equal to the size of the string.
*
- * @author unascribed
- * @see java.lang.String#charAt(int)
- * @since 1.0
+ * @see java.lang.String#charAt(int)
+ * @since 1.0
*/
-public
-class StringIndexOutOfBoundsException extends IndexOutOfBoundsException {
+public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException {
private static final long serialVersionUID = -6762910422159637258L;
/**
- * Constructs a {@code StringIndexOutOfBoundsException} with no
- * detail message.
+ * Constructs a {@code StringIndexOutOfBoundsException} with no detail
+ * message.
*/
public StringIndexOutOfBoundsException() {
super();
}
/**
- * Constructs a {@code StringIndexOutOfBoundsException} with
- * the specified detail message.
+ * Constructs a {@code StringIndexOutOfBoundsException} with the specified
+ * detail message.
*
- * @param s the detail message.
+ * @param s the detail message.
*/
public StringIndexOutOfBoundsException(String s) {
super(s);
}
/**
- * Constructs a new {@code StringIndexOutOfBoundsException}
- * class with an argument indicating the illegal index.
+ * Constructs a new {@code StringIndexOutOfBoundsException} class with an
+ * argument indicating the illegal index.
*
- * @param index the illegal index.
+ * <p>The index is included in this exception's detail message. The
+ * exact presentation format of the detail message is unspecified.
+ *
+ * @param index the illegal index.
*/
public StringIndexOutOfBoundsException(int index) {
super("String index out of range: " + index);
}
+
+ /**
+ * Constructs a new {@code StringIndexOutOfBoundsException} class with
+ * arguments indicating two out of bound values.
+ *
+ * <p>The out of bound values are included in this exception's detail
+ * message. The exact presentation format of the detail message is
+ * unspecified.
+ *
+ * @param a the first out of bound value.
+ * @param b the second out of bound value.
+ * @since 9
+ */
+ public StringIndexOutOfBoundsException(int a, int b) {
+ super("String indexed access out of bounds: " + a + ", " + b);
+ }
}
--- a/jdk/src/java.base/share/classes/java/net/URLStreamHandlerFactory.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/net/URLStreamHandlerFactory.java Mon Oct 12 14:41:36 2015 -0700
@@ -28,9 +28,9 @@
/**
* This interface defines a factory for {@code URL} stream
* protocol handlers.
- * <p>
- * It is used by the {@code URL} class to create a
- * {@code URLStreamHandler} for a specific protocol.
+ *
+ * <p> A URL stream handler factory is used as specified in the
+ * {@linkplain java.net.URL#URL(String,String,int,String) URL constructor}.
*
* @author Arthur van Hoff
* @see java.net.URL
--- a/jdk/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java Mon Oct 12 14:41:36 2015 -0700
@@ -41,6 +41,9 @@
* fully-qualified concrete URL stream handler provider class names, one per
* line.
*
+ * <p> URL stream handler providers are located at runtime, as specified in the
+ * {@linkplain java.net.URL#URL(String,String,int,String) URL constructor}.
+ *
* @since 1.9
*/
public abstract class URLStreamHandlerProvider
--- a/jdk/src/java.base/share/classes/java/security/AuthProvider.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/AuthProvider.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -79,8 +79,10 @@
* this provider to obtain authentication information
* from the caller, which may be {@code null}
*
- * @exception LoginException if the login operation fails
- * @exception SecurityException if the caller does not pass a
+ * @throws IllegalStateException if the provider requires configuration
+ * and {@link configure} has not been called
+ * @throws LoginException if the login operation fails
+ * @throws SecurityException if the caller does not pass a
* security check for
* {@code SecurityPermission("authProvider.name")},
* where {@code name} is the value returned by
@@ -92,8 +94,10 @@
/**
* Log out from this provider.
*
- * @exception LoginException if the logout operation fails
- * @exception SecurityException if the caller does not pass a
+ * @throws IllegalStateException if the provider requires configuration
+ * and {@link configure} has not been called
+ * @throws LoginException if the logout operation fails
+ * @throws SecurityException if the caller does not pass a
* security check for
* {@code SecurityPermission("authProvider.name")},
* where {@code name} is the value returned by
@@ -118,7 +122,9 @@
* @param handler a {@code CallbackHandler} for obtaining
* authentication information, which may be {@code null}
*
- * @exception SecurityException if the caller does not pass a
+ * @throws IllegalStateException if the provider requires configuration
+ * and {@link configure} has not been called
+ * @throws SecurityException if the caller does not pass a
* security check for
* {@code SecurityPermission("authProvider.name")},
* where {@code name} is the value returned by
--- a/jdk/src/java.base/share/classes/java/security/Provider.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/Provider.java Mon Oct 12 14:41:36 2015 -0700
@@ -187,13 +187,30 @@
* is invalid.
* @return a provider configured with the supplied configuration argument.
*
- * @since 1.9
+ * @since 9
*/
public Provider configure(String configArg) {
throw new UnsupportedOperationException("configure is not supported");
}
/**
+ * Check if this provider instance has been configured.
+ *
+ * @implSpec
+ * The default implementation returns true.
+ * Subclasses should override this method if the provider instance requires
+ * an explicit {@code configure} call after being constructed.
+ *
+ * @return true if no further configuration is needed, false otherwise.
+ *
+ * @since 9
+ */
+ public boolean isConfigured() {
+ return true;
+ }
+
+
+ /**
* Returns the name of this provider.
*
* @return the name of this provider.
--- a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java Mon Oct 12 14:41:36 2015 -0700
@@ -53,6 +53,17 @@
* </tr>
*
* <tr>
+ * <td>authProvider.{provider name}</td>
+ * <td>Allow the named provider to be an AuthProvider for login and
+ * logout operations. </td>
+ * <td>This allows the named provider to perform login and logout
+ * operations. The named provider must extend {@code AuthProvider}
+ * and care must be taken to grant to a trusted provider since
+ * login operations involve sensitive authentication information
+ * such as PINs and passwords. </td>
+ * </tr>
+ *
+ * <tr>
* <td>createAccessControlContext</td>
* <td>Creation of an AccessControlContext</td>
* <td>This allows someone to instantiate an AccessControlContext
--- a/jdk/src/java.base/share/classes/java/util/Currency.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/Currency.java Mon Oct 12 14:41:36 2015 -0700
@@ -371,8 +371,8 @@
* instance is needed
* @return the <code>Currency</code> instance for the country of the given
* locale, or {@code null}
- * @exception NullPointerException if <code>locale</code> or its country
- * code is {@code null}
+ * @exception NullPointerException if <code>locale</code>
+ * is {@code null}
* @exception IllegalArgumentException if the country of the given {@code locale}
* is not a supported ISO 3166 country code.
*/
--- a/jdk/src/java.base/share/classes/java/util/Objects.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/Objects.java Mon Oct 12 14:41:36 2015 -0700
@@ -25,13 +25,29 @@
package java.util;
+import java.util.function.BiFunction;
import java.util.function.Supplier;
/**
* This class consists of {@code static} utility methods for operating
- * on objects. These utilities include {@code null}-safe or {@code
- * null}-tolerant methods for computing the hash code of an object,
- * returning a string for an object, and comparing two objects.
+ * on objects, or checking certain conditions before operation. These utilities
+ * include {@code null}-safe or {@code null}-tolerant methods for computing the
+ * hash code of an object, returning a string for an object, comparing two
+ * objects, and checking if indexes or sub-range values are out of bounds.
+ *
+ * @apiNote
+ * Static methods such as {@link Objects#checkIndex},
+ * {@link Objects#checkFromToIndex}, and {@link Objects#checkFromIndexSize} are
+ * provided for the convenience of checking if values corresponding to indexes
+ * and sub-ranges are out of bounds.
+ * Variations of these static methods support customization of the runtime
+ * exception, and corresponding exception detail message, that is thrown when
+ * values are out of bounds. Such methods accept a functional interface
+ * argument, instances of {@code BiFunction}, that maps out of bound values to a
+ * runtime exception. Care should be taken when using such methods in
+ * combination with an argument that is a lambda expression, method reference or
+ * class that capture values. In such cases the cost of capture, related to
+ * functional interface allocation, may exceed the cost of checking bounds.
*
* @since 1.7
*/
@@ -290,4 +306,230 @@
throw new NullPointerException(messageSupplier.get());
return obj;
}
+
+ /**
+ * Maps out of bounds values to a runtime exception.
+ *
+ * @param a the first out of bound value
+ * @param b the second out of bound value
+ * @param oobe the exception mapping function that when applied with out of
+ * bounds arguments returns a runtime exception. If {@code null}
+ * then, it's as if an exception mapping function was supplied that
+ * returns {@link IndexOutOfBoundsException} for any given arguments.
+ * @return the runtime exception
+ */
+ private static RuntimeException outOfBounds(
+ int a, int b, BiFunction<Integer, Integer, ? extends RuntimeException> oobe) {
+ return oobe == null
+ ? new IndexOutOfBoundsException(a, b)
+ : oobe.apply(a, b);
+ }
+
+ /**
+ * Checks if the {@code index} is within the bounds of the range from
+ * {@code 0} (inclusive) to {@code length} (exclusive).
+ *
+ * <p>The {@code index} is defined to be out of bounds if any of the
+ * following inequalities is true:
+ * <ul>
+ * <li>{@code index < 0}</li>
+ * <li>{@code index >= length}</li>
+ * <li>{@code length < 0}, which is implied from the former inequalities</li>
+ * </ul>
+ *
+ * @param index the index
+ * @param length the upper-bound (exclusive) of the range
+ * @return {@code index} if it is within bounds of the range
+ * @throws IndexOutOfBoundsException if the {@code index} is out of bounds
+ * @since 9
+ */
+ public static
+ int checkIndex(int index, int length) throws IndexOutOfBoundsException {
+ return checkIndex(index, length, null);
+ }
+
+ /**
+ * Checks if the {@code index} is within the bounds of the range from
+ * {@code 0} (inclusive) to {@code length} (exclusive).
+ *
+ * <p>The {@code index} is defined to be out of bounds if any of the
+ * following inequalities is true:
+ * <ul>
+ * <li>{@code index < 0}</li>
+ * <li>{@code index >= length}</li>
+ * <li>{@code length < 0}, which is implied from the former inequalities</li>
+ * </ul>
+ *
+ * <p>If the {@code index} is out of bounds, then a runtime exception is
+ * thrown that is the result of applying the arguments {@code index} and
+ * {@code length} to the given exception mapping function.
+ *
+ * @param <T> the type of runtime exception to throw if the arguments are
+ * out of bounds
+ * @param index the index
+ * @param length the upper-bound (exclusive) of the range
+ * @param oobe the exception mapping function that when applied with out
+ * of bounds arguments returns a runtime exception. If {@code null}
+ * then, it's as if an exception mapping function was supplied that
+ * returns {@link IndexOutOfBoundsException} for any given arguments.
+ * @return {@code index} if it is within bounds of the range
+ * @throws T if the {@code index} is out of bounds, then a runtime exception
+ * is thrown that is the result of applying the out of bounds
+ * arguments to the exception mapping function.
+ * @throws IndexOutOfBoundsException if the {@code index} is out of bounds
+ * and the exception mapping function is {@code null}
+ * @since 9
+ */
+ /*
+ @HotSpotIntrinsicCandidate
+ This method will be made intrinsic in C2 to guide HotSpot to perform
+ unsigned comparisons of the index and length when it is known the length is
+ a non-negative value (such as that of an array length or from the upper
+ bound of a loop)
+ */
+ public static <T extends RuntimeException>
+ int checkIndex(int index, int length,
+ BiFunction<Integer, Integer, T> oobe) throws T, IndexOutOfBoundsException {
+ if (index < 0 || index >= length)
+ throw outOfBounds(index, length, oobe);
+ return index;
+ }
+
+ /**
+ * Checks if the sub-range from {@code fromIndex} (inclusive) to
+ * {@code toIndex} (exclusive) is within the bounds of range from {@code 0}
+ * (inclusive) to {@code length} (exclusive).
+ *
+ * <p>The sub-range is defined to be out of bounds if any of the following
+ * inequalities is true:
+ * <ul>
+ * <li>{@code fromIndex < 0}</li>
+ * <li>{@code fromIndex > toIndex}</li>
+ * <li>{@code toIndex > length}</li>
+ * <li>{@code length < 0}, which is implied from the former inequalities</li>
+ * </ul>
+ *
+ * @param fromIndex the lower-bound (inclusive) of the sub-range
+ * @param toIndex the upper-bound (exclusive) of the sub-range
+ * @param length the upper-bound (exclusive) the range
+ * @return {@code fromIndex} if the sub-range within bounds of the range
+ * @throws IndexOutOfBoundsException if the sub-range is out of bounds
+ * @since 9
+ */
+ public static
+ int checkFromToIndex(int fromIndex, int toIndex, int length) throws IndexOutOfBoundsException {
+ return checkFromToIndex(fromIndex, toIndex, length, null);
+ }
+
+ /**
+ * Checks if the sub-range from {@code fromIndex} (inclusive) to
+ * {@code toIndex} (exclusive) is within the bounds of range from {@code 0}
+ * (inclusive) to {@code length} (exclusive).
+ *
+ * <p>The sub-range is defined to be out of bounds if any of the following
+ * inequalities is true:
+ * <ul>
+ * <li>{@code fromIndex < 0}</li>
+ * <li>{@code fromIndex > toIndex}</li>
+ * <li>{@code toIndex > length}</li>
+ * <li>{@code length < 0}, which is implied from the former inequalities</li>
+ * </ul>
+ *
+ * <p>If the sub-range is out of bounds, then a runtime exception is thrown
+ * that is the result of applying the arguments {@code fromIndex} and
+ * {@code toIndex} to the given exception mapping function.
+ *
+ * @param <T> the type of runtime exception to throw if the arguments are
+ * out of bounds
+ * @param fromIndex the lower-bound (inclusive) of the sub-range
+ * @param toIndex the upper-bound (exclusive) of the sub-range
+ * @param length the upper-bound (exclusive) the range
+ * @param oobe the exception mapping function that when applied with out
+ * of bounds arguments returns a runtime exception. If {@code null}
+ * then, it's as if an exception mapping function was supplied that
+ * returns {@link IndexOutOfBoundsException} for any given arguments.
+ * @return {@code fromIndex} if the sub-range within bounds of the range
+ * @throws T if the sub-range is out of bounds, then a runtime exception is
+ * thrown that is the result of applying the out of bounds arguments
+ * to the exception mapping function.
+ * @throws IndexOutOfBoundsException if the sub-range is out of bounds and
+ * the exception mapping function is {@code null}
+ * @since 9
+ */
+ public static <T extends RuntimeException>
+ int checkFromToIndex(int fromIndex, int toIndex, int length,
+ BiFunction<Integer, Integer, T> oobe) throws T, IndexOutOfBoundsException {
+ if (fromIndex < 0 || fromIndex > toIndex || toIndex > length)
+ throw outOfBounds(fromIndex, toIndex, oobe);
+ return fromIndex;
+ }
+
+ /**
+ * Checks if the sub-range from {@code fromIndex} (inclusive) to
+ * {@code fromIndex + size} (exclusive) is within the bounds of range from
+ * {@code 0} (inclusive) to {@code length} (exclusive).
+ *
+ * <p>The sub-range is defined to be out of bounds if any of the following
+ * inequalities is true:
+ * <ul>
+ * <li>{@code fromIndex < 0}</li>
+ * <li>{@code size < 0}</li>
+ * <li>{@code fromIndex + size > length}, taking into account integer overflow</li>
+ * <li>{@code length < 0}, which is implied from the former inequalities</li>
+ * </ul>
+ *
+ * @param fromIndex the lower-bound (inclusive) of the sub-interval
+ * @param size the size of the sub-range
+ * @param length the upper-bound (exclusive) of the range
+ * @return {@code fromIndex} if the sub-range within bounds of the range
+ * @throws IndexOutOfBoundsException if the sub-range is out of bounds
+ * @since 9
+ */
+ public static
+ int checkFromIndexSize(int fromIndex, int size, int length) throws IndexOutOfBoundsException {
+ return checkFromIndexSize(fromIndex, size, length, null);
+ }
+
+ /**
+ * Checks if the sub-range from {@code fromIndex} (inclusive) to
+ * {@code fromIndex + size} (exclusive) is within the bounds of range from
+ * {@code 0} (inclusive) to {@code length} (exclusive).
+ *
+ * <p>The sub-range is defined to be out of bounds if any of the following
+ * inequalities is true:
+ * <ul>
+ * <li>{@code fromIndex < 0}</li>
+ * <li>{@code size < 0}</li>
+ * <li>{@code fromIndex + size > length}, taking into account integer overflow</li>
+ * <li>{@code length < 0}, which is implied from the former inequalities</li>
+ * </ul>
+ *
+ * <p>If the sub-range is out of bounds then, a runtime exception is thrown
+ * that is the result of applying the arguments {@code fromIndex} and
+ * {@code size} to the given exception mapping function.
+ *
+ * @param <T> the type of runtime exception to throw if the arguments are
+ * out of bounds
+ * @param fromIndex the lower-bound (inclusive) of the sub-interval
+ * @param size the size of the sub-range
+ * @param length the upper-bound (exclusive) of the range
+ * @param oobe the exception mapping function that when applied with out
+ * of bounds arguments returns a runtime exception. If {@code null}
+ * then, it's as if an exception mapping function was supplied that
+ * returns {@link IndexOutOfBoundsException} for any given arguments.
+ * @return {@code fromIndex} if the sub-range within bounds of the range
+ * @throws T if the sub-range is out of bounds, then a runtime exception is
+ * thrown that is the result of applying the out of bounds arguments
+ * to the exception mapping function.
+ * @throws IndexOutOfBoundsException if the sub-range is out of bounds and
+ * the exception mapping function is {@code null}
+ * @since 9
+ */
+ public static <T extends RuntimeException>
+ int checkFromIndexSize(int fromIndex, int size, int length,
+ BiFunction<Integer, Integer, T> oobe) throws T, IndexOutOfBoundsException {
+ if ((length | fromIndex | size) < 0 || size > length - fromIndex)
+ throw outOfBounds(fromIndex, size, oobe);
+ return fromIndex;
+ }
}
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java Mon Oct 12 14:41:36 2015 -0700
@@ -37,7 +37,6 @@
import java.security.AccessController;
import java.security.CodeSource;
import jdk.internal.misc.SharedSecrets;
-import sun.misc.IOUtils;
import sun.security.action.GetPropertyAction;
import sun.security.util.ManifestEntryVerifier;
import sun.security.util.SignatureFileVerifier;
@@ -438,7 +437,12 @@
*/
private byte[] getBytes(ZipEntry ze) throws IOException {
try (InputStream is = super.getInputStream(ze)) {
- return IOUtils.readFully(is, (int)ze.getSize(), true);
+ int len = (int)ze.getSize();
+ byte[] b = is.readAllBytes();
+ if (len != -1 && b.length != len)
+ throw new EOFException("Expected:" + len + ", read:" + b.length);
+
+ return b;
}
}
--- a/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java Mon Oct 12 14:41:36 2015 -0700
@@ -58,7 +58,7 @@
try {
substrate = ImageNativeSubstrate.openImage(imagePath, byteOrder);
- } catch (UnsatisfiedLinkError ex) {
+ } catch (UnsatisfiedLinkError | NoClassDefFoundError ex) {
substrate = ImageJavaSubstrate.openImage(imagePath, byteOrder);
}
--- a/jdk/src/java.base/share/classes/sun/invoke/anon/AnonymousClassLoader.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/invoke/anon/AnonymousClassLoader.java Mon Oct 12 14:41:36 2015 -0700
@@ -25,10 +25,10 @@
package sun.invoke.anon;
+import java.io.EOFException;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import sun.misc.IOUtils;
/**
* Anonymous class loader. Will load any valid classfile, producing
@@ -225,6 +225,10 @@
if (contentLength < 0)
throw new IOException("invalid content length "+contentLength);
- return IOUtils.readFully(connection.getInputStream(), contentLength, true);
+ byte[] b = connection.getInputStream().readAllBytes();
+ if (b.length != contentLength)
+ throw new EOFException("Expected:" + contentLength + ", read:" + b.length);
+
+ return b;
}
}
--- a/jdk/src/java.base/share/classes/sun/misc/ConditionLock.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1994, 2005, 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.
- */
-
-package sun.misc;
-
-/**
- * ConditionLock is a Lock with a built in state variable. This class
- * provides the ability to wait for the state variable to be set to a
- * desired value and then acquire the lock.<p>
- *
- * The lockWhen() and unlockWith() methods can be safely intermixed
- * with the lock() and unlock() methods. However if there is a thread
- * waiting for the state variable to become a particular value and you
- * simply call Unlock(), that thread will not be able to acquire the
- * lock until the state variable equals its desired value.
- *
- * @author Peter King
- */
-public final
-class ConditionLock extends Lock {
- private int state = 0;
-
- /**
- * Creates a ConditionLock.
- */
- public ConditionLock () {
- }
-
- /**
- * Creates a ConditionLock in an initialState.
- */
- public ConditionLock (int initialState) {
- state = initialState;
- }
-
- /**
- * Acquires the lock when the state variable equals the desired state.
- *
- * @param desiredState the desired state
- * @exception java.lang.InterruptedException if any thread has
- * interrupted this thread.
- */
- public synchronized void lockWhen(int desiredState)
- throws InterruptedException
- {
- while (state != desiredState) {
- wait();
- }
- lock();
- }
-
- /**
- * Releases the lock, and sets the state to a new value.
- * @param newState the new state
- */
- public synchronized void unlockWith(int newState) {
- state = newState;
- unlock();
- }
-}
--- a/jdk/src/java.base/share/classes/sun/misc/IOUtils.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2009, 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.
- */
-
-/**
- * IOUtils: A collection of IO-related public static methods.
- */
-
-package sun.misc;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-
-public class IOUtils {
-
- /**
- * Read up to <code>length</code> of bytes from <code>in</code>
- * until EOF is detected.
- * @param is input stream, must not be null
- * @param length number of bytes to read, -1 or Integer.MAX_VALUE means
- * read as much as possible
- * @param readAll if true, an EOFException will be thrown if not enough
- * bytes are read. Ignored when length is -1 or Integer.MAX_VALUE
- * @return bytes read
- * @throws IOException Any IO error or a premature EOF is detected
- */
- public static byte[] readFully(InputStream is, int length, boolean readAll)
- throws IOException {
- byte[] output = {};
- if (length == -1) length = Integer.MAX_VALUE;
- int pos = 0;
- while (pos < length) {
- int bytesToRead;
- if (pos >= output.length) { // Only expand when there's no room
- bytesToRead = Math.min(length - pos, output.length + 1024);
- if (output.length < pos + bytesToRead) {
- output = Arrays.copyOf(output, pos + bytesToRead);
- }
- } else {
- bytesToRead = output.length - pos;
- }
- int cc = is.read(output, pos, bytesToRead);
- if (cc < 0) {
- if (readAll && length != Integer.MAX_VALUE) {
- throw new EOFException("Detect premature EOF");
- } else {
- if (output.length != pos) {
- output = Arrays.copyOf(output, pos);
- }
- break;
- }
- }
- pos += cc;
- }
- return output;
- }
-}
--- a/jdk/src/java.base/share/classes/sun/misc/Lock.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1994, 2005, 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.
- */
-
-package sun.misc;
-
-/**
- * The Lock class provides a simple, useful interface to a lock.
- * Unlike monitors which synchronize access to an object, locks
- * synchronize access to an arbitrary set of resources (objects,
- * methods, variables, etc.). <p>
- *
- * The programmer using locks must be responsible for clearly defining
- * the semantics of their use and should handle deadlock avoidance in
- * the face of exceptions. <p>
- *
- * For example, if you want to protect a set of method invocations with
- * a lock, and one of the methods may throw an exception, you must be
- * prepared to release the lock similarly to the following example:
- * <pre>
- * class SomeClass {
- * Lock myLock = new Lock();
-
- * void someMethod() {
- * myLock.lock();
- * try {
- * StartOperation();
- * ContinueOperation();
- * EndOperation();
- * } finally {
- * myLock.unlock();
- * }
- * }
- * }
- * </pre>
- *
- * @author Peter King
- */
-public
-class Lock {
- private boolean locked = false;
-
- /**
- * Create a lock, which is initially not locked.
- */
- public Lock () {
- }
-
- /**
- * Acquire the lock. If someone else has the lock, wait until it
- * has been freed, and then try to acquire it again. This method
- * will not return until the lock has been acquired.
- *
- * @exception java.lang.InterruptedException if any thread has
- * interrupted this thread.
- */
- public final synchronized void lock() throws InterruptedException {
- while (locked) {
- wait();
- }
- locked = true;
- }
-
- /**
- * Release the lock. If someone else is waiting for the lock, the
- * will be notitified so they can try to acquire the lock again.
- */
- public final synchronized void unlock() {
- locked = false;
- notifyAll();
- }
-}
--- a/jdk/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java Mon Oct 12 14:41:36 2015 -0700
@@ -25,6 +25,7 @@
package sun.reflect.misc;
+import java.io.EOFException;
import java.security.AllPermission;
import java.security.AccessController;
import java.security.PermissionCollection;
@@ -43,7 +44,6 @@
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
-import sun.misc.IOUtils;
class Trampoline {
@@ -368,15 +368,12 @@
}
}
int len = uc.getContentLength();
- InputStream in = new BufferedInputStream(uc.getInputStream());
-
- byte[] b;
- try {
- b = IOUtils.readFully(in, len, true);
- } finally {
- in.close();
+ try (InputStream in = new BufferedInputStream(uc.getInputStream())) {
+ byte[] b = in.readAllBytes();
+ if (len != -1 && b.length != len)
+ throw new EOFException("Expected:" + len + ", read:" + b.length);
+ return b;
}
- return b;
}
--- a/jdk/src/java.base/share/classes/sun/security/provider/DomainKeyStore.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/DomainKeyStore.java Mon Oct 12 14:41:36 2015 -0700
@@ -33,7 +33,6 @@
import java.security.cert.CertificateException;
import java.util.*;
-import sun.misc.IOUtils;
import sun.security.pkcs.EncryptedPrivateKeyInfo;
import sun.security.util.PolicyUtil;
--- a/jdk/src/java.base/share/classes/sun/security/provider/JavaKeyStore.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/JavaKeyStore.java Mon Oct 12 14:41:36 2015 -0700
@@ -32,9 +32,9 @@
import java.security.cert.CertificateException;
import java.util.*;
-import sun.misc.IOUtils;
import sun.security.pkcs.EncryptedPrivateKeyInfo;
import sun.security.pkcs12.PKCS12KeyStore;
+import sun.security.util.IOUtils;
import sun.security.util.KeyStoreDelegator;
/**
--- a/jdk/src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java Mon Oct 12 14:41:36 2015 -0700
@@ -27,13 +27,13 @@
import java.io.BufferedInputStream;
import java.io.DataOutputStream;
+import java.io.EOFException;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.net.HttpURLConnection;
import java.util.*;
-import sun.misc.IOUtils;
import sun.security.util.Debug;
/**
@@ -147,8 +147,11 @@
}
verifyMimeType(connection.getContentType());
- int contentLength = connection.getContentLength();
- replyBuffer = IOUtils.readFully(input, contentLength, false);
+ int clen = connection.getContentLength();
+ replyBuffer = input.readAllBytes();
+ if (clen != -1 && replyBuffer.length != clen)
+ throw new EOFException("Expected:" + clen +
+ ", read:" + replyBuffer.length);
if (debug != null) {
debug.println("received timestamp response (length=" +
--- a/jdk/src/java.base/share/classes/sun/security/util/DerValue.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/util/DerValue.java Mon Oct 12 14:41:36 2015 -0700
@@ -28,7 +28,6 @@
import java.io.*;
import java.math.BigInteger;
import java.util.Date;
-import sun.misc.IOUtils;
/**
* Represents a single DER-encoded value. DER encoding rules are a subset
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/util/IOUtils.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2009, 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.
+ */
+
+/**
+ * IOUtils: A collection of IO-related public static methods.
+ */
+
+package sun.security.util;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+
+public class IOUtils {
+
+ /**
+ * Read up to <code>length</code> of bytes from <code>in</code>
+ * until EOF is detected.
+ * @param is input stream, must not be null
+ * @param length number of bytes to read, -1 or Integer.MAX_VALUE means
+ * read as much as possible
+ * @param readAll if true, an EOFException will be thrown if not enough
+ * bytes are read. Ignored when length is -1 or Integer.MAX_VALUE
+ * @return bytes read
+ * @throws IOException Any IO error or a premature EOF is detected
+ */
+ public static byte[] readFully(InputStream is, int length, boolean readAll)
+ throws IOException {
+ byte[] output = {};
+ if (length == -1) length = Integer.MAX_VALUE;
+ int pos = 0;
+ while (pos < length) {
+ int bytesToRead;
+ if (pos >= output.length) { // Only expand when there's no room
+ bytesToRead = Math.min(length - pos, output.length + 1024);
+ if (output.length < pos + bytesToRead) {
+ output = Arrays.copyOf(output, pos + bytesToRead);
+ }
+ } else {
+ bytesToRead = output.length - pos;
+ }
+ int cc = is.read(output, pos, bytesToRead);
+ if (cc < 0) {
+ if (readAll && length != Integer.MAX_VALUE) {
+ throw new EOFException("Detect premature EOF");
+ } else {
+ if (output.length != pos) {
+ output = Arrays.copyOf(output, pos);
+ }
+ break;
+ }
+ }
+ pos += cc;
+ }
+ return output;
+ }
+}
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletClassLoader.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletClassLoader.java Mon Oct 12 14:41:36 2015 -0700
@@ -33,6 +33,7 @@
import java.net.MalformedURLException;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.io.EOFException;
import java.io.File;
import java.io.FilePermission;
import java.io.IOException;
@@ -51,7 +52,6 @@
import java.security.PermissionCollection;
import sun.awt.AppContext;
import sun.awt.SunToolkit;
-import sun.misc.IOUtils;
import sun.misc.ManagedLocalsThread;
import sun.net.www.ParseUtil;
import sun.security.util.SecurityConstants;
@@ -334,7 +334,9 @@
byte[] b;
try {
- b = IOUtils.readFully(in, len, true);
+ b = in.readAllBytes();
+ if (len != -1 && b.length != len)
+ throw new EOFException("Expected:" + len + ", read:" + b.length);
} finally {
in.close();
}
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java Mon Oct 12 14:41:36 2015 -0700
@@ -32,8 +32,14 @@
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.concurrent.ConcurrentHashMap;
+import java.nio.file.Paths;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.locks.ReentrantLock;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
import jdk.internal.misc.JavaAWTAccess;
import jdk.internal.misc.SharedSecrets;
import sun.misc.ManagedLocalsThread;
@@ -57,37 +63,28 @@
* <p>
* At startup the LogManager class is located using the
* java.util.logging.manager system property.
+ *
+ * <h3>LogManager Configuration</h3>
+ *
+ * A LogManager initializes the logging configuration via
+ * the {@link #readConfiguration()} method during LogManager initialization.
+ * By default, LogManager default configuration is used.
+ * The logging configuration read by LogManager must be in the
+ * {@linkplain Properties properties file} format.
* <p>
* The LogManager defines two optional system properties that allow control over
- * the initial configuration:
+ * the initial configuration, as specified in the {@link #readConfiguration()}
+ * method:
* <ul>
* <li>"java.util.logging.config.class"
* <li>"java.util.logging.config.file"
* </ul>
- * These two properties may be specified on the command line to the "java"
+ * <p>
+ * These two system properties may be specified on the command line to the "java"
* command, or as system property definitions passed to JNI_CreateJavaVM.
* <p>
- * If the "java.util.logging.config.class" property is set, then the
- * property value is treated as a class name. The given class will be
- * loaded, an object will be instantiated, and that object's constructor
- * is responsible for reading in the initial configuration. (That object
- * may use other system properties to control its configuration.) The
- * alternate configuration class can use {@code readConfiguration(InputStream)}
- * to define properties in the LogManager.
- * <p>
- * If "java.util.logging.config.class" property is <b>not</b> set,
- * then the "java.util.logging.config.file" system property can be used
- * to specify a properties file (in java.util.Properties format). The
- * initial logging configuration will be read from this file.
- * <p>
- * If neither of these properties is defined then the LogManager uses its
- * default configuration. The default configuration is typically loaded from the
- * properties file "{@code conf/logging.properties}" in the Java installation
- * directory.
- * <p>
- * The properties for loggers and Handlers will have names starting
- * with the dot-separated name for the handler or logger.
- * <p>
+ * The {@linkplain Properties properties} for loggers and Handlers will have
+ * names starting with the dot-separated name for the handler or logger.<br>
* The global logging properties may include:
* <ul>
* <li>A property "handlers". This defines a whitespace or comma separated
@@ -788,7 +785,7 @@
// instantiation of the handler is done in the LogManager.addLogger
// implementation as a handler class may be only visible to LogManager
// subclass for the custom log manager case
- processParentHandlers(logger, name);
+ processParentHandlers(logger, name, VisitedLoggers.NEVER);
// Find the new node and its parent.
LogNode node = getNode(name);
@@ -836,7 +833,8 @@
// If logger.getUseParentHandlers() returns 'true' and any of the logger's
// parents have levels or handlers defined, make sure they are instantiated.
- private void processParentHandlers(final Logger logger, final String name) {
+ private void processParentHandlers(final Logger logger, final String name,
+ Predicate<Logger> visited) {
final LogManager owner = getOwner();
AccessController.doPrivileged(new PrivilegedAction<Void>() {
@Override
@@ -862,7 +860,9 @@
owner.getProperty(pname + ".handlers") != null) {
// This pname has a level/handlers definition.
// Make sure it exists.
- demandLogger(pname, null, null);
+ if (visited.test(demandLogger(pname, null, null))) {
+ break;
+ }
}
ix = ix2+1;
}
@@ -942,48 +942,64 @@
private void loadLoggerHandlers(final Logger logger, final String name,
final String handlersPropertyName)
{
- AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
@Override
- public Object run() {
- String names[] = parseClassNames(handlersPropertyName);
- final boolean ensureCloseOnReset = names.length > 0
- && getBooleanProperty(handlersPropertyName + ".ensureCloseOnReset",true);
-
- int count = 0;
- for (String type : names) {
- try {
- Class<?> clz = ClassLoader.getSystemClassLoader().loadClass(type);
- Handler hdl = (Handler) clz.newInstance();
- // Check if there is a property defining the
- // this handler's level.
- String levs = getProperty(type + ".level");
- if (levs != null) {
- Level l = Level.findLevel(levs);
- if (l != null) {
- hdl.setLevel(l);
- } else {
- // Probably a bad level. Drop through.
- System.err.println("Can't set level for " + type);
- }
- }
- // Add this Handler to the logger
- logger.addHandler(hdl);
- if (++count == 1 && ensureCloseOnReset) {
- // add this logger to the closeOnResetLoggers list.
- closeOnResetLoggers.addIfAbsent(CloseOnReset.create(logger));
- }
- } catch (Exception ex) {
- System.err.println("Can't load log handler \"" + type + "\"");
- System.err.println("" + ex);
- ex.printStackTrace();
- }
- }
-
+ public Void run() {
+ setLoggerHandlers(logger, name, handlersPropertyName,
+ createLoggerHandlers(name, handlersPropertyName));
return null;
}
});
}
+ private void setLoggerHandlers(final Logger logger, final String name,
+ final String handlersPropertyName,
+ List<Handler> handlers)
+ {
+ final boolean ensureCloseOnReset = ! handlers.isEmpty()
+ && getBooleanProperty(handlersPropertyName + ".ensureCloseOnReset",true);
+ int count = 0;
+ for (Handler hdl : handlers) {
+ logger.addHandler(hdl);
+ if (++count == 1 && ensureCloseOnReset) {
+ // add this logger to the closeOnResetLoggers list.
+ closeOnResetLoggers.addIfAbsent(CloseOnReset.create(logger));
+ }
+ }
+ }
+
+ private List<Handler> createLoggerHandlers(final String name, final String handlersPropertyName)
+ {
+ String names[] = parseClassNames(handlersPropertyName);
+ List<Handler> handlers = new ArrayList<>(names.length);
+ for (String type : names) {
+ try {
+ Class<?> clz = ClassLoader.getSystemClassLoader().loadClass(type);
+ Handler hdl = (Handler) clz.newInstance();
+ // Check if there is a property defining the
+ // this handler's level.
+ String levs = getProperty(type + ".level");
+ if (levs != null) {
+ Level l = Level.findLevel(levs);
+ if (l != null) {
+ hdl.setLevel(l);
+ } else {
+ // Probably a bad level. Drop through.
+ System.err.println("Can't set level for " + type);
+ }
+ }
+ // Add this Handler to the logger
+ handlers.add(hdl);
+ } catch (Exception ex) {
+ System.err.println("Can't load log handler \"" + type + "\"");
+ System.err.println("" + ex);
+ ex.printStackTrace();
+ }
+ }
+
+ return handlers;
+ }
+
// loggerRefQueue holds LoggerWeakRef objects for Logger objects
// that have been GC'ed.
@@ -1242,21 +1258,48 @@
}
/**
- * Reinitialize the logging properties and reread the logging configuration.
+ * Reads and initializes the logging configuration.
+ * <p>
+ * If the "java.util.logging.config.class" system property is set, then the
+ * property value is treated as a class name. The given class will be
+ * loaded, an object will be instantiated, and that object's constructor
+ * is responsible for reading in the initial configuration. (That object
+ * may use other system properties to control its configuration.) The
+ * alternate configuration class can use {@code readConfiguration(InputStream)}
+ * to define properties in the LogManager.
* <p>
- * The same rules are used for locating the configuration properties
- * as are used at startup. So normally the logging properties will
- * be re-read from the same file that was used at startup.
- * <P>
- * Any log level definitions in the new configuration file will be
- * applied using Logger.setLevel(), if the target Logger exists.
+ * If "java.util.logging.config.class" system property is <b>not</b> set,
+ * then this method will read the initial configuration from a properties
+ * file and calls the {@link #readConfiguration(InputStream)} method to initialize
+ * the configuration. The "java.util.logging.config.file" system property can be used
+ * to specify the properties file that will be read as the initial configuration;
+ * if not set, then the LogManager default configuration is used.
+ * The default configuration is typically loaded from the
+ * properties file "{@code conf/logging.properties}" in the Java installation
+ * directory.
+ *
* <p>
* Any {@linkplain #addConfigurationListener registered configuration
* listener} will be invoked after the properties are read.
*
- * @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
- * @exception IOException if there are IO problems reading the configuration.
+ * @apiNote This {@code readConfiguration} method should only be used for
+ * initializing the configuration during LogManager initialization or
+ * used with the "java.util.logging.config.class" property.
+ * When this method is called after loggers have been created, and
+ * the "java.util.logging.config.class" system property is not set, all
+ * existing loggers will be {@linkplain #reset() reset}. Then any
+ * existing loggers that have a level property specified in the new
+ * configuration stream will be {@linkplain
+ * Logger#setLevel(java.util.logging.Level) set} to the specified log level.
+ * <p>
+ * To properly update the logging configuration, use the
+ * {@link #updateConfiguration(java.util.function.Function)} or
+ * {@link #updateConfiguration(java.io.InputStream, java.util.function.Function)}
+ * methods instead.
+ *
+ * @throws SecurityException if a security manager exists and if
+ * the caller does not have LoggingPermission("control").
+ * @throws IOException if there are IO problems reading the configuration.
*/
public void readConfiguration() throws IOException, SecurityException {
checkPermission();
@@ -1284,20 +1327,24 @@
}
}
+ String fname = getConfigurationFileName();
+ try (final InputStream in = new FileInputStream(fname)) {
+ final BufferedInputStream bin = new BufferedInputStream(in);
+ readConfiguration(bin);
+ }
+ }
+
+ String getConfigurationFileName() throws IOException {
String fname = System.getProperty("java.util.logging.config.file");
if (fname == null) {
fname = System.getProperty("java.home");
if (fname == null) {
throw new Error("Can't find java.home ??");
}
- File f = new File(fname, "conf");
- f = new File(f, "logging.properties");
- fname = f.getCanonicalPath();
+ fname = Paths.get(fname, "conf", "logging.properties")
+ .toAbsolutePath().normalize().toString();
}
- try (final InputStream in = new FileInputStream(fname)) {
- final BufferedInputStream bin = new BufferedInputStream(in);
- readConfiguration(bin);
- }
+ return fname;
}
/**
@@ -1305,9 +1352,17 @@
* <p>
* For all named loggers, the reset operation removes and closes
* all Handlers and (except for the root logger) sets the level
- * to null. The root logger's level is set to Level.INFO.
+ * to {@code null}. The root logger's level is set to {@code Level.INFO}.
*
- * @exception SecurityException if a security manager exists and if
+ * @apiNote Calling this method also clears the LogManager {@linkplain
+ * #getProperty(java.lang.String) properties}. The {@link
+ * #updateConfiguration(java.util.function.Function)
+ * updateConfiguration(Function)} or
+ * {@link #updateConfiguration(java.io.InputStream, java.util.function.Function)
+ * updateConfiguration(InputStream, Function)} method can be used to
+ * properly update to a new configuration.
+ *
+ * @throws SecurityException if a security manager exists and if
* the caller does not have LoggingPermission("control").
*/
@@ -1421,18 +1476,32 @@
}
/**
- * Reinitialize the logging properties and reread the logging configuration
- * from the given stream, which should be in java.util.Properties format.
+ * Reads and initializes the logging configuration from the given input stream.
+ *
+ * <p>
* Any {@linkplain #addConfigurationListener registered configuration
* listener} will be invoked after the properties are read.
* <p>
- * Any log level definitions in the new configuration file will be
- * applied using Logger.setLevel(), if the target Logger exists.
+ * @apiNote This {@code readConfiguration} method should only be used for
+ * initializing the configuration during LogManager initialization or
+ * used with the "java.util.logging.config.class" property.
+ * When this method is called after loggers have been created, all
+ * existing loggers will be {@linkplain #reset() reset}. Then any
+ * existing loggers that have a level property specified in the
+ * given input stream will be {@linkplain
+ * Logger#setLevel(java.util.logging.Level) set} to the specified log level.
+ * <p>
+ * To properly update the logging configuration, use the
+ * {@link #updateConfiguration(java.util.function.Function)} or
+ * {@link #updateConfiguration(java.io.InputStream, java.util.function.Function)}
+ * method instead.
*
- * @param ins stream to read properties from
- * @exception SecurityException if a security manager exists and if
+ * @param ins stream to read properties from
+ * @throws SecurityException if a security manager exists and if
* the caller does not have LoggingPermission("control").
- * @exception IOException if there are problems reading from the stream.
+ * @throws IOException if there are problems reading from the stream,
+ * or the given stream is not in the
+ * {@linkplain java.util.Properties properties file} format.
*/
public void readConfiguration(InputStream ins) throws IOException, SecurityException {
checkPermission();
@@ -1506,6 +1575,633 @@
invokeConfigurationListeners();
}
+ // This enum enumerate the configuration properties that will be
+ // updated on existing loggers when the configuration is updated
+ // with LogManager.updateConfiguration().
+ //
+ // Note that this works properly only for the global LogManager - as
+ // Handler and its subclasses get their configuration from
+ // LogManager.getLogManager().
+ //
+ static enum ConfigProperty {
+ LEVEL(".level"), HANDLERS(".handlers"), USEPARENT(".useParentHandlers");
+ final String suffix;
+ final int length;
+ private ConfigProperty(String suffix) {
+ this.suffix = Objects.requireNonNull(suffix);
+ length = suffix.length();
+ }
+
+ public boolean handleKey(String key) {
+ if (this == HANDLERS && suffix.substring(1).equals(key)) return true;
+ if (this == HANDLERS && suffix.equals(key)) return false;
+ return key.endsWith(suffix);
+ }
+ String key(String loggerName) {
+ if (this == HANDLERS && (loggerName == null || loggerName.isEmpty())) {
+ return suffix.substring(1);
+ }
+ return loggerName + suffix;
+ }
+ String loggerName(String key) {
+ assert key.equals(suffix.substring(1)) && this == HANDLERS || key.endsWith(suffix);
+ if (this == HANDLERS && suffix.substring(1).equals(key)) return "";
+ return key.substring(0, key.length() - length);
+ }
+
+ /**
+ * If the property is one that should be updated on existing loggers by
+ * updateConfiguration, returns the name of the logger for which the
+ * property is configured. Otherwise, returns null.
+ * @param property a property key in 'props'
+ * @return the name of the logger on which the property is to be set,
+ * if the property is one that should be updated on existing
+ * loggers, {@code null} otherwise.
+ */
+ static String getLoggerName(String property) {
+ for (ConfigProperty p : ConfigProperty.ALL) {
+ if (p.handleKey(property)) {
+ return p.loggerName(property);
+ }
+ }
+ return null; // Not a property that should be updated.
+ }
+
+ /**
+ * Find the ConfigProperty corresponding to the given
+ * property key (may find none).
+ * @param property a property key in 'props'
+ * @return An optional containing a ConfigProperty object,
+ * if the property is one that should be updated on existing
+ * loggers, empty otherwise.
+ */
+ static Optional<ConfigProperty> find(String property) {
+ return ConfigProperty.ALL.stream()
+ .filter(p -> p.handleKey(property))
+ .findFirst();
+ }
+
+ /**
+ * Returns true if the given property is one that should be updated
+ * on existing loggers.
+ * Used to filter property name streams.
+ * @param property a property key from the configuration.
+ * @return true if this property is of interest for updateConfiguration.
+ */
+ static boolean matches(String property) {
+ return find(property).isPresent();
+ }
+
+ /**
+ * Returns true if the new property value is different from the old,
+ * and therefore needs to be updated on existing loggers.
+ * @param k a property key in the configuration
+ * @param previous the old configuration
+ * @param next the new configuration
+ * @return true if the property is changing value between the two
+ * configurations.
+ */
+ static boolean needsUpdating(String k, Properties previous, Properties next) {
+ final String p = trim(previous.getProperty(k, null));
+ final String n = trim(next.getProperty(k, null));
+ return ! Objects.equals(p,n);
+ }
+
+ /**
+ * Applies the mapping function for the given key to the next
+ * configuration.
+ * If the mapping function is null then this method does nothing.
+ * Otherwise, it calls the mapping function to compute the value
+ * that should be associated with {@code key} in the resulting
+ * configuration, and applies it to {@code next}.
+ * If the mapping function returns {@code null} the key is removed
+ * from {@code next}.
+ *
+ * @param k a property key in the configuration
+ * @param previous the old configuration
+ * @param next the new configuration (modified by this function)
+ * @param remappingFunction the mapping function.
+ */
+ static void merge(String k, Properties previous, Properties next,
+ BiFunction<String, String, String> mappingFunction) {
+ String p = trim(previous.getProperty(k, null));
+ String n = trim(next.getProperty(k, null));
+ String mapped = trim(mappingFunction.apply(p,n));
+ if (!Objects.equals(n, mapped)) {
+ if (mapped == null) {
+ next.remove(k);
+ } else {
+ next.setProperty(k, mapped);
+ }
+ }
+ }
+
+ private static final EnumSet<ConfigProperty> ALL =
+ EnumSet.allOf(ConfigProperty.class);
+ }
+
+ // trim the value if not null.
+ private static String trim(String value) {
+ return value == null ? null : value.trim();
+ }
+
+ /**
+ * An object that keep track of loggers we have already visited.
+ * Used when updating configuration, to avoid processing the same logger
+ * twice.
+ */
+ static final class VisitedLoggers implements Predicate<Logger> {
+ final IdentityHashMap<Logger,Boolean> visited;
+ private VisitedLoggers(IdentityHashMap<Logger,Boolean> visited) {
+ this.visited = visited;
+ }
+ VisitedLoggers() {
+ this(new IdentityHashMap<>());
+ }
+ @Override
+ public boolean test(Logger logger) {
+ return visited != null && visited.put(logger, Boolean.TRUE) != null;
+ }
+ public void clear() {
+ if (visited != null) visited.clear();
+ }
+
+ // An object that considers that no logger has ever been visited.
+ // This is used when processParentHandlers is called from
+ // LoggerContext.addLocalLogger
+ static final VisitedLoggers NEVER = new VisitedLoggers(null);
+ }
+
+
+ /**
+ * Type of the modification for a given property. One of SAME, ADDED, CHANGED,
+ * or REMOVED.
+ */
+ static enum ModType {
+ SAME, // property had no value in the old and new conf, or had the
+ // same value in both.
+ ADDED, // property had no value in the old conf, but has one in the new.
+ CHANGED, // property has a different value in the old conf and the new conf.
+ REMOVED; // property has no value in the new conf, but had one in the old.
+ static ModType of(String previous, String next) {
+ if (previous == null && next != null) {
+ return ADDED;
+ }
+ if (next == null && previous != null) {
+ return REMOVED;
+ }
+ if (!Objects.equals(trim(previous), trim(next))) {
+ return CHANGED;
+ }
+ return SAME;
+ }
+ }
+
+ /**
+ * Updates the logging configuration.
+ * <p>
+ * If the "java.util.logging.config.file" system property is set,
+ * then the property value specifies the properties file to be read
+ * as the new configuration. Otherwise, the LogManager default
+ * configuration is used.
+ * <br>The default configuration is typically loaded from the
+ * properties file "{@code conf/logging.properties}" in the
+ * Java installation directory.
+ * <p>
+ * This method reads the new configuration and calls the {@link
+ * #updateConfiguration(java.io.InputStream, java.util.function.Function)
+ * updateConfiguration(ins, mapper)} method to
+ * update the configuration.
+ *
+ * @apiNote
+ * This method updates the logging configuration from reading
+ * a properties file and ignores the "java.util.logging.config.class"
+ * system property. The "java.util.logging.config.class" property is
+ * only used by the {@link #readConfiguration()} method to load a custom
+ * configuration class as an initial configuration.
+ *
+ * @param mapper a functional interface that takes a configuration
+ * key <i>k</i> and returns a function <i>f(o,n)</i> whose returned
+ * value will be applied to the resulting configuration. The
+ * function <i>f</i> may return {@code null} to indicate that the property
+ * <i>k</i> will not be added to the resulting configuration.
+ * <br>
+ * If {@code mapper} is {@code null} then {@code (k) -> ((o, n) -> n)} is
+ * assumed.
+ * <br>
+ * For each <i>k</i>, the mapped function <i>f</i> will
+ * be invoked with the value associated with <i>k</i> in the old
+ * configuration (i.e <i>o</i>) and the value associated with
+ * <i>k</i> in the new configuration (i.e. <i>n</i>).
+ * <br>A {@code null} value for <i>o</i> or <i>n</i> indicates that no
+ * value was present for <i>k</i> in the corresponding configuration.
+ *
+ * @throws SecurityException if a security manager exists and if
+ * the caller does not have LoggingPermission("control"), or
+ * does not have the permissions required to set up the
+ * configuration (e.g. open file specified for FileHandlers
+ * etc...)
+ *
+ * @throws NullPointerException if {@code mapper} returns a {@code null}
+ * function when invoked.
+ *
+ * @throws IOException if there are problems reading from the
+ * logging configuration file.
+ *
+ * @see #updateConfiguration(java.io.InputStream, java.util.function.Function)
+ */
+ public void updateConfiguration(Function<String, BiFunction<String,String,String>> mapper)
+ throws IOException {
+ checkPermission();
+ ensureLogManagerInitialized();
+ drainLoggerRefQueueBounded();
+
+ String fname = getConfigurationFileName();
+ try (final InputStream in = new FileInputStream(fname)) {
+ final BufferedInputStream bin = new BufferedInputStream(in);
+ updateConfiguration(bin, mapper);
+ }
+ }
+
+ /**
+ * Updates the logging configuration.
+ * <p>
+ * For each configuration key in the {@linkplain
+ * #getProperty(java.lang.String) existing configuration} and
+ * the given input stream configuration, the given {@code mapper} function
+ * is invoked to map from the configuration key to a function,
+ * <i>f(o,n)</i>, that takes the old value and new value and returns
+ * the resulting value to be applied in the resulting configuration,
+ * as specified in the table below.
+ * <p>Let <i>k</i> be a configuration key in the old or new configuration,
+ * <i>o</i> be the old value (i.e. the value associated
+ * with <i>k</i> in the old configuration), <i>n</i> be the
+ * new value (i.e. the value associated with <i>k</i> in the new
+ * configuration), and <i>f</i> be the function returned
+ * by {@code mapper.apply(}<i>k</i>{@code )}: then <i>v = f(o,n)</i> is the
+ * resulting value. If <i>v</i> is not {@code null}, then a property
+ * <i>k</i> with value <i>v</i> will be added to the resulting configuration.
+ * Otherwise, it will be omitted.
+ * <br>A {@code null} value may be passed to function
+ * <i>f</i> to indicate that the corresponding configuration has no
+ * configuration key <i>k</i>.
+ * The function <i>f</i> may return {@code null} to indicate that
+ * there will be no value associated with <i>k</i> in the resulting
+ * configuration.
+ * <p>
+ * If {@code mapper} is {@code null}, then <i>v</i> will be set to
+ * <i>n</i>.
+ * <p>
+ * LogManager {@linkplain #getProperty(java.lang.String) properties} are
+ * updated with the resulting value in the resulting configuration.
+ * <p>
+ * The registered {@linkplain #addConfigurationListener configuration
+ * listeners} will be invoked after the configuration is successfully updated.
+ * <br><br>
+ * <table summary="Updating configuration properties">
+ * <tr>
+ * <th>Property</th>
+ * <th>Resulting Behavior</th>
+ * </tr>
+ * <tr>
+ * <td valign="top">{@code <logger>.level}</td>
+ * <td>
+ * <ul>
+ * <li>If the resulting configuration defines a level for a logger and
+ * if the resulting level is different than the level specified in the
+ * the old configuration, or not specified in
+ * the old configuration, then if the logger exists or if children for
+ * that logger exist, the level for that logger will be updated,
+ * and the change propagated to any existing logger children.
+ * This may cause the logger to be created, if necessary.
+ * </li>
+ * <li>If the old configuration defined a level for a logger, and the
+ * resulting configuration doesn't, then this change will not be
+ * propagated to existing loggers, if any.
+ * To completely replace a configuration - the caller should therefore
+ * call {@link #reset() reset} to empty the current configuration,
+ * before calling {@code updateConfiguration}.
+ * </li>
+ * </ul>
+ * </td>
+ * <tr>
+ * <td valign="top">{@code <logger>.useParentHandlers}</td>
+ * <td>
+ * <ul>
+ * <li>If either the resulting or the old value for the useParentHandlers
+ * property is not null, then if the logger exists or if children for
+ * that logger exist, that logger will be updated to the resulting
+ * value.
+ * The value of the useParentHandlers property is the value specified
+ * in the configuration; if not specified, the default is true.
+ * </li>
+ * </ul>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td valign="top">{@code <logger>.handlers}</td>
+ * <td>
+ * <ul>
+ * <li>If the resulting configuration defines a list of handlers for a
+ * logger, and if the resulting list is different than the list
+ * specified in the old configuration for that logger (that could be
+ * empty), then if the logger exists or its children exist, the
+ * handlers associated with that logger are closed and removed and
+ * the new handlers will be created per the resulting configuration
+ * and added to that logger, creating that logger if necessary.
+ * </li>
+ * <li>If the old configuration defined some handlers for a logger, and
+ * the resulting configuration doesn't, if that logger exists,
+ * its handlers will be removed and closed.
+ * </li>
+ * <li>Changing the list of handlers on an existing logger will cause all
+ * its previous handlers to be removed and closed, regardless of whether
+ * they had been created from the configuration or programmatically.
+ * The old handlers will be replaced by new handlers, if any.
+ * </li>
+ * </ul>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td valign="top">{@code <handler-name>.*}</td>
+ * <td>
+ * <ul>
+ * <li>Properties configured/changed on handler classes will only affect
+ * newly created handlers. If a node is configured with the same list
+ * of handlers in the old and the resulting configuration, then these
+ * handlers will remain unchanged.
+ * </li>
+ * </ul>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td valign="top">{@code config} and any other property</td>
+ * <td>
+ * <ul>
+ * <li>The resulting value for these property will be stored in the
+ * LogManager properties, but {@code updateConfiguration} will not parse
+ * or process their values.
+ * </li>
+ * </ul>
+ * </td>
+ * </tr>
+ * </table>
+ * <p>
+ * <em>Example mapper functions:</em>
+ * <br><br>
+ * <ul>
+ * <li>Replace all logging properties with the new configuration:
+ * <br><br>{@code (k) -> ((o, n) -> n)}:
+ * <br><br>this is equivalent to passing a null {@code mapper} parameter.
+ * </li>
+ * <li>Merge the new configuration and old configuration and use the
+ * new value if <i>k</i> exists in the new configuration:
+ * <br><br>{@code (k) -> ((o, n) -> n == null ? o : n)}:
+ * <br><br>as if merging two collections as follows:
+ * {@code result.putAll(oldc); result.putAll(newc)}.<br></li>
+ * <li>Merge the new configuration and old configuration and use the old
+ * value if <i>k</i> exists in the old configuration:
+ * <br><br>{@code (k) -> ((o, n) -> o == null ? n : o)}:
+ * <br><br>as if merging two collections as follows:
+ * {@code result.putAll(newc); result.putAll(oldc)}.<br></li>
+ * <li>Replace all properties with the new configuration except the handler
+ * property to configure Logger's handler that is not root logger:
+ * <br>
+ * <pre>{@code (k) -> k.endsWith(".handlers")}
+ * {@code ? ((o, n) -> (o == null ? n : o))}
+ * {@code : ((o, n) -> n)}</pre>
+ * </li>
+ * </ul>
+ * <p>
+ * To completely reinitialize a configuration, an application can first call
+ * {@link #reset() reset} to fully remove the old configuration, followed by
+ * {@code updateConfiguration} to initialize the new configuration.
+ *
+ * @param ins a stream to read properties from
+ * @param mapper a functional interface that takes a configuration
+ * key <i>k</i> and returns a function <i>f(o,n)</i> whose returned
+ * value will be applied to the resulting configuration. The
+ * function <i>f</i> may return {@code null} to indicate that the property
+ * <i>k</i> will not be added to the resulting configuration.
+ * <br>
+ * If {@code mapper} is {@code null} then {@code (k) -> ((o, n) -> n)} is
+ * assumed.
+ * <br>
+ * For each <i>k</i>, the mapped function <i>f</i> will
+ * be invoked with the value associated with <i>k</i> in the old
+ * configuration (i.e <i>o</i>) and the value associated with
+ * <i>k</i> in the new configuration (i.e. <i>n</i>).
+ * <br>A {@code null} value for <i>o</i> or <i>n</i> indicates that no
+ * value was present for <i>k</i> in the corresponding configuration.
+ *
+ * @throws SecurityException if a security manager exists and if
+ * the caller does not have LoggingPermission("control"), or
+ * does not have the permissions required to set up the
+ * configuration (e.g. open files specified for FileHandlers)
+ *
+ * @throws NullPointerException if {@code ins} is null or if
+ * {@code mapper} returns a null function when invoked.
+ *
+ * @throws IOException if there are problems reading from the stream,
+ * or the given stream is not in the
+ * {@linkplain java.util.Properties properties file} format.
+ */
+ public void updateConfiguration(InputStream ins,
+ Function<String, BiFunction<String,String,String>> mapper)
+ throws IOException {
+ checkPermission();
+ ensureLogManagerInitialized();
+ drainLoggerRefQueueBounded();
+
+ final Properties previous;
+ final Set<String> updatePropertyNames;
+ List<LoggerContext> cxs = Collections.emptyList();
+ final VisitedLoggers visited = new VisitedLoggers();
+ final Properties next = new Properties();
+
+ try {
+ // Load the properties
+ next.load(ins);
+ } catch (IllegalArgumentException x) {
+ // props.load may throw an IllegalArgumentException if the stream
+ // contains malformed Unicode escape sequences.
+ // We wrap that in an IOException as updateConfiguration is
+ // specified to throw IOException if there are problems reading
+ // from the stream.
+ // Note: new IOException(x.getMessage(), x) allow us to get a more
+ // concise error message than new IOException(x);
+ throw new IOException(x.getMessage(), x);
+ }
+
+ if (globalHandlersState == STATE_SHUTDOWN) return;
+
+ // exclusive lock: readConfiguration/reset/updateConfiguration can't
+ // run concurrently.
+ // configurationLock.writeLock().lock();
+ configurationLock.lock();
+ try {
+ if (globalHandlersState == STATE_SHUTDOWN) return;
+ previous = props;
+
+ // Builds a TreeSet of all (old and new) property names.
+ updatePropertyNames =
+ Stream.concat(previous.stringPropertyNames().stream(),
+ next.stringPropertyNames().stream())
+ .collect(Collectors.toCollection(TreeSet::new));
+
+ if (mapper != null) {
+ // mapper will potentially modify the content of
+ // 'next', so we need to call it before affecting props=next.
+ // give a chance to the mapper to control all
+ // properties - not just those we will reset.
+ updatePropertyNames.stream()
+ .forEachOrdered(k -> ConfigProperty
+ .merge(k, previous, next,
+ Objects.requireNonNull(mapper.apply(k))));
+ }
+
+ props = next;
+
+ // allKeys will contain all keys:
+ // - which correspond to a configuration property we are interested in
+ // (first filter)
+ // - whose value needs to be updated (because it's new, removed, or
+ // different) in the resulting configuration (second filter)
+ final Stream<String> allKeys = updatePropertyNames.stream()
+ .filter(ConfigProperty::matches)
+ .filter(k -> ConfigProperty.needsUpdating(k, previous, next));
+
+ // Group configuration properties by logger name
+ // We use a TreeMap so that parent loggers will be visited before
+ // child loggers.
+ final Map<String, TreeSet<String>> loggerConfigs =
+ allKeys.collect(Collectors.groupingBy(ConfigProperty::getLoggerName,
+ TreeMap::new,
+ Collectors.toCollection(TreeSet::new)));
+
+ if (!loggerConfigs.isEmpty()) {
+ cxs = contexts();
+ }
+ final List<Logger> loggers = cxs.isEmpty()
+ ? Collections.emptyList() : new ArrayList<>(cxs.size());
+ for (Map.Entry<String, TreeSet<String>> e : loggerConfigs.entrySet()) {
+ // This can be a logger name, or something else...
+ // The only thing we know is that we found a property
+ // we are interested in.
+ // For instance, if we found x.y.z.level, then x.y.z could be
+ // a logger, but it could also be a handler class...
+ // Anyway...
+ final String name = e.getKey();
+ final Set<String> properties = e.getValue();
+ loggers.clear();
+ for (LoggerContext cx : cxs) {
+ Logger l = cx.findLogger(name);
+ if (l != null && !visited.test(l)) {
+ loggers.add(l);
+ }
+ }
+ if (loggers.isEmpty()) continue;
+ for (String pk : properties) {
+ ConfigProperty cp = ConfigProperty.find(pk).get();
+ String p = previous.getProperty(pk, null);
+ String n = next.getProperty(pk, null);
+
+ // Determines the type of modification.
+ ModType mod = ModType.of(p, n);
+
+ // mod == SAME means that the two values are equals, there
+ // is nothing to do. Usually, this should not happen as such
+ // properties should have been filtered above.
+ // It could happen however if the properties had
+ // trailing/leading whitespaces.
+ if (mod == ModType.SAME) continue;
+
+ switch (cp) {
+ case LEVEL:
+ if (mod == ModType.REMOVED) continue;
+ Level level = Level.findLevel(trim(n));
+ if (level != null) {
+ if (name.isEmpty()) {
+ rootLogger.setLevel(level);
+ }
+ for (Logger l : loggers) {
+ if (!name.isEmpty() || l != rootLogger) {
+ l.setLevel(level);
+ }
+ }
+ }
+ break;
+ case USEPARENT:
+ if (!name.isEmpty()) {
+ boolean useParent = getBooleanProperty(pk, true);
+ if (n != null || p != null) {
+ // reset the flag only if the previous value
+ // or the new value are not null.
+ for (Logger l : loggers) {
+ l.setUseParentHandlers(useParent);
+ }
+ }
+ }
+ break;
+ case HANDLERS:
+ List<Handler> hdls = null;
+ if (name.isEmpty()) {
+ // special handling for the root logger.
+ globalHandlersState = STATE_READING_CONFIG;
+ try {
+ closeHandlers(rootLogger);
+ globalHandlersState = STATE_UNINITIALIZED;
+ } catch (Throwable t) {
+ globalHandlersState = STATE_INITIALIZED;
+ throw t;
+ }
+ }
+ for (Logger l : loggers) {
+ if (l == rootLogger) continue;
+ closeHandlers(l);
+ if (mod == ModType.REMOVED) {
+ closeOnResetLoggers.removeIf(c -> c.logger == l);
+ continue;
+ }
+ if (hdls == null) {
+ hdls = name.isEmpty()
+ ? Arrays.asList(rootLogger.getHandlers())
+ : createLoggerHandlers(name, pk);
+ }
+ setLoggerHandlers(l, name, pk, hdls);
+ }
+ break;
+ default: break;
+ }
+ }
+ }
+ } finally {
+ configurationLock.unlock();
+ visited.clear();
+ }
+
+ // Now ensure that if an existing logger has acquired a new parent
+ // in the configuration, this new parent will be created - if needed,
+ // and added to the context of the existing child.
+ //
+ drainLoggerRefQueueBounded();
+ for (LoggerContext cx : cxs) {
+ for (Enumeration<String> names = cx.getLoggerNames() ; names.hasMoreElements();) {
+ String name = names.nextElement();
+ if (name.isEmpty()) continue; // don't need to process parents on root.
+ Logger l = cx.findLogger(name);
+ if (l != null && !visited.test(l)) {
+ // should pass visited here to cut the processing when
+ // reaching a logger already visited.
+ cx.processParentHandlers(l, name, visited);
+ }
+ }
+ }
+
+ // We changed the configuration: invoke configuration listeners
+ invokeConfigurationListeners();
+ }
+
/**
* Get the value of a logging property.
* The method returns null if the property is not found.
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java Mon Oct 12 14:41:36 2015 -0700
@@ -45,7 +45,6 @@
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
-import sun.misc.IOUtils;
import javax.net.SocketFactory;
/**
@@ -862,7 +861,7 @@
}
// read in seqlen bytes
- byte[] left = IOUtils.readFully(in, seqlen, false);
+ byte[] left = readFully(in, seqlen);
inbuf = Arrays.copyOf(inbuf, offset + left.length);
System.arraycopy(left, 0, inbuf, offset, left.length);
offset += left.length;
@@ -957,6 +956,31 @@
}
}
+ private static byte[] readFully(InputStream is, int length)
+ throws IOException
+ {
+ byte[] buf = new byte[Math.min(length, 8192)];
+ int nread = 0;
+ while (nread < length) {
+ int bytesToRead;
+ if (nread >= buf.length) { // need to allocate a larger buffer
+ bytesToRead = Math.min(length - nread, buf.length + 8192);
+ if (buf.length < nread + bytesToRead) {
+ buf = Arrays.copyOf(buf, nread + bytesToRead);
+ }
+ } else {
+ bytesToRead = buf.length - nread;
+ }
+ int count = is.read(buf, nread, bytesToRead);
+ if (count < 0) {
+ if (buf.length != nread)
+ buf = Arrays.copyOf(buf, nread);
+ break;
+ }
+ nread += count;
+ }
+ return buf;
+ }
// This code must be uncommented to run the LdapAbandonTest.
/*public void sendSearchReqs(String dn, int numReqs) {
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/NetClient.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/NetClient.java Mon Oct 12 14:41:36 2015 -0700
@@ -31,10 +31,9 @@
package sun.security.krb5.internal;
-import sun.misc.IOUtils;
-
import java.io.*;
import java.net.*;
+import sun.security.util.IOUtils;
public abstract class NetClient implements AutoCloseable {
public static NetClient getInstance(String protocol, String hostname, int port,
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java Mon Oct 12 14:41:36 2015 -0700
@@ -36,10 +36,10 @@
import java.util.List;
import java.util.StringTokenizer;
-import sun.misc.IOUtils;
import sun.security.krb5.*;
import sun.security.krb5.internal.*;
import sun.security.krb5.internal.util.KrbDataInputStream;
+import sun.security.util.IOUtils;
/**
* This class extends KrbDataInputStream. It is used for parsing FCC-format
--- a/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java Mon Oct 12 14:41:36 2015 -0700
@@ -106,9 +106,9 @@
public Provider configure(String configArg) throws InvalidParameterException {
final String newConfigName = checkNull(configArg);
try {
- return AccessController.doPrivileged(new PrivilegedExceptionAction<Provider>() {
+ return AccessController.doPrivileged(new PrivilegedExceptionAction<>() {
@Override
- public Provider run() throws Exception {
+ public SunPKCS11 run() throws Exception {
return new SunPKCS11(new Config(newConfigName));
}
});
@@ -119,6 +119,11 @@
}
}
+ @Override
+ public boolean isConfigured() {
+ return (config != null);
+ }
+
private static <T> T checkNull(T obj) {
if (obj == null) {
throw new NullPointerException();
@@ -1142,8 +1147,10 @@
* @param handler the <code>CallbackHandler</code> used by
* this provider to communicate with the caller
*
- * @exception LoginException if the login operation fails
- * @exception SecurityException if the does not pass a security check for
+ * @throws IllegalStateException if the provider requires configuration
+ * and Provider.configure has not been called
+ * @throws LoginException if the login operation fails
+ * @throws SecurityException if the does not pass a security check for
* <code>SecurityPermission("authProvider.<i>name</i>")</code>,
* where <i>name</i> is the value returned by
* this provider's <code>getName</code> method
@@ -1151,8 +1158,11 @@
public void login(Subject subject, CallbackHandler handler)
throws LoginException {
+ if (!isConfigured()) {
+ throw new IllegalStateException("Configuration is required");
+ }
+
// security check
-
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (debug != null) {
@@ -1271,16 +1281,21 @@
/**
* Log out from this provider
*
- * @exception LoginException if the logout operation fails
- * @exception SecurityException if the does not pass a security check for
+ * @throws IllegalStateException if the provider requires configuration
+ * and Provider.configure has not been called
+ * @throws LoginException if the logout operation fails
+ * @throws SecurityException if the does not pass a security check for
* <code>SecurityPermission("authProvider.<i>name</i>")</code>,
* where <i>name</i> is the value returned by
* this provider's <code>getName</code> method
*/
public void logout() throws LoginException {
+ if (!isConfigured()) {
+ throw new IllegalStateException("Configuration is required");
+ }
+
// security check
-
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission
@@ -1353,7 +1368,9 @@
* @param handler a <code>CallbackHandler</code> for obtaining
* authentication information, which may be <code>null</code>
*
- * @exception SecurityException if the caller does not pass a
+ * @throws IllegalStateException if the provider requires configuration
+ * and Provider.configure has not been called
+ * @throws SecurityException if the caller does not pass a
* security check for
* <code>SecurityPermission("authProvider.<i>name</i>")</code>,
* where <i>name</i> is the value returned by
@@ -1361,8 +1378,11 @@
*/
public void setCallbackHandler(CallbackHandler handler) {
+ if (!isConfigured()) {
+ throw new IllegalStateException("Configuration is required");
+ }
+
// security check
-
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/en/GB/TimeZoneNames_en_GB.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/en/GB/TimeZoneNames_en_GB.java Mon Oct 12 14:41:36 2015 -0700
@@ -47,7 +47,8 @@
protected final Object[][] getContents() {
return new Object[][] {
{"Europe/London", new String[] {"Greenwich Mean Time", "GMT",
- "British Summer Time", "BST"}},
+ "British Summer Time", "BST",
+ "British Time", "BT"}},
};
}
}
--- a/jdk/src/jdk.localedata/share/classes/sun/util/resources/hi/TimeZoneNames_hi.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/util/resources/hi/TimeZoneNames_hi.java Mon Oct 12 14:41:36 2015 -0700
@@ -40,7 +40,8 @@
{"Asia/Calcutta",
new String[] {
"\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST",
- "\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST"
+ "\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST",
+ "\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IT"
}
},
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/StrictMath/FdlibmTranslit.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 1998, 2015, 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.
+ */
+
+/**
+ * A transliteration of the "Freely Distributable Math Library"
+ * algorithms from C into Java. That is, this port of the algorithms
+ * is as close to the C originals as possible while still being
+ * readable legal Java.
+ */
+public class FdlibmTranslit {
+ private FdlibmTranslit() {
+ throw new UnsupportedOperationException("No FdLibmTranslit instances for you.");
+ }
+
+ /**
+ * Return the low-order 32 bits of the double argument as an int.
+ */
+ private static int __LO(double x) {
+ long transducer = Double.doubleToRawLongBits(x);
+ return (int)transducer;
+ }
+
+ /**
+ * Return a double with its low-order bits of the second argument
+ * and the high-order bits of the first argument..
+ */
+ private static double __LO(double x, int low) {
+ long transX = Double.doubleToRawLongBits(x);
+ return Double.longBitsToDouble((transX & 0xFFFF_FFFF_0000_0000L)|low );
+ }
+
+ /**
+ * Return the high-order 32 bits of the double argument as an int.
+ */
+ private static int __HI(double x) {
+ long transducer = Double.doubleToRawLongBits(x);
+ return (int)(transducer >> 32);
+ }
+
+ /**
+ * Return a double with its high-order bits of the second argument
+ * and the low-order bits of the first argument..
+ */
+ private static double __HI(double x, int high) {
+ long transX = Double.doubleToRawLongBits(x);
+ return Double.longBitsToDouble((transX & 0x0000_0000_FFFF_FFFFL)|( ((long)high)) << 32 );
+ }
+
+ public static double hypot(double x, double y) {
+ return Hypot.compute(x, y);
+ }
+
+ /**
+ * hypot(x,y)
+ *
+ * Method :
+ * If (assume round-to-nearest) z = x*x + y*y
+ * has error less than sqrt(2)/2 ulp, than
+ * sqrt(z) has error less than 1 ulp (exercise).
+ *
+ * So, compute sqrt(x*x + y*y) with some care as
+ * follows to get the error below 1 ulp:
+ *
+ * Assume x > y > 0;
+ * (if possible, set rounding to round-to-nearest)
+ * 1. if x > 2y use
+ * x1*x1 + (y*y + (x2*(x + x1))) for x*x + y*y
+ * where x1 = x with lower 32 bits cleared, x2 = x - x1; else
+ * 2. if x <= 2y use
+ * t1*y1 + ((x-y) * (x-y) + (t1*y2 + t2*y))
+ * where t1 = 2x with lower 32 bits cleared, t2 = 2x - t1,
+ * y1= y with lower 32 bits chopped, y2 = y - y1.
+ *
+ * NOTE: scaling may be necessary if some argument is too
+ * large or too tiny
+ *
+ * Special cases:
+ * hypot(x,y) is INF if x or y is +INF or -INF; else
+ * hypot(x,y) is NAN if x or y is NAN.
+ *
+ * Accuracy:
+ * hypot(x,y) returns sqrt(x^2 + y^2) with error less
+ * than 1 ulps (units in the last place)
+ */
+ static class Hypot {
+ public static double compute(double x, double y) {
+ double a = x;
+ double b = y;
+ double t1, t2, y1, y2, w;
+ int j, k, ha, hb;
+
+ ha = __HI(x) & 0x7fffffff; // high word of x
+ hb = __HI(y) & 0x7fffffff; // high word of y
+ if(hb > ha) {
+ a = y;
+ b = x;
+ j = ha;
+ ha = hb;
+ hb = j;
+ } else {
+ a = x;
+ b = y;
+ }
+ a = __HI(a, ha); // a <- |a|
+ b = __HI(b, hb); // b <- |b|
+ if ((ha - hb) > 0x3c00000) {
+ return a + b; // x / y > 2**60
+ }
+ k=0;
+ if (ha > 0x5f300000) { // a>2**500
+ if (ha >= 0x7ff00000) { // Inf or NaN
+ w = a + b; // for sNaN
+ if (((ha & 0xfffff) | __LO(a)) == 0)
+ w = a;
+ if (((hb ^ 0x7ff00000) | __LO(b)) == 0)
+ w = b;
+ return w;
+ }
+ // scale a and b by 2**-600
+ ha -= 0x25800000;
+ hb -= 0x25800000;
+ k += 600;
+ a = __HI(a, ha);
+ b = __HI(b, hb);
+ }
+ if (hb < 0x20b00000) { // b < 2**-500
+ if (hb <= 0x000fffff) { // subnormal b or 0 */
+ if ((hb | (__LO(b))) == 0)
+ return a;
+ t1 = 0;
+ t1 = __HI(t1, 0x7fd00000); // t1=2^1022
+ b *= t1;
+ a *= t1;
+ k -= 1022;
+ } else { // scale a and b by 2^600
+ ha += 0x25800000; // a *= 2^600
+ hb += 0x25800000; // b *= 2^600
+ k -= 600;
+ a = __HI(a, ha);
+ b = __HI(b, hb);
+ }
+ }
+ // medium size a and b
+ w = a - b;
+ if (w > b) {
+ t1 = 0;
+ t1 = __HI(t1, ha);
+ t2 = a - t1;
+ w = Math.sqrt(t1*t1 - (b*(-b) - t2 * (a + t1)));
+ } else {
+ a = a + a;
+ y1 = 0;
+ y1 = __HI(y1, hb);
+ y2 = b - y1;
+ t1 = 0;
+ t1 = __HI(t1, ha + 0x00100000);
+ t2 = a - t1;
+ w = Math.sqrt(t1*y1 - (w*(-w) - (t1*y2 + t2*b)));
+ }
+ if (k != 0) {
+ t1 = 1.0;
+ int t1_hi = __HI(t1);
+ t1_hi += (k << 20);
+ t1 = __HI(t1, t1_hi);
+ return t1 * w;
+ } else
+ return w;
+ }
+ }
+}
--- a/jdk/test/java/lang/StrictMath/HypotTests.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/java/lang/StrictMath/HypotTests.java Mon Oct 12 14:41:36 2015 -0700
@@ -24,10 +24,19 @@
/*
* @test
* @bug 4851638
+ * @key randomness
* @summary Tests for StrictMath.hypot
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @build Tests
+ * @build FdlibmTranslit
+ * @build HypotTests
+ * @run main HypotTests
* @author Joseph D. Darcy
*/
+import jdk.testlibrary.RandomFactory;
+
/**
* The tests in ../Math/HypotTests.java test properties that should
* hold for any hypot implementation, including the FDLIBM-based one
@@ -42,6 +51,19 @@
public class HypotTests {
private HypotTests(){}
+ public static void main(String... args) {
+ int failures = 0;
+
+ failures += testHypot();
+ failures += testAgainstTranslit();
+
+ if (failures > 0) {
+ System.err.println("Testing hypot incurred "
+ + failures + " failures.");
+ throw new RuntimeException();
+ }
+ }
+
/**
* The hypot implementation is commutative, {@code hypot(a, b) ==
* hypot(b, a)}, and independent of sign, {@code hypot(a, b) ==
@@ -663,6 +685,12 @@
{0x1.0p-450, 0x1.fffffffffffffp-499, 0x1.0p-450},
{0x1.0000000000001p-450, 0x1.fffffffffffffp-499, 0x1.0000000000001p-450},
+ {0x1.00000_ffff_0000p500, 0x1.fffffffffffffp499, 0x1.6a09f1b837ccfp500},
+ {0x1.00000_0000_0001p500, 0x1.fffffffffffffp499, 0x1.6a09e667f3bcdp500},
+ {0x1.00000_ffff_ffffp500, 0x1.fffffffffffffp499, 0x1.6a09f1b8431d3p500},
+ {0x1.00001_0000_0000p500, 0x1.fffffffffffffp499, 0x1.6a09f1b8431d5p500},
+
+
// 0x1.0p-1022 is MIN_NORMAL
{0x1.0000000000001p-1022, 0x1.0000000000001p-1022, 0x1.6a09e667f3bcep-1022},
{0x1.0000000000001p-1022, 0x1.0p-1022, 0x1.6a09e667f3bcdp-1022},
@@ -686,15 +714,30 @@
return failures;
}
- public static void main(String... args) {
+ // Initialize shared random number generator
+ private static java.util.Random random = RandomFactory.getRandom();
+
+ /**
+ * Test StrictMath.hypot against transliteration port of hypot.
+ */
+ private static int testAgainstTranslit() {
int failures = 0;
-
- failures += testHypot();
+ double x = Tests.createRandomDouble(random);
+ double y = Tests.createRandomDouble(random);
- if (failures > 0) {
- System.err.println("Testing hypot incurred "
- + failures + " failures.");
- throw new RuntimeException();
+ // Make the increment twice the ulp value in case the random
+ // value is near an exponent threshold.
+ double increment_x = 2.0 * Math.ulp(x);
+ double increment_y = 2.0 * Math.ulp(y);
+
+ // Don't worry about x or y overflowing to infinity if their
+ // exponent is MAX_EXPONENT.
+ for (int i = 0; i < 200; i++, x += increment_x) {
+ for (int j = 0; j < 200; j++, y += increment_y) {
+ failures += testHypotCase(x, y, FdlibmTranslit.hypot(x, y));
+ }
}
+
+ return failures;
}
}
--- a/jdk/test/java/lang/StrictMath/Tests.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/java/lang/StrictMath/Tests.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -60,6 +60,16 @@
return 0;
}
-
+ /**
+ * Returns a double over the normalized range of floating-point values.
+ * @return a double over the normalized range of floating-point values
+ */
+ static double createRandomDouble(java.util.Random random) {
+ final int EXPONENT_RANGE = Double.MAX_EXPONENT - Double.MIN_EXPONENT + 1;
+ int targetExponent = Double.MIN_EXPONENT + random.nextInt(EXPONENT_RANGE + 1);
+ double tmp = random.nextDouble(); // Double in the range of [0.0, 1.0)
+ int tmpExponent = Math.getExponent(tmp);
+ return Math.scalb(tmp, targetExponent - tmpExponent);
+ }
}
--- a/jdk/test/java/rmi/registry/readTest/readTest.sh Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/java/rmi/registry/readTest/readTest.sh Mon Oct 12 14:41:36 2015 -0700
@@ -27,6 +27,7 @@
# @build TestLibrary
# @summary remove java.rmi.server.codebase property parsing from registyimpl
# @run shell readTest.sh
+# @key intermittent
OS=`uname -s`
VER=`uname -r`
--- a/jdk/test/java/security/PermissionCollection/AddToReadOnlyPermissionCollection.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/java/security/PermissionCollection/AddToReadOnlyPermissionCollection.java Mon Oct 12 14:41:36 2015 -0700
@@ -107,11 +107,11 @@
static void tryFilePC() throws Exception {
try {
- FilePermission p0 = new FilePermission("/home/foobar","read");
+ FilePermission p0 = new FilePermission("/tmp/foobar","read");
PermissionCollection pc = p0.newPermissionCollection();
pc.setReadOnly(); // this should lock out future adds
//
- FilePermission p1 = new FilePermission("/home/quux","read");
+ FilePermission p1 = new FilePermission("/tmp/quux","read");
pc.add(p1);
throw new
Exception("Failed...FilePermission added to readonly FilePermissionCollection.");
--- a/jdk/test/java/security/PermissionCollection/Concurrent.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/java/security/PermissionCollection/Concurrent.java Mon Oct 12 14:41:36 2015 -0700
@@ -166,9 +166,9 @@
new AllPermission(), new AllPermission()};
private static final Permission[] filep = new Permission[]{
- new FilePermission("/home/foobar", "read"),
- new FilePermission("/home/foo", "write"),
- new FilePermission("/home/foobar", "read,write"),
+ new FilePermission("/tmp/foobar", "read"),
+ new FilePermission("/tmp/foo", "write"),
+ new FilePermission("/tmp/foobar", "read,write"),
};
private static final Permission[] sockp = new Permission[]{
--- a/jdk/test/java/security/PermissionCollection/PermissionCollectionStreamTest.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/java/security/PermissionCollection/PermissionCollectionStreamTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -50,9 +50,9 @@
{
"FilePermission",
new Permission[]{
- new FilePermission("/home/foobar", "read"),
- new FilePermission("/home/foo", "write"),
- new FilePermission("/home/foobar", "read,write"),
+ new FilePermission("/tmp/foobar", "read"),
+ new FilePermission("/tmp/foo", "write"),
+ new FilePermission("/tmp/foobar", "read,write"),
}
},
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Objects/CheckIndex.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,219 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @summary IndexOutOfBoundsException check index tests
+ * @run testng CheckIndex
+ * @bug 8135248
+ */
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.function.BiConsumer;
+import java.util.function.BiFunction;
+import java.util.function.IntSupplier;
+
+import static org.testng.Assert.*;
+
+public class CheckIndex {
+
+ static class AssertingOutOfBoundsException extends RuntimeException {
+ }
+
+ static BiFunction<Integer, Integer, AssertingOutOfBoundsException> assertingOutOfBounds(
+ int expFromIndex, int expToIndexOrSizeOrLength) {
+ return (fromIndex, toIndexOrSizeorLength) -> {
+ assertEquals(fromIndex, Integer.valueOf(expFromIndex));
+ assertEquals(toIndexOrSizeorLength, Integer.valueOf(expToIndexOrSizeOrLength));
+ return new AssertingOutOfBoundsException();
+ };
+ }
+
+ static final int[] VALUES = {0, 1, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, -1, Integer.MIN_VALUE + 1, Integer.MIN_VALUE};
+
+ @DataProvider
+ static Object[][] checkIndexProvider() {
+ List<Object[]> l = new ArrayList<>();
+ for (int index : VALUES) {
+ for (int length : VALUES) {
+ boolean withinBounds = index >= 0 &&
+ length >= 0 &&
+ index < length;
+ l.add(new Object[]{index, length, withinBounds});
+ }
+ }
+ return l.toArray(new Object[0][0]);
+ }
+
+ interface X {
+ int apply(int a, int b, int c);
+ }
+
+ @Test(dataProvider = "checkIndexProvider")
+ public void testCheckIndex(int index, int length, boolean withinBounds) {
+ BiConsumer<Class<? extends RuntimeException>, IntSupplier> check = (ec, s) -> {
+ try {
+ int rIndex = s.getAsInt();
+ if (!withinBounds)
+ fail(String.format(
+ "Index %d is out of bounds of [0, %d), but was reported to be within bounds", index, length));
+ assertEquals(rIndex, index);
+ }
+ catch (RuntimeException e) {
+ assertTrue(ec.isInstance(e));
+ if (withinBounds)
+ fail(String.format(
+ "Index %d is within bounds of [0, %d), but was reported to be out of bounds", index, length));
+ }
+ };
+
+ check.accept(AssertingOutOfBoundsException.class,
+ () -> Objects.checkIndex(index, length, assertingOutOfBounds(index, length)));
+ check.accept(IndexOutOfBoundsException.class,
+ () -> Objects.checkIndex(index, length, null));
+ check.accept(IndexOutOfBoundsException.class,
+ () -> Objects.checkIndex(index, length));
+ }
+
+
+ @DataProvider
+ static Object[][] checkFromToIndexProvider() {
+ List<Object[]> l = new ArrayList<>();
+ for (int fromIndex : VALUES) {
+ for (int toIndex : VALUES) {
+ for (int length : VALUES) {
+ boolean withinBounds = fromIndex >= 0 &&
+ toIndex >= 0 &&
+ length >= 0 &&
+ fromIndex <= toIndex &&
+ toIndex <= length;
+ l.add(new Object[]{fromIndex, toIndex, length, withinBounds});
+ }
+ }
+ }
+ return l.toArray(new Object[0][0]);
+ }
+
+ @Test(dataProvider = "checkFromToIndexProvider")
+ public void testCheckFromToIndex(int fromIndex, int toIndex, int length, boolean withinBounds) {
+ BiConsumer<Class<? extends RuntimeException>, IntSupplier> check = (ec, s) -> {
+ try {
+ int rIndex = s.getAsInt();
+ if (!withinBounds)
+ fail(String.format(
+ "Range [%d, %d) is out of bounds of [0, %d), but was reported to be withing bounds", fromIndex, toIndex, length));
+ assertEquals(rIndex, fromIndex);
+ }
+ catch (RuntimeException e) {
+ assertTrue(ec.isInstance(e));
+ if (withinBounds)
+ fail(String.format(
+ "Range [%d, %d) is within bounds of [0, %d), but was reported to be out of bounds", fromIndex, toIndex, length));
+ }
+ };
+
+ check.accept(AssertingOutOfBoundsException.class,
+ () -> Objects.checkFromToIndex(fromIndex, toIndex, length, assertingOutOfBounds(fromIndex, toIndex)));
+ check.accept(IndexOutOfBoundsException.class,
+ () -> Objects.checkFromToIndex(fromIndex, toIndex, length, null));
+ check.accept(IndexOutOfBoundsException.class,
+ () -> Objects.checkFromToIndex(fromIndex, toIndex, length));
+ }
+
+
+ @DataProvider
+ static Object[][] checkFromIndexSizeProvider() {
+ List<Object[]> l = new ArrayList<>();
+ for (int fromIndex : VALUES) {
+ for (int size : VALUES) {
+ for (int length : VALUES) {
+ // Explicitly convert to long
+ long lFromIndex = fromIndex;
+ long lSize = size;
+ long lLength = length;
+ // Avoid overflow
+ long lToIndex = lFromIndex + lSize;
+
+ boolean withinBounds = lFromIndex >= 0L &&
+ lSize >= 0L &&
+ lLength >= 0L &&
+ lFromIndex <= lToIndex &&
+ lToIndex <= lLength;
+ l.add(new Object[]{fromIndex, size, length, withinBounds});
+ }
+ }
+ }
+ return l.toArray(new Object[0][0]);
+ }
+
+ @Test(dataProvider = "checkFromIndexSizeProvider")
+ public void testCheckFromIndexSize(int fromIndex, int size, int length, boolean withinBounds) {
+ BiConsumer<Class<? extends RuntimeException>, IntSupplier> check = (ec, s) -> {
+ try {
+ int rIndex = s.getAsInt();
+ if (!withinBounds)
+ fail(String.format(
+ "Range [%d, %d + %d) is out of bounds of [0, %d), but was reported to be withing bounds", fromIndex, fromIndex, size, length));
+ assertEquals(rIndex, fromIndex);
+ }
+ catch (RuntimeException e) {
+ assertTrue(ec.isInstance(e));
+ if (withinBounds)
+ fail(String.format(
+ "Range [%d, %d + %d) is within bounds of [0, %d), but was reported to be out of bounds", fromIndex, fromIndex, size, length));
+ }
+ };
+
+ check.accept(AssertingOutOfBoundsException.class,
+ () -> Objects.checkFromIndexSize(fromIndex, size, length, assertingOutOfBounds(fromIndex, size)));
+ check.accept(IndexOutOfBoundsException.class,
+ () -> Objects.checkFromIndexSize(fromIndex, size, length, null));
+ check.accept(IndexOutOfBoundsException.class,
+ () -> Objects.checkFromIndexSize(fromIndex, size, length));
+ }
+
+ @Test
+ public void checkIndexOutOfBoundsExceptionConstructors() {
+ BiConsumer<Class<? extends RuntimeException>, IntSupplier> check = (ec, s) -> {
+ try {
+ s.getAsInt();
+ fail("Runtime exception expected");
+ }
+ catch (RuntimeException e) {
+ assertTrue(ec.isInstance(e));
+ }
+ };
+
+ check.accept(IndexOutOfBoundsException.class,
+ () -> Objects.checkIndex(1, 0, IndexOutOfBoundsException::new));
+ check.accept(StringIndexOutOfBoundsException.class,
+ () -> Objects.checkIndex(1, 0, StringIndexOutOfBoundsException::new));
+ check.accept(ArrayIndexOutOfBoundsException.class,
+ () -> Objects.checkIndex(1, 0, ArrayIndexOutOfBoundsException::new));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexResetUpdate.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,548 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+import java.util.UUID;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.FileHandler;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests that FileHandlers configured on abstract nodes in logging.properties
+ * will be closed on reset and reopened on updateConfiguration().
+ * Test a complex reconfiguration where a logger with handlers
+ * suddenly appears in the hierarchy between a child logger and the
+ * root logger.
+ * @run main/othervm HandlersOnComplexResetUpdate UNSECURE
+ * @run main/othervm HandlersOnComplexResetUpdate SECURE
+ * @author danielfuchs
+ */
+public class HandlersOnComplexResetUpdate {
+
+ /**
+ * We will test the handling of abstract logger nodes with file handlers in
+ * two configurations:
+ * UNSECURE: No security manager.
+ * SECURE: With the security manager present - and the required
+ * permissions granted.
+ */
+ public static enum TestCase {
+ UNSECURE, SECURE;
+ public void run(List<Properties> properties) throws Exception {
+ System.out.println("Running test case: " + name());
+ Configure.setUp(this, properties.get(0));
+ test(this.name(), properties);
+ }
+ }
+
+
+ private static final String PREFIX =
+ "FileHandler-" + UUID.randomUUID() + ".log";
+ private static final String userDir = System.getProperty("user.dir", ".");
+ private static final boolean userDirWritable = Files.isWritable(Paths.get(userDir));
+
+ private static final List<Properties> properties;
+ static {
+ // The test will call reset() and updateConfiguration() with each of these
+ // properties in sequence. The child logger is not released between each
+ // configuration. What is interesting here is mostly what happens between
+ // props4 and props5:
+ //
+ // In step 4 (props4) the configuration defines a handler for the
+ // logger com.foo (the direct parent of com.foo.child - which is the
+ // logger we hold on to).
+ //
+ // In step 5 (props5) the configuration has nothing concerning
+ // 'com.foo', but the handler has been migrated to 'com'.
+ // Since there doesn't exist any logger for 'com' (the previous
+ // configuration didn't have any configuration for 'com'), then
+ // 'com' will not be found when we process the existing loggers named
+ // in the configuration.
+ //
+ // So if we didn't also process the existing loggers not named in the
+ // configuration (such as com.foo.child) then no logger for 'com'
+ // would be created, which means that com.foo.child would not be
+ // able to inherit its configuration for 'com' until someone explicitely
+ // creates a logger for 'com'.
+ //
+ // This test check that a logger for 'com' will be created because
+ // 'com.foo.child' still exists when updateConfiguration() is called.
+
+ Properties props1 = new Properties();
+ props1.setProperty("test.name", "parent logger with handler");
+ props1.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props1.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props1.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props1.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props1.setProperty("com.foo.handlers", FileHandler.class.getName());
+ props1.setProperty("test.checkHandlersOnParent", "true");
+ props1.setProperty("test.checkHandlersOn", "com.foo");
+ props1.setProperty("com.bar.level", "FINEST");
+
+ Properties props2 = new Properties();
+ props2.setProperty("java.util.logging.LogManager.reconfigureHandlers", "true");
+ props2.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props2.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props2.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props2.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props2.setProperty("com.foo.handlers", FileHandler.class.getName());
+ props2.setProperty("test.checkHandlersOnParent", "true");
+ props2.setProperty("test.checkHandlersOn", "com.foo");
+ props2.setProperty("com.bar.level", "FINEST");
+
+ Properties props3 = new Properties();
+ props3.setProperty("test.name", "parent logger with handler");
+ props3.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props3.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props3.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props3.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props3.setProperty("com.foo.handlers", FileHandler.class.getName());
+ props3.setProperty("test.checkHandlersOnParent", "true");
+ props3.setProperty("test.checkHandlersOn", "com.foo");
+ props3.setProperty("com.bar.level", "FINEST");
+
+ Properties props4 = new Properties();
+ props4.setProperty("java.util.logging.LogManager.reconfigureHandlers", "true");
+ props4.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props4.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props4.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props4.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props4.setProperty("test.checkHandlersOnParent", "true");
+ props4.setProperty("test.checkHandlersOn", "com.foo");
+ props4.setProperty("com.foo.handlers", FileHandler.class.getName());
+
+ Properties props5 = new Properties();
+ props5.setProperty("test.name", "parent logger with handler");
+ props5.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props5.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props5.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props5.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props5.setProperty("test.checkHandlersOnParent", "false");
+ props5.setProperty("test.checkHandlersOn", "com");
+ props5.setProperty("com.handlers", FileHandler.class.getName());
+
+ properties = Collections.unmodifiableList(Arrays.asList(
+ props1, props2, props3, props4, props5));
+ }
+
+ /**
+ * This is the main test method. The rest is infrastructure.
+ * Creates a child of the 'com.foo' logger (com.foo.child) and holds on to
+ * it.
+ * <p>
+ * Then applies all given configurations in sequence and verifies assumptions
+ * about the handlers that com.foo should have, or not have.
+ * In the last configuration (props5) it also verifies that the
+ * logger 'com' has been created and has now the expected handler.
+ * <p>
+ * Finally releases the child logger after all configurations have been
+ * applied.
+ *
+ * @param name
+ * @param properties
+ * @throws Exception
+ */
+ static void test(String name, List<Properties> properties)
+ throws Exception {
+
+ System.out.println("\nTesting: " + name);
+ if (!userDirWritable) {
+ throw new RuntimeException("Not writable: "+userDir);
+ }
+
+ // Then create a child of the com.foo logger.
+ Logger fooChild = Logger.getLogger("com.foo.child");
+ fooChild.info("hello world");
+ Logger barChild = Logger.getLogger("com.bar.child");
+ barChild.info("hello world");
+
+ ReferenceQueue<Logger> queue = new ReferenceQueue();
+ WeakReference<Logger> fooRef = new WeakReference<>(Logger.getLogger("com.foo"), queue);
+ if (fooRef.get() != fooChild.getParent()) {
+ throw new RuntimeException("Unexpected parent logger: "
+ + fooChild.getParent() +"\n\texpected: " + fooRef.get());
+ }
+ WeakReference<Logger> barRef = new WeakReference<>(Logger.getLogger("com.bar"), queue);
+ if (barRef.get() != barChild.getParent()) {
+ throw new RuntimeException("Unexpected parent logger: "
+ + barChild.getParent() +"\n\texpected: " + barRef.get());
+ }
+ Reference<? extends Logger> ref2;
+ int max = 3;
+ barChild = null;
+ while ((ref2 = queue.poll()) == null) {
+ System.gc();
+ Thread.sleep(100);
+ if (--max == 0) break;
+ }
+
+ Throwable failed = null;
+ try {
+ if (ref2 != null) {
+ String refName = ref2 == fooRef ? "fooRef" : ref2 == barRef ? "barRef" : "unknown";
+ if (ref2 != barRef) {
+ throw new RuntimeException("Unexpected logger reference cleared: " + refName);
+ } else {
+ System.out.println("Reference " + refName + " cleared as expected");
+ }
+ } else if (ref2 == null) {
+ throw new RuntimeException("Expected 'barRef' to be cleared");
+ }
+ // Now lets try to reset, check that ref2 has no handlers, and
+ // attempt to configure again.
+ Properties previousProps = properties.get(0);
+ int expectedHandlersCount = 1;
+ boolean checkHandlersOnParent = Boolean.parseBoolean(
+ previousProps.getProperty("test.checkHandlersOnParent", "true"));
+ String checkHandlersOn = previousProps.getProperty("test.checkHandlersOn", null);
+ for (int i=1; i<properties.size(); i++) {
+ System.out.println("\n*** Reconfiguration with properties["+i+"]\n");
+ Properties nextProps = properties.get(i);
+ boolean reconfigureHandlers = true;
+
+ if (checkHandlersOnParent) {
+ assertEquals(expectedHandlersCount,
+ fooChild.getParent().getHandlers().length,
+ "fooChild.getParent().getHandlers().length");
+ }
+ if (checkHandlersOn != null) {
+ Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+ if (loggerWithHandlers == null) {
+ throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+ }
+ assertEquals(expectedHandlersCount,
+ loggerWithHandlers.getHandlers().length,
+ checkHandlersOn + ".getHandlers().length");
+ }
+
+ // Reset
+ Configure.doPrivileged(() -> LogManager.getLogManager().reset());
+ assertEquals(0, fooChild.getParent().getHandlers().length, "fooChild.getParent().getHandlers().length");
+ if (checkHandlersOn != null) {
+ Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+ if (loggerWithHandlers == null) {
+ throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+ }
+ assertEquals(0, loggerWithHandlers.getHandlers().length,
+ checkHandlersOn + ".getHandlers().length");
+ }
+
+ if (i == 4) {
+ System.out.println("Last configuration...");
+ }
+ // Read configuration
+ Configure.doPrivileged(() -> Configure.updateConfigurationWith(nextProps, false));
+
+ expectedHandlersCount = reconfigureHandlers ? 1 : 0;
+ checkHandlersOnParent = Boolean.parseBoolean(
+ nextProps.getProperty("test.checkHandlersOnParent", "true"));
+ checkHandlersOn = nextProps.getProperty("test.checkHandlersOn", null);
+
+ if (checkHandlersOnParent) {
+ assertEquals(expectedHandlersCount,
+ fooChild.getParent().getHandlers().length,
+ "fooChild.getParent().getHandlers().length");
+ } else {
+ assertEquals(0,
+ fooChild.getParent().getHandlers().length,
+ "fooChild.getParent().getHandlers().length");
+ }
+ if (checkHandlersOn != null) {
+ Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+ if (loggerWithHandlers == null) {
+ throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+ }
+ assertEquals(expectedHandlersCount,
+ loggerWithHandlers.getHandlers().length,
+ checkHandlersOn + ".getHandlers().length");
+ }
+ }
+ } catch (Throwable t) {
+ failed = t;
+ } finally {
+ final Throwable suppressed = failed;
+ Configure.doPrivileged(() -> LogManager.getLogManager().reset());
+ Configure.doPrivileged(() -> {
+ try {
+ StringBuilder builder = new StringBuilder();
+ Files.list(Paths.get(userDir))
+ .filter((f) -> f.toString().contains(PREFIX))
+ .filter((f) -> f.toString().endsWith(".lck"))
+ .forEach((f) -> {
+ builder.append(f.toString()).append('\n');
+ });
+ if (!builder.toString().isEmpty()) {
+ throw new RuntimeException("Lock files not cleaned:\n"
+ + builder.toString());
+ }
+ } catch(RuntimeException | Error x) {
+ if (suppressed != null) x.addSuppressed(suppressed);
+ throw x;
+ } catch(Exception x) {
+ if (suppressed != null) x.addSuppressed(suppressed);
+ throw new RuntimeException(x);
+ }
+ });
+ fooChild = null;
+ System.out.println("Setting fooChild to: " + fooChild);
+ while ((ref2 = queue.poll()) == null) {
+ System.gc();
+ Thread.sleep(1000);
+ }
+ if (ref2 != fooRef) {
+ throw new RuntimeException("Unexpected reference: "
+ + ref2 +"\n\texpected: " + fooRef);
+ }
+ if (ref2.get() != null) {
+ throw new RuntimeException("Referent not cleared: " + ref2.get());
+ }
+ System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
+
+ }
+ if (failed != null) {
+ // should rarely happen...
+ throw new RuntimeException(failed);
+ }
+
+ }
+
+ public static void main(String... args) throws Exception {
+
+
+ if (args == null || args.length == 0) {
+ args = new String[] {
+ TestCase.UNSECURE.name(),
+ TestCase.SECURE.name(),
+ };
+ }
+
+ try {
+ for (String testName : args) {
+ TestCase test = TestCase.valueOf(testName);
+ test.run(properties);
+ }
+ } finally {
+ if (userDirWritable) {
+ Configure.doPrivileged(() -> {
+ // cleanup - delete files that have been created
+ try {
+ Files.list(Paths.get(userDir))
+ .filter((f) -> f.toString().contains(PREFIX))
+ .forEach((f) -> {
+ try {
+ System.out.println("deleting " + f);
+ Files.delete(f);
+ } catch(Throwable t) {
+ System.err.println("Failed to delete " + f + ": " + t);
+ }
+ });
+ } catch(Throwable t) {
+ System.err.println("Cleanup failed to list files: " + t);
+ t.printStackTrace();
+ }
+ });
+ }
+ }
+ }
+
+ static class Configure {
+ static Policy policy = null;
+ static final ThreadLocal<AtomicBoolean> allowAll = new ThreadLocal<AtomicBoolean>() {
+ @Override
+ protected AtomicBoolean initialValue() {
+ return new AtomicBoolean(false);
+ }
+ };
+ static void setUp(TestCase test, Properties propertyFile) {
+ switch (test) {
+ case SECURE:
+ if (policy == null && System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ } else if (policy == null) {
+ policy = new SimplePolicy(TestCase.SECURE, allowAll);
+ Policy.setPolicy(policy);
+ System.setSecurityManager(new SecurityManager());
+ }
+ if (System.getSecurityManager() == null) {
+ throw new IllegalStateException("No SecurityManager.");
+ }
+ if (policy == null) {
+ throw new IllegalStateException("policy not configured");
+ }
+ break;
+ case UNSECURE:
+ if (System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ }
+ break;
+ default:
+ new InternalError("No such testcase: " + test);
+ }
+ doPrivileged(() -> {
+ updateConfigurationWith(propertyFile, false);
+ });
+ }
+
+ static void updateConfigurationWith(Properties propertyFile, boolean append) {
+ try {
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+ Function<String, BiFunction<String,String,String>> remapper =
+ append ? (x) -> ((o, n) -> n == null ? o : n)
+ : (x) -> ((o, n) -> n);
+ LogManager.getLogManager().updateConfiguration(bais, remapper);
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ static void doPrivileged(Runnable run) {
+ final boolean old = allowAll.get().getAndSet(true);
+ try {
+ run.run();
+ } finally {
+ allowAll.get().set(old);
+ }
+ }
+ static <T> T callPrivileged(Callable<T> call) throws Exception {
+ final boolean old = allowAll.get().getAndSet(true);
+ try {
+ return call.call();
+ } finally {
+ allowAll.get().set(old);
+ }
+ }
+ }
+
+ @FunctionalInterface
+ public static interface FileHandlerSupplier {
+ public FileHandler test() throws Exception;
+ }
+
+ static final class TestAssertException extends RuntimeException {
+ TestAssertException(String msg) {
+ super(msg);
+ }
+ }
+
+ private static void assertEquals(long expected, long received, String msg) {
+ if (expected != received) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ final static class PermissionsBuilder {
+ final Permissions perms;
+ public PermissionsBuilder() {
+ this(new Permissions());
+ }
+ public PermissionsBuilder(Permissions perms) {
+ this.perms = perms;
+ }
+ public PermissionsBuilder add(Permission p) {
+ perms.add(p);
+ return this;
+ }
+ public PermissionsBuilder addAll(PermissionCollection col) {
+ if (col != null) {
+ for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+ perms.add(e.nextElement());
+ }
+ }
+ return this;
+ }
+ public Permissions toPermissions() {
+ final PermissionsBuilder builder = new PermissionsBuilder();
+ builder.addAll(perms);
+ return builder.perms;
+ }
+ }
+
+ public static class SimplePolicy extends Policy {
+
+ final Permissions permissions;
+ final Permissions allPermissions;
+ final ThreadLocal<AtomicBoolean> allowAll; // actually: this should be in a thread locale
+ public SimplePolicy(TestCase test, ThreadLocal<AtomicBoolean> allowAll) {
+ this.allowAll = allowAll;
+ permissions = new Permissions();
+ permissions.add(new LoggingPermission("control", null));
+ permissions.add(new FilePermission(PREFIX+".lck", "read,write,delete"));
+ permissions.add(new FilePermission(PREFIX, "read,write"));
+
+ // these are used for configuring the test itself...
+ allPermissions = new Permissions();
+ allPermissions.add(new java.security.AllPermission());
+
+ }
+
+ @Override
+ public boolean implies(ProtectionDomain domain, Permission permission) {
+ if (allowAll.get().get()) return allPermissions.implies(permission);
+ return permissions.implies(permission);
+ }
+
+ @Override
+ public PermissionCollection getPermissions(CodeSource codesource) {
+ return new PermissionsBuilder().addAll(allowAll.get().get()
+ ? allPermissions : permissions).toPermissions();
+ }
+
+ @Override
+ public PermissionCollection getPermissions(ProtectionDomain domain) {
+ return new PermissionsBuilder().addAll(allowAll.get().get()
+ ? allPermissions : permissions).toPermissions();
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/HandlersOnComplexUpdate.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,547 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+import java.util.UUID;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.FileHandler;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests that FileHandlers configured on abstract nodes in logging.properties
+ * will be properly closed and reopened on updateConfiguration().
+ * Test a complex reconfiguration where a logger with handlers
+ * suddenly appears in the hierarchy between a child logger and the
+ * root logger.
+ * @run main/othervm HandlersOnComplexUpdate UNSECURE
+ * @run main/othervm HandlersOnComplexUpdate SECURE
+ * @author danielfuchs
+ */
+public class HandlersOnComplexUpdate {
+
+ /**
+ * We will test the handling of abstract logger nodes with file handlers in
+ * two configurations:
+ * UNSECURE: No security manager.
+ * SECURE: With the security manager present - and the required
+ * permissions granted.
+ */
+ public static enum TestCase {
+ UNSECURE, SECURE;
+ public void run(List<Properties> properties) throws Exception {
+ System.out.println("Running test case: " + name());
+ Configure.setUp(this, properties.get(0));
+ test(this.name(), properties);
+ }
+ }
+
+
+ private static final String PREFIX =
+ "FileHandler-" + UUID.randomUUID() + ".log";
+ private static final String userDir = System.getProperty("user.dir", ".");
+ private static final boolean userDirWritable = Files.isWritable(Paths.get(userDir));
+
+ private static final List<Properties> properties;
+ static {
+ // The test will call updateConfiguration() with each of these
+ // properties in sequence. The child logger is not released between each
+ // configuration. What is interesting here is mostly what happens between
+ // props4 and props5:
+ //
+ // In step 4 (props4) the configuration defines a handler for the
+ // logger com.foo (the direct parent of com.foo.child - which is the
+ // logger we hold on to).
+ //
+ // In step 5 (props5) the configuration has nothing concerning
+ // 'com.foo', but the handler has been migrated to 'com'.
+ // Since there doesn't exist any logger for 'com' (the previous
+ // configuration didn't have any configuration for 'com'), then
+ // 'com' will not be found when we process the existing loggers named
+ // in the configuration.
+ //
+ // So if we didn't also process the existing loggers not named in the
+ // configuration (such as com.foo.child) then no logger for 'com'
+ // would be created, which means that com.foo.child would not be
+ // able to inherit its configuration for 'com' until someone explicitely
+ // creates a logger for 'com'.
+ //
+ // This test check that a logger for 'com' will be created because
+ // 'com.foo.child' still exists when updateConfiguration() is called.
+
+ Properties props1 = new Properties();
+ props1.setProperty("test.name", "parent logger with handler");
+ props1.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props1.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props1.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props1.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props1.setProperty("com.foo.handlers", FileHandler.class.getName());
+ props1.setProperty("test.checkHandlersOnParent", "true");
+ props1.setProperty("test.checkHandlersOn", "com.foo");
+ props1.setProperty("com.bar.level", "FINEST");
+
+ Properties props2 = new Properties();
+ props2.setProperty("test.name", "parent logger with handler");
+ props2.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props2.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props2.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props2.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props2.setProperty("com.foo.handlers", FileHandler.class.getName());
+ props2.setProperty("test.checkHandlersOnParent", "true");
+ props2.setProperty("test.checkHandlersOn", "com.foo");
+ props2.setProperty("com.bar.level", "FINEST");
+
+ Properties props3 = new Properties();
+ props3.setProperty("test.name", "parent logger with handler");
+ props3.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props3.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props3.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props3.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props3.setProperty("com.foo.handlers", FileHandler.class.getName());
+ props3.setProperty("test.checkHandlersOnParent", "true");
+ props3.setProperty("test.checkHandlersOn", "com.foo");
+ props3.setProperty("com.bar.level", "FINEST");
+
+ Properties props4 = new Properties();
+ props4.setProperty("test.name", "parent logger with handler");
+ props4.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props4.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props4.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props4.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props4.setProperty("test.checkHandlersOnParent", "true");
+ props4.setProperty("test.checkHandlersOn", "com.foo");
+ props4.setProperty("com.foo.handlers", FileHandler.class.getName());
+
+ Properties props5 = new Properties();
+ props5.setProperty("test.name", "parent logger with handler");
+ props5.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props5.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props5.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props5.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props5.setProperty("test.checkHandlersOnParent", "false");
+ props5.setProperty("test.checkHandlersOn", "com");
+ props5.setProperty("com.handlers", FileHandler.class.getName());
+
+ properties = Collections.unmodifiableList(Arrays.asList(
+ props1, props2, props3, props4, props5));
+ }
+
+ /**
+ * This is the main test method. The rest is infrastructure.
+ * Creates a child of the 'com.foo' logger (com.foo.child) and holds on to
+ * it.
+ * <p>
+ * Then applies all given configurations in sequence and verifies assumptions
+ * about the handlers that com.foo should have, or not have.
+ * In the last configuration (props5) it also verifies that the
+ * logger 'com' has been created and has now the expected handler.
+ * <p>
+ * Finally releases the child logger after all configurations have been
+ * applied.
+ *
+ * @param name
+ * @param properties
+ * @throws Exception
+ */
+ static void test(String name, List<Properties> properties)
+ throws Exception {
+
+ System.out.println("\nTesting: " + name);
+ if (!userDirWritable) {
+ throw new RuntimeException("Not writable: "+userDir);
+ }
+
+ // Then create a child of the com.foo logger.
+ Logger fooChild = Logger.getLogger("com.foo.child");
+ fooChild.info("hello world");
+ Logger barChild = Logger.getLogger("com.bar.child");
+ barChild.info("hello world");
+
+ ReferenceQueue<Logger> queue = new ReferenceQueue();
+ WeakReference<Logger> fooRef = new WeakReference<>(Logger.getLogger("com.foo"), queue);
+ if (fooRef.get() != fooChild.getParent()) {
+ throw new RuntimeException("Unexpected parent logger: "
+ + fooChild.getParent() +"\n\texpected: " + fooRef.get());
+ }
+ WeakReference<Logger> barRef = new WeakReference<>(Logger.getLogger("com.bar"), queue);
+ if (barRef.get() != barChild.getParent()) {
+ throw new RuntimeException("Unexpected parent logger: "
+ + barChild.getParent() +"\n\texpected: " + barRef.get());
+ }
+ Reference<? extends Logger> ref2;
+ int max = 3;
+ barChild = null;
+ while ((ref2 = queue.poll()) == null) {
+ System.gc();
+ Thread.sleep(100);
+ if (--max == 0) break;
+ }
+
+ Throwable failed = null;
+ try {
+ if (ref2 != null) {
+ String refName = ref2 == fooRef ? "fooRef" : ref2 == barRef ? "barRef" : "unknown";
+ if (ref2 != barRef) {
+ throw new RuntimeException("Unexpected logger reference cleared: " + refName);
+ } else {
+ System.out.println("Reference " + refName + " cleared as expected");
+ }
+ } else if (ref2 == null) {
+ throw new RuntimeException("Expected 'barRef' to be cleared");
+ }
+ // Now lets try to check handlers, and
+ // attempt to update the configuration again.
+ Properties previousProps = properties.get(0);
+ int expectedHandlersCount = 1;
+ boolean checkHandlersOnParent = Boolean.parseBoolean(
+ previousProps.getProperty("test.checkHandlersOnParent", "true"));
+ String checkHandlersOn = previousProps.getProperty("test.checkHandlersOn", null);
+ for (int i=1; i<properties.size(); i++) {
+ System.out.println("\n*** Reconfiguration with properties["+i+"]\n");
+ Properties nextProps = properties.get(i);
+ boolean reconfigureHandlers = true;
+
+ if (checkHandlersOnParent) {
+ assertEquals(expectedHandlersCount,
+ fooChild.getParent().getHandlers().length,
+ "fooChild.getParent().getHandlers().length");
+ }
+ if (checkHandlersOn != null) {
+ Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+ if (loggerWithHandlers == null) {
+ throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+ }
+ assertEquals(expectedHandlersCount,
+ loggerWithHandlers.getHandlers().length,
+ checkHandlersOn + ".getHandlers().length");
+ }
+
+ if (i == 4) {
+ System.out.println("Last configuration...");
+ }
+ // Read configuration
+ Configure.doPrivileged(() -> Configure.updateConfigurationWith(nextProps, false));
+
+ expectedHandlersCount = reconfigureHandlers ? 1 : 0;
+ checkHandlersOnParent = Boolean.parseBoolean(
+ nextProps.getProperty("test.checkHandlersOnParent", "true"));
+ checkHandlersOn = nextProps.getProperty("test.checkHandlersOn", null);
+
+ if (checkHandlersOnParent) {
+ assertEquals(expectedHandlersCount,
+ fooChild.getParent().getHandlers().length,
+ "fooChild.getParent().getHandlers().length");
+ } else {
+ assertEquals(0,
+ fooChild.getParent().getHandlers().length,
+ "fooChild.getParent().getHandlers().length");
+ }
+ if (checkHandlersOn != null) {
+ Logger loggerWithHandlers = LogManager.getLogManager().getLogger(checkHandlersOn);
+ if (loggerWithHandlers == null) {
+ throw new RuntimeException("Logger with handlers not found: " + checkHandlersOn);
+ }
+ assertEquals(expectedHandlersCount,
+ loggerWithHandlers.getHandlers().length,
+ checkHandlersOn + ".getHandlers().length");
+ }
+ }
+ } catch (Throwable t) {
+ failed = t;
+ } finally {
+ final Throwable suppressed = failed;
+ Configure.doPrivileged(() -> LogManager.getLogManager().reset());
+ Configure.doPrivileged(() -> {
+ try {
+ StringBuilder builder = new StringBuilder();
+ Files.list(Paths.get(userDir))
+ .filter((f) -> f.toString().contains(PREFIX))
+ .filter((f) -> f.toString().endsWith(".lck"))
+ .forEach((f) -> {
+ builder.append(f.toString()).append('\n');
+ });
+ if (!builder.toString().isEmpty()) {
+ throw new RuntimeException("Lock files not cleaned:\n"
+ + builder.toString());
+ }
+ } catch(RuntimeException | Error x) {
+ if (suppressed != null) x.addSuppressed(suppressed);
+ throw x;
+ } catch(Exception x) {
+ if (suppressed != null) x.addSuppressed(suppressed);
+ throw new RuntimeException(x);
+ }
+ });
+ fooChild = null;
+ System.out.println("Setting fooChild to: " + fooChild);
+ while ((ref2 = queue.poll()) == null) {
+ System.gc();
+ Thread.sleep(1000);
+ }
+ if (ref2 != fooRef) {
+ throw new RuntimeException("Unexpected reference: "
+ + ref2 +"\n\texpected: " + fooRef);
+ }
+ if (ref2.get() != null) {
+ throw new RuntimeException("Referent not cleared: " + ref2.get());
+ }
+ System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
+
+ }
+ if (failed != null) {
+ // should rarely happen...
+ throw new RuntimeException(failed);
+ }
+
+ }
+
+ public static void main(String... args) throws Exception {
+
+
+ if (args == null || args.length == 0) {
+ args = new String[] {
+ TestCase.UNSECURE.name(),
+ TestCase.SECURE.name(),
+ };
+ }
+
+ try {
+ for (String testName : args) {
+ TestCase test = TestCase.valueOf(testName);
+ test.run(properties);
+ }
+ } finally {
+ if (userDirWritable) {
+ Configure.doPrivileged(() -> {
+ // cleanup - delete files that have been created
+ try {
+ Files.list(Paths.get(userDir))
+ .filter((f) -> f.toString().contains(PREFIX))
+ .forEach((f) -> {
+ try {
+ System.out.println("deleting " + f);
+ Files.delete(f);
+ } catch(Throwable t) {
+ System.err.println("Failed to delete " + f + ": " + t);
+ }
+ });
+ } catch(Throwable t) {
+ System.err.println("Cleanup failed to list files: " + t);
+ t.printStackTrace();
+ }
+ });
+ }
+ }
+ }
+
+ static class Configure {
+ static Policy policy = null;
+ static final ThreadLocal<AtomicBoolean> allowAll = new ThreadLocal<AtomicBoolean>() {
+ @Override
+ protected AtomicBoolean initialValue() {
+ return new AtomicBoolean(false);
+ }
+ };
+ static void setUp(TestCase test, Properties propertyFile) {
+ switch (test) {
+ case SECURE:
+ if (policy == null && System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ } else if (policy == null) {
+ policy = new SimplePolicy(TestCase.SECURE, allowAll);
+ Policy.setPolicy(policy);
+ System.setSecurityManager(new SecurityManager());
+ }
+ if (System.getSecurityManager() == null) {
+ throw new IllegalStateException("No SecurityManager.");
+ }
+ if (policy == null) {
+ throw new IllegalStateException("policy not configured");
+ }
+ break;
+ case UNSECURE:
+ if (System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ }
+ break;
+ default:
+ new InternalError("No such testcase: " + test);
+ }
+ doPrivileged(() -> {
+ configureWith(propertyFile);
+ });
+ }
+
+ static void configureWith(Properties propertyFile) {
+ try {
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+ LogManager.getLogManager().readConfiguration(bais);
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ static void updateConfigurationWith(Properties propertyFile, boolean append) {
+ try {
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+ Function<String, BiFunction<String,String,String>> remapper =
+ append ? (x) -> ((o, n) -> n == null ? o : n)
+ : (x) -> ((o, n) -> n);
+ LogManager.getLogManager().updateConfiguration(bais, remapper);
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ static void doPrivileged(Runnable run) {
+ final boolean old = allowAll.get().getAndSet(true);
+ try {
+ run.run();
+ } finally {
+ allowAll.get().set(old);
+ }
+ }
+ static <T> T callPrivileged(Callable<T> call) throws Exception {
+ final boolean old = allowAll.get().getAndSet(true);
+ try {
+ return call.call();
+ } finally {
+ allowAll.get().set(old);
+ }
+ }
+ }
+
+ @FunctionalInterface
+ public static interface FileHandlerSupplier {
+ public FileHandler test() throws Exception;
+ }
+
+ static final class TestAssertException extends RuntimeException {
+ TestAssertException(String msg) {
+ super(msg);
+ }
+ }
+
+ private static void assertEquals(long expected, long received, String msg) {
+ if (expected != received) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ final static class PermissionsBuilder {
+ final Permissions perms;
+ public PermissionsBuilder() {
+ this(new Permissions());
+ }
+ public PermissionsBuilder(Permissions perms) {
+ this.perms = perms;
+ }
+ public PermissionsBuilder add(Permission p) {
+ perms.add(p);
+ return this;
+ }
+ public PermissionsBuilder addAll(PermissionCollection col) {
+ if (col != null) {
+ for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+ perms.add(e.nextElement());
+ }
+ }
+ return this;
+ }
+ public Permissions toPermissions() {
+ final PermissionsBuilder builder = new PermissionsBuilder();
+ builder.addAll(perms);
+ return builder.perms;
+ }
+ }
+
+ public static class SimplePolicy extends Policy {
+
+ final Permissions permissions;
+ final Permissions allPermissions;
+ final ThreadLocal<AtomicBoolean> allowAll; // actually: this should be in a thread locale
+ public SimplePolicy(TestCase test, ThreadLocal<AtomicBoolean> allowAll) {
+ this.allowAll = allowAll;
+ permissions = new Permissions();
+ permissions.add(new LoggingPermission("control", null));
+ permissions.add(new FilePermission(PREFIX+".lck", "read,write,delete"));
+ permissions.add(new FilePermission(PREFIX, "read,write"));
+
+ // these are used for configuring the test itself...
+ allPermissions = new Permissions();
+ allPermissions.add(new java.security.AllPermission());
+
+ }
+
+ @Override
+ public boolean implies(ProtectionDomain domain, Permission permission) {
+ if (allowAll.get().get()) return allPermissions.implies(permission);
+ return permissions.implies(permission);
+ }
+
+ @Override
+ public PermissionCollection getPermissions(CodeSource codesource) {
+ return new PermissionsBuilder().addAll(allowAll.get().get()
+ ? allPermissions : permissions).toPermissions();
+ }
+
+ @Override
+ public PermissionCollection getPermissions(ProtectionDomain domain) {
+ return new PermissionsBuilder().addAll(allowAll.get().get()
+ ? allPermissions : permissions).toPermissions();
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/SimpleUpdateConfigWithInputStreamTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,685 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests LogManager.updateConfiguration(InputStream, Function) method
+ * @run main/othervm SimpleUpdateConfigWithInputStreamTest UNSECURE
+ * @run main/othervm SimpleUpdateConfigWithInputStreamTest SECURE
+ * @author danielfuchs
+ */
+public class SimpleUpdateConfigWithInputStreamTest {
+
+ /**
+ * We will test updateConfiguration in
+ * two configurations:
+ * UNSECURE: No security manager.
+ * SECURE: With the security manager present - and the required
+ * permissions granted.
+ */
+ public static enum TestCase {
+ UNSECURE, SECURE;
+ public void execute(Runnable run) {
+ System.out.println("Running test case: " + name());
+ try {
+ Configure.setUp(this);
+ Configure.doPrivileged(run, SimplePolicy.allowControl);
+ } finally {
+ Configure.doPrivileged(() -> {
+ try {
+ setSystemProperty("java.util.logging.config.file", null);
+ LogManager.getLogManager().readConfiguration();
+ System.gc();
+ } catch (Exception x) {
+ throw new RuntimeException(x);
+ }
+ }, SimplePolicy.allowAll);
+ }
+ }
+ }
+
+ public static class MyHandler extends Handler {
+ static final AtomicLong seq = new AtomicLong();
+ long count = seq.incrementAndGet();
+
+ @Override
+ public void publish(LogRecord record) {
+ }
+
+ @Override
+ public void flush() {
+ }
+
+ @Override
+ public void close() throws SecurityException {
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + "("+count+")";
+ }
+
+ }
+
+ static String storePropertyToFile(String name, Properties props)
+ throws Exception {
+ return Configure.callPrivileged(() -> {
+ String scratch = System.getProperty("user.dir", ".");
+ Path p = Paths.get(scratch, name);
+ try (FileOutputStream fos = new FileOutputStream(p.toFile())) {
+ props.store(fos, name);
+ }
+ return p.toString();
+ }, SimplePolicy.allowAll);
+ }
+
+ static void setSystemProperty(String name, String value)
+ throws Exception {
+ Configure.doPrivileged(() -> {
+ if (value == null)
+ System.clearProperty(name);
+ else
+ System.setProperty(name, value);
+ }, SimplePolicy.allowAll);
+ }
+
+ static String trim(String value) {
+ return value == null ? null : value.trim();
+ }
+
+
+ /**
+ * Tests one of the configuration defined above.
+ * <p>
+ * This is the main test method (the rest is infrastructure).
+ */
+ static void testUpdateConfiguration() {
+ try {
+ // manager initialized with default configuration.
+ LogManager manager = LogManager.getLogManager();
+
+ // Test default configuration. It should not have
+ // any value for "com.foo.level" and "com.foo.handlers"
+ assertEquals(null, manager.getProperty("com.foo.level"),
+ "com.foo.level in default configuration");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in default configuration");
+
+ // Create a logging configuration file that contains
+ // com.foo.level=FINEST
+ // and set "java.util.logging.config.file" to this file.
+ Properties props = new Properties();
+ props.setProperty("com.foo.level", "FINEST");
+
+ // Update configuration with props
+ // then test that the new configuration has
+ // com.foo.level=FINEST
+ // and nothing for com.foo.handlers
+ Configure.updateConfigurationWith(props, null);
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level in " + props);
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + props);
+
+ // call updateConfiguration with an empty stream.
+ // check that the new configuration no longer has
+ // any value for com.foo.level, and still no value
+ // for com.foo.handlers
+ Configure.updateConfigurationWith(new Properties(), null);
+ assertEquals(null, manager.getProperty("com.foo.level"),
+ "com.foo.level in default configuration");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in default configuration");
+
+ // creates the com.foo logger, check it has
+ // the default config: no level, and no handlers
+ final Logger logger = Logger.getLogger("com.foo");
+ assertEquals(null, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+
+ // call updateConfiguration with 'props'
+ // check that the configuration has
+ // com.foo.level=FINEST
+ // and nothing for com.foo.handlers
+ // check that the logger has now a FINEST level and still
+ // no handlers
+ Configure.updateConfigurationWith(props, null);
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level in " + props);
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + props);
+
+ // Calls updateConfiguration with a lambda whose effect should
+ // be to set the FINER level on the "com.foo" logger.
+ // Check that the new configuration has
+ // com.foo.level=FINER
+ // and nothing for com.foo.handlers
+ // check that the logger has now a FINER level and still
+ // no handlers
+ Configure.updateConfigurationWith(props,
+ (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n));
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level set to FINER by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + props);
+
+ // Calls updateConfiguration with a lambda whose effect is a noop.
+ // This should not change the configuration, so
+ // check that the new configuration still has
+ // com.foo.level=FINER
+ // and nothing for com.foo.handlers
+ // check that the logger still has FINER level and still
+ // no handlers
+ Configure.updateConfigurationWith(props,
+ (k) -> ((o, n) -> o));
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level preserved by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + props);
+
+ // Calls updateConfiguration with a lambda whose effect is to
+ // take all values from the new configuration.
+ // This should update the configuration to what is in props, so
+ // check that the new configuration has
+ // com.foo.level=FINEST
+ // and nothing for com.foo.handlers
+ // check that the logger now has FINEST level and still
+ // no handlers
+ Configure.updateConfigurationWith(props,
+ (k) -> ((o, n) -> n));
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + props);
+
+ // now set a handler on the com.foo logger.
+ MyHandler h = new MyHandler();
+ logger.addHandler(h);
+ assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+
+ // Calls updateConfiguration with a lambda whose effect should
+ // be to set the FINER level on the "com.foo" logger, and
+ // take the value from props for everything else.
+ // Check that the new configuration has
+ // com.foo.level=FINER
+ // and nothing for com.foo.handlers
+ // check that the logger has now a FINER level, but that its
+ // handlers are still present and have not been reset
+ // since neither the old nor new configuration defined them.
+ Configure.updateConfigurationWith(props,
+ (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n));
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level set to FINER by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + props);
+
+ // now add some configuration for com.foo.handlers
+ props.setProperty("com.foo.handlers", MyHandler.class.getName());
+
+ // we didn't call updateConfiguration, so just changing the
+ // content of props should have had no effect.
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level set to FINER by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(null,
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+ assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+
+ // Calls updateConfiguration with a lambda whose effect is a noop.
+ // This should not change the current configuration, so
+ // check that the new configuration still has
+ // com.foo.level=FINER
+ // and nothing for com.foo.handlers
+ // check that the logger still has FINER level and still
+ // has its handlers and that they haven't been reset.
+ Configure.updateConfigurationWith(props, (k) -> ((o, n) -> o));
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level set to FINER by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(null,
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+ assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+
+ // Calls updateConfiguration with a lambda whose effect is to
+ // take all values from the new configuration.
+ // This should update the configuration to what is in props, so
+ // check that the new configuration has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+ // check that the logger now has FINEST level
+ // and a new handler instance, since the old config
+ // had no handlers for com.foo and the new config has one.
+ Configure.updateConfigurationWith(props, (k) -> ((o, n) -> n));
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+ Handler[] loggerHandlers = logger.getHandlers().clone();
+ assertEquals(1, loggerHandlers.length,
+ "Logger.getLogger(\"com.foo\").getHandlers().length");
+ assertEquals(MyHandler.class, loggerHandlers[0].getClass(),
+ "Logger.getLogger(\"com.foo\").getHandlers()[0].getClass()");
+ assertEquals(h.count + 1, ((MyHandler)logger.getHandlers()[0]).count,
+ "Logger.getLogger(\"com.foo\").getHandlers()[0].count");
+
+ // Calls updateConfiguration with a lambda whose effect is a noop.
+ // This should not change the current configuration, so
+ // check that the new configuration still has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+ // check that the logger still has FINEST level and still
+ // has its handlers and that they haven't been reset.
+ Configure.updateConfigurationWith(props, (k) -> ((o, n) -> o));
+ assertDeepEquals(loggerHandlers, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+ // Calls updateConfiguration with a lambda whose effect is to
+ // take all values from the new configuration.
+ // Because the content of the props hasn't changed, then
+ // it should also be a noop.
+ // check that the new configuration still has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+ // check that the logger still has FINEST level and still
+ // has its handlers and that they haven't been reset.
+ Configure.updateConfigurationWith(props, (k) -> ((o, n) -> n));
+ assertDeepEquals(loggerHandlers, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+ // Calls updateConfiguration with a null lambda, whose effect is to
+ // take all values from the new configuration.
+ // Because the content of the props hasn't changed, then
+ // it should also be a noop.
+ // check that the new configuration still has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+ // check that the logger still has FINEST level and still
+ // has its handlers and that they haven't been reset.
+ Configure.updateConfigurationWith(props, (k) -> ((o, n) -> n));
+ assertDeepEquals(loggerHandlers, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+ // now remove com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+ // from the configuration file.
+ props.remove("com.foo.handlers");
+
+ // Calls updateConfiguration with a lambda whose effect is a noop.
+ // This should not change the current configuration, so
+ // check that the new configuration still has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigWithInputStreamTest$MyHandler
+ // check that the logger still has FINEST level and still
+ // has its handlers and that they haven't been reset.
+ Configure.updateConfigurationWith(props, (k) -> ((o, n) -> o));
+ assertDeepEquals(loggerHandlers, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+ // Calls updateConfiguration with a lambda whose effect is to
+ // take all values from the new configuration.
+ // This should update the configuration to what is in props, so
+ // check that the new configuration has
+ // com.foo.level=FINEST
+ // and nothing for com.foo.handlers
+ // check that the logger still has FINEST level
+ // and no handlers, since the old config
+ // had an handler for com.foo and the new config doesn't.
+ Configure.updateConfigurationWith(props, (k) -> ((o, n) -> n));
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(null,
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+
+ } catch (RuntimeException | Error r) {
+ throw r;
+ } catch (Exception x) {
+ throw new RuntimeException(x);
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ if (args == null || args.length == 0) {
+ args = new String[] { "UNSECURE", "SECURE" };
+ }
+ for (String test : args) {
+ TestCase.valueOf(test).execute(SimpleUpdateConfigWithInputStreamTest::testUpdateConfiguration);
+ }
+ }
+
+ static class Configure {
+ static Policy policy = null;
+ static void setUp(TestCase test) {
+ switch (test) {
+ case SECURE:
+ if (policy == null && System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ } else if (policy == null) {
+ policy = new SimplePolicy(TestCase.SECURE);
+ Policy.setPolicy(policy);
+ System.setSecurityManager(new SecurityManager());
+ }
+ if (System.getSecurityManager() == null) {
+ throw new IllegalStateException("No SecurityManager.");
+ }
+ if (policy == null) {
+ throw new IllegalStateException("policy not configured");
+ }
+ break;
+ case UNSECURE:
+ if (System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ }
+ break;
+ default:
+ throw new InternalError("No such testcase: " + test);
+ }
+ }
+
+ static void updateConfigurationWith(Properties propertyFile,
+ Function<String,BiFunction<String,String,String>> remapper) {
+ try {
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+ LogManager.getLogManager().updateConfiguration(bais, remapper);
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ static void doPrivileged(Runnable run, ThreadLocal<AtomicBoolean> granter) {
+ final boolean old = granter.get().getAndSet(true);
+ try {
+ run.run();
+ } finally {
+ granter.get().set(old);
+ }
+ }
+ static <T> T callPrivileged(Callable<T> call,
+ ThreadLocal<AtomicBoolean> granter) throws Exception {
+ final boolean old = granter.get().getAndSet(true);
+ try {
+ return call.call();
+ } finally {
+ granter.get().set(old);
+ }
+ }
+ }
+
+ static final class TestAssertException extends RuntimeException {
+ TestAssertException(String msg) {
+ super(msg);
+ }
+ }
+
+ private static void assertEquals(long expected, long received, String msg) {
+ if (expected != received) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ private static void assertEquals(String expected, String received, String msg) {
+ if (!Objects.equals(expected, received)) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ private static void assertEquals(Object expected, Object received, String msg) {
+ if (!Objects.equals(expected, received)) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ public static String deepToString(Object o) {
+ if (o == null) {
+ return "null";
+ } else if (o.getClass().isArray()) {
+ String s;
+ if (o instanceof Object[])
+ s = Arrays.deepToString((Object[]) o);
+ else if (o instanceof byte[])
+ s = Arrays.toString((byte[]) o);
+ else if (o instanceof short[])
+ s = Arrays.toString((short[]) o);
+ else if (o instanceof int[])
+ s = Arrays.toString((int[]) o);
+ else if (o instanceof long[])
+ s = Arrays.toString((long[]) o);
+ else if (o instanceof char[])
+ s = Arrays.toString((char[]) o);
+ else if (o instanceof float[])
+ s = Arrays.toString((float[]) o);
+ else if (o instanceof double[])
+ s = Arrays.toString((double[]) o);
+ else if (o instanceof boolean[])
+ s = Arrays.toString((boolean[]) o);
+ else
+ s = o.toString();
+ return s;
+ } else {
+ return o.toString();
+ }
+ }
+
+ private static void assertDeepEquals(Object expected, Object received, String msg) {
+ if (!Objects.deepEquals(expected, received)) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + deepToString(expected)
+ + "\n\tactual: " + deepToString(received));
+ } else {
+ System.out.println("Got expected " + msg + ": " + deepToString(received));
+ }
+ }
+
+ final static class PermissionsBuilder {
+ final Permissions perms;
+ public PermissionsBuilder() {
+ this(new Permissions());
+ }
+ public PermissionsBuilder(Permissions perms) {
+ this.perms = perms;
+ }
+ public PermissionsBuilder add(Permission p) {
+ perms.add(p);
+ return this;
+ }
+ public PermissionsBuilder addAll(PermissionCollection col) {
+ if (col != null) {
+ for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+ perms.add(e.nextElement());
+ }
+ }
+ return this;
+ }
+ public Permissions toPermissions() {
+ final PermissionsBuilder builder = new PermissionsBuilder();
+ builder.addAll(perms);
+ return builder.perms;
+ }
+ }
+
+ public static class SimplePolicy extends Policy {
+
+ final Permissions basic;
+ final Permissions control;
+ final Permissions all;
+ public final static ThreadLocal<AtomicBoolean> allowAll =
+ new ThreadLocal<AtomicBoolean>() {
+ @Override
+ protected AtomicBoolean initialValue() {
+ return new AtomicBoolean();
+ }
+ };
+ public final static ThreadLocal<AtomicBoolean> allowControl =
+ new ThreadLocal<AtomicBoolean>() {
+ @Override
+ protected AtomicBoolean initialValue() {
+ return new AtomicBoolean();
+ }
+ };
+ public SimplePolicy(TestCase test) {
+ basic = new Permissions();
+ control = new Permissions();
+ control.add(new LoggingPermission("control", null));
+
+ // these are used for configuring the test itself...
+ all = new Permissions();
+ all.add(new java.security.AllPermission());
+
+ }
+
+ @Override
+ public boolean implies(ProtectionDomain domain, Permission permission) {
+ return getPermissions(domain).implies(permission);
+ }
+
+ public PermissionCollection permissions() {
+ PermissionsBuilder builder = new PermissionsBuilder();
+ if (allowAll.get().get()) {
+ builder.addAll(all);
+ } else {
+ builder.addAll(basic);
+ if (allowControl.get().get()) {
+ builder.addAll(control);
+ }
+ }
+ return builder.toPermissions();
+ }
+
+ @Override
+ public PermissionCollection getPermissions(CodeSource codesource) {
+ return permissions();
+ }
+
+ @Override
+ public PermissionCollection getPermissions(ProtectionDomain domain) {
+ return permissions();
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/SimpleUpdateConfigurationTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,720 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.PropertyPermission;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests LogManager.updateConfiguration(Function) method
+ * @run main/othervm SimpleUpdateConfigurationTest UNSECURE
+ * @run main/othervm SimpleUpdateConfigurationTest SECURE
+ * @author danielfuchs
+ */
+public class SimpleUpdateConfigurationTest {
+
+ /**
+ * We will test updateConfiguration in
+ * two configurations:
+ * UNSECURE: No security manager.
+ * SECURE: With the security manager present - and the required
+ * permissions granted.
+ */
+ public static enum TestCase {
+ UNSECURE, SECURE;
+ public void execute(Runnable run) {
+ System.out.println("Running test case: " + name());
+ try {
+ Configure.setUp(this);
+ Configure.doPrivileged(run, SimplePolicy.allowControl);
+ } finally {
+ Configure.doPrivileged(() -> {
+ try {
+ setSystemProperty("java.util.logging.config.file", null);
+ LogManager.getLogManager().readConfiguration();
+ System.gc();
+ } catch (Exception x) {
+ throw new RuntimeException(x);
+ }
+ }, SimplePolicy.allowAll);
+ }
+ }
+ }
+
+ public static class MyHandler extends Handler {
+ static final AtomicLong seq = new AtomicLong();
+ long count = seq.incrementAndGet();
+
+ @Override
+ public void publish(LogRecord record) {
+ }
+
+ @Override
+ public void flush() {
+ }
+
+ @Override
+ public void close() throws SecurityException {
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + "("+count+")";
+ }
+
+ }
+
+ static String storePropertyToFile(String name, Properties props)
+ throws Exception {
+ return Configure.callPrivileged(() -> {
+ String scratch = System.getProperty("user.dir", ".");
+ Path p = Paths.get(scratch, name);
+ try (FileOutputStream fos = new FileOutputStream(p.toFile())) {
+ props.store(fos, name);
+ }
+ return p.toString();
+ }, SimplePolicy.allowAll);
+ }
+
+ static void setSystemProperty(String name, String value)
+ throws Exception {
+ Configure.doPrivileged(() -> {
+ if (value == null)
+ System.clearProperty(name);
+ else
+ System.setProperty(name, value);
+ }, SimplePolicy.allowAll);
+ }
+
+ static String trim(String value) {
+ return value == null ? null : value.trim();
+ }
+
+
+ /**
+ * Tests one of the configuration defined above.
+ * <p>
+ * This is the main test method (the rest is infrastructure).
+ */
+ static void testUpdateConfiguration() {
+ String configFile = null;
+ try {
+ // manager initialized with default configuration.
+ LogManager manager = LogManager.getLogManager();
+
+ // Test default configuration. It should not have
+ // any value for "com.foo.level" and "com.foo.handlers"
+ assertEquals(null, manager.getProperty("com.foo.level"),
+ "com.foo.level in default configuration");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in default configuration");
+
+ // Create a logging configuration file that contains
+ // com.foo.level=FINEST
+ // and set "java.util.logging.config.file" to this file.
+ Properties props = new Properties();
+ props.setProperty("com.foo.level", "FINEST");
+ configFile = storePropertyToFile("config1", props);
+ setSystemProperty("java.util.logging.config.file", configFile);
+
+ // Update configuration with configFile
+ // then test that the new configuration has
+ // com.foo.level=FINEST
+ // and nothing for com.foo.handlers
+ manager.updateConfiguration(null);
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level in " + configFile);
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + configFile);
+
+ // clear ("java.util.logging.config.file" system property,
+ // and call updateConfiguration again.
+ // check that the new configuration no longer has
+ // any value for com.foo.level, and still no value
+ // for com.foo.handlers
+ setSystemProperty("java.util.logging.config.file", null);
+ manager.updateConfiguration(null);
+ assertEquals(null, manager.getProperty("com.foo.level"),
+ "com.foo.level in default configuration");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in default configuration");
+
+ // creates the com.foo logger, check it has
+ // the default config: no level, and no handlers
+ final Logger logger = Logger.getLogger("com.foo");
+ assertEquals(null, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+
+ // set "java.util.logging.config.file" to configFile and
+ // call updateConfiguration.
+ // check that the configuration has
+ // com.foo.level=FINEST
+ // and nothing for com.foo.handlers
+ // check that the logger has now a FINEST level and still
+ // no handlers
+ setSystemProperty("java.util.logging.config.file", configFile);
+ manager.updateConfiguration(null);
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level in " + configFile);
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + configFile);
+
+ // Calls updateConfiguration with a lambda whose effect should
+ // be to set the FINER level on the "com.foo" logger.
+ // Check that the new configuration has
+ // com.foo.level=FINER
+ // and nothing for com.foo.handlers
+ // check that the logger has now a FINER level and still
+ // no handlers
+ manager.updateConfiguration(
+ (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n));
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level set to FINER by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + configFile);
+
+ // Calls updateConfiguration with a lambda whose effect is a noop.
+ // This should not change the configuration, so
+ // check that the new configuration still has
+ // com.foo.level=FINER
+ // and nothing for com.foo.handlers
+ // check that the logger still has FINER level and still
+ // no handlers
+ manager.updateConfiguration(
+ (k) -> ((o, n) -> o));
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level preserved by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + configFile);
+
+ // Calls updateConfiguration with a lambda whose effect is to
+ // take all values from the new configuration.
+ // This should update the configuration to what is in configFile, so
+ // check that the new configuration has
+ // com.foo.level=FINEST
+ // and nothing for com.foo.handlers
+ // check that the logger now has FINEST level and still
+ // no handlers
+ manager.updateConfiguration(
+ (k) -> ((o, n) -> n));
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + configFile);
+
+ // now set a handler on the com.foo logger.
+ MyHandler h = new MyHandler();
+ logger.addHandler(h);
+ assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+
+ // Calls updateConfiguration with a lambda whose effect should
+ // be to set the FINER level on the "com.foo" logger, and
+ // take the value from configFile for everything else.
+ // Check that the new configuration has
+ // com.foo.level=FINER
+ // and nothing for com.foo.handlers
+ // check that the logger has now a FINER level, but that its
+ // handlers are still present and have not been reset
+ // since neither the old nor new configuration defined them.
+ manager.updateConfiguration(
+ (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n));
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level set to FINER by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals(null, manager.getProperty("com.foo.handlers"),
+ "com.foo.handlers in " + configFile);
+
+ // now add some configuration for com.foo.handlers in the
+ // configuration file.
+ props.setProperty("com.foo.handlers", MyHandler.class.getName());
+ storePropertyToFile("config1", props);
+
+ // we didn't call updateConfiguration, so just changing the
+ // content of the file should have had no no effect yet.
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level set to FINER by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(null,
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+ assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+
+ // Calls updateConfiguration with a lambda whose effect is a noop.
+ // This should not change the current configuration, so
+ // check that the new configuration still has
+ // com.foo.level=FINER
+ // and nothing for com.foo.handlers
+ // check that the logger still has FINER level and still
+ // has its handlers and that they haven't been reset.
+ manager.updateConfiguration((k) -> ((o, n) -> o));
+ assertEquals("FINER", manager.getProperty("com.foo.level"),
+ "com.foo.level set to FINER by updateConfiguration");
+ assertEquals(Level.FINER, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(null,
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+ assertDeepEquals(new Handler[] {h}, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+
+ // Calls updateConfiguration with a lambda whose effect is to
+ // take all values from the new configuration.
+ // This should update the configuration to what is in configFile, so
+ // check that the new configuration has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+ // check that the logger now has FINEST level
+ // and a new handler instance, since the old config
+ // had no handlers for com.foo and the new config has one.
+ manager.updateConfiguration((k) -> ((o, n) -> n));
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+ Handler[] loggerHandlers = logger.getHandlers().clone();
+ assertEquals(1, loggerHandlers.length,
+ "Logger.getLogger(\"com.foo\").getHandlers().length");
+ assertEquals(MyHandler.class, loggerHandlers[0].getClass(),
+ "Logger.getLogger(\"com.foo\").getHandlers()[0].getClass()");
+ assertEquals(h.count + 1, ((MyHandler)logger.getHandlers()[0]).count,
+ "Logger.getLogger(\"com.foo\").getHandlers()[0].count");
+
+ // Calls updateConfiguration with a lambda whose effect is a noop.
+ // This should not change the current configuration, so
+ // check that the new configuration still has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+ // check that the logger still has FINEST level and still
+ // has its handlers and that they haven't been reset.
+ manager.updateConfiguration((k) -> ((o, n) -> o));
+ assertDeepEquals(loggerHandlers, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+ // Calls updateConfiguration with a lambda whose effect is to
+ // take all values from the new configuration.
+ // Because the content of the configFile hasn't changed, then
+ // it should also be a noop.
+ // check that the new configuration still has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+ // check that the logger still has FINEST level and still
+ // has its handlers and that they haven't been reset.
+ manager.updateConfiguration((k) -> ((o, n) -> n));
+ assertDeepEquals(loggerHandlers, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+ // Calls updateConfiguration with a null lambda, whose effect is to
+ // take all values from the new configuration.
+ // Because the content of the configFile hasn't changed, then
+ // it should also be a noop.
+ // check that the new configuration still has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+ // check that the logger still has FINEST level and still
+ // has its handlers and that they haven't been reset.
+ manager.updateConfiguration((k) -> ((o, n) -> n));
+ assertDeepEquals(loggerHandlers, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+ // no remove com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+ // from the configuration file.
+ props.remove("com.foo.handlers");
+ storePropertyToFile("config1", props);
+
+ // Calls updateConfiguration with a lambda whose effect is a noop.
+ // This should not change the current configuration, so
+ // check that the new configuration still has
+ // com.foo.level=FINEST
+ // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler
+ // check that the logger still has FINEST level and still
+ // has its handlers and that they haven't been reset.
+ manager.updateConfiguration((k) -> ((o, n) -> o));
+ assertDeepEquals(loggerHandlers, logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(MyHandler.class.getName(),
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+ // Calls updateConfiguration with a lambda whose effect is to
+ // take all values from the new configuration.
+ // This should update the configuration to what is in configFile, so
+ // check that the new configuration has
+ // com.foo.level=FINEST
+ // and nothing for com.foo.handlers
+ // check that the logger still has FINEST level
+ // and no handlers, since the old config
+ // had an handler for com.foo and the new config doesn't.
+ manager.updateConfiguration((k) -> ((o, n) -> n));
+ assertDeepEquals(new Handler[0], logger.getHandlers(),
+ "Logger.getLogger(\"com.foo\").getHandlers()");
+ assertEquals("FINEST", manager.getProperty("com.foo.level"),
+ "com.foo.level updated by updateConfiguration");
+ assertEquals(Level.FINEST, logger.getLevel(),
+ "Logger.getLogger(\"com.foo\").getLevel()");
+ assertEquals(null,
+ manager.getProperty("com.foo.handlers"),
+ "manager.getProperty(\"com.foo.handlers\")");
+
+
+ } catch (RuntimeException | Error r) {
+ throw r;
+ } catch (Exception x) {
+ throw new RuntimeException(x);
+ } finally {
+ if (configFile != null) {
+ // cleanup
+ final String file = configFile;
+ Configure.doPrivileged(() -> {
+ try {
+ Files.delete(Paths.get(file));
+ } catch (RuntimeException | Error r) {
+ throw r;
+ } catch (Exception x) {
+ throw new RuntimeException(x);
+ }
+ }, SimplePolicy.allowAll);
+ }
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ if (args == null || args.length == 0) {
+ args = new String[] { "UNSECURE", "SECURE" };
+ }
+ for (String test : args) {
+ TestCase.valueOf(test).execute(SimpleUpdateConfigurationTest::testUpdateConfiguration);
+ }
+ }
+
+ static class Configure {
+ static Policy policy = null;
+ static void setUp(TestCase test) {
+ switch (test) {
+ case SECURE:
+ if (policy == null && System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ } else if (policy == null) {
+ policy = new SimplePolicy(TestCase.SECURE);
+ Policy.setPolicy(policy);
+ System.setSecurityManager(new SecurityManager());
+ }
+ if (System.getSecurityManager() == null) {
+ throw new IllegalStateException("No SecurityManager.");
+ }
+ if (policy == null) {
+ throw new IllegalStateException("policy not configured");
+ }
+ break;
+ case UNSECURE:
+ if (System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ }
+ break;
+ default:
+ throw new InternalError("No such testcase: " + test);
+ }
+ }
+
+ static void updateConfigurationWith(Properties propertyFile,
+ Function<String,BiFunction<String,String,String>> remapper) {
+ try {
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+ LogManager.getLogManager().updateConfiguration(bais, remapper);
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ static void doPrivileged(Runnable run, ThreadLocal<AtomicBoolean> granter) {
+ final boolean old = granter.get().getAndSet(true);
+ try {
+ run.run();
+ } finally {
+ granter.get().set(old);
+ }
+ }
+ static <T> T callPrivileged(Callable<T> call,
+ ThreadLocal<AtomicBoolean> granter) throws Exception {
+ final boolean old = granter.get().getAndSet(true);
+ try {
+ return call.call();
+ } finally {
+ granter.get().set(old);
+ }
+ }
+ }
+
+ static final class TestAssertException extends RuntimeException {
+ TestAssertException(String msg) {
+ super(msg);
+ }
+ }
+
+ private static void assertEquals(long expected, long received, String msg) {
+ if (expected != received) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ private static void assertEquals(String expected, String received, String msg) {
+ if (!Objects.equals(expected, received)) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ private static void assertEquals(Object expected, Object received, String msg) {
+ if (!Objects.equals(expected, received)) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ public static String deepToString(Object o) {
+ if (o == null) {
+ return "null";
+ } else if (o.getClass().isArray()) {
+ String s;
+ if (o instanceof Object[])
+ s = Arrays.deepToString((Object[]) o);
+ else if (o instanceof byte[])
+ s = Arrays.toString((byte[]) o);
+ else if (o instanceof short[])
+ s = Arrays.toString((short[]) o);
+ else if (o instanceof int[])
+ s = Arrays.toString((int[]) o);
+ else if (o instanceof long[])
+ s = Arrays.toString((long[]) o);
+ else if (o instanceof char[])
+ s = Arrays.toString((char[]) o);
+ else if (o instanceof float[])
+ s = Arrays.toString((float[]) o);
+ else if (o instanceof double[])
+ s = Arrays.toString((double[]) o);
+ else if (o instanceof boolean[])
+ s = Arrays.toString((boolean[]) o);
+ else
+ s = o.toString();
+ return s;
+ } else {
+ return o.toString();
+ }
+ }
+
+ private static void assertDeepEquals(Object expected, Object received, String msg) {
+ if (!Objects.deepEquals(expected, received)) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + deepToString(expected)
+ + "\n\tactual: " + deepToString(received));
+ } else {
+ System.out.println("Got expected " + msg + ": " + deepToString(received));
+ }
+ }
+
+ final static class PermissionsBuilder {
+ final Permissions perms;
+ public PermissionsBuilder() {
+ this(new Permissions());
+ }
+ public PermissionsBuilder(Permissions perms) {
+ this.perms = perms;
+ }
+ public PermissionsBuilder add(Permission p) {
+ perms.add(p);
+ return this;
+ }
+ public PermissionsBuilder addAll(PermissionCollection col) {
+ if (col != null) {
+ for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+ perms.add(e.nextElement());
+ }
+ }
+ return this;
+ }
+ public Permissions toPermissions() {
+ final PermissionsBuilder builder = new PermissionsBuilder();
+ builder.addAll(perms);
+ return builder.perms;
+ }
+ }
+
+ public static class SimplePolicy extends Policy {
+
+ final Permissions basic;
+ final Permissions control;
+ final Permissions all;
+ public final static ThreadLocal<AtomicBoolean> allowAll =
+ new ThreadLocal<AtomicBoolean>() {
+ @Override
+ protected AtomicBoolean initialValue() {
+ return new AtomicBoolean();
+ }
+ };
+ public final static ThreadLocal<AtomicBoolean> allowControl =
+ new ThreadLocal<AtomicBoolean>() {
+ @Override
+ protected AtomicBoolean initialValue() {
+ return new AtomicBoolean();
+ }
+ };
+ public SimplePolicy(TestCase test) {
+ basic = new Permissions();
+ control = new Permissions();
+ control.add(new LoggingPermission("control", null));
+
+ // These permissions are required to call updateConfiguration(Function)
+ control.add(new PropertyPermission("java.util.logging.config.file", "read"));
+ control.add(new PropertyPermission("java.home", "read"));
+ control.add(new FilePermission(
+ Paths.get(System.getProperty("user.dir", "."),"-").toString(), "read"));
+ control.add(new FilePermission(
+ Paths.get(System.getProperty("java.home"),"conf","-").toString(), "read"));
+
+ // these are used for configuring the test itself...
+ all = new Permissions();
+ all.add(new java.security.AllPermission());
+
+ }
+
+ @Override
+ public boolean implies(ProtectionDomain domain, Permission permission) {
+ return getPermissions(domain).implies(permission);
+ }
+
+ public PermissionCollection permissions() {
+ PermissionsBuilder builder = new PermissionsBuilder();
+ if (allowAll.get().get()) {
+ builder.addAll(all);
+ } else {
+ builder.addAll(basic);
+ if (allowControl.get().get()) {
+ builder.addAll(control);
+ }
+ }
+ return builder.toPermissions();
+ }
+
+ @Override
+ public PermissionCollection getPermissions(CodeSource codesource) {
+ return permissions();
+ }
+
+ @Override
+ public PermissionCollection getPermissions(ProtectionDomain domain) {
+ return permissions();
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/updateConfiguration/UpdateConfigurationTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,608 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilePermission;
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Field;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.UUID;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.logging.FileHandler;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import java.util.logging.LoggingPermission;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @test
+ * @bug 8033661
+ * @summary tests LogManager.updateConfiguration(bin)
+ * @run main/othervm UpdateConfigurationTest UNSECURE
+ * @run main/othervm UpdateConfigurationTest SECURE
+ * @author danielfuchs
+ */
+public class UpdateConfigurationTest {
+
+ /**
+ * We will test the handling of abstract logger nodes with file handlers in
+ * two configurations:
+ * UNSECURE: No security manager.
+ * SECURE: With the security manager present - and the required
+ * permissions granted.
+ */
+ public static enum TestCase {
+ UNSECURE, SECURE;
+ public void run(Properties propertyFile, boolean last) throws Exception {
+ System.out.println("Running test case: " + name());
+ Configure.setUp(this);
+ test(this.name() + " " + propertyFile.getProperty("test.name"),
+ propertyFile, last);
+ }
+ }
+
+
+ private static final String PREFIX =
+ "FileHandler-" + UUID.randomUUID() + ".log";
+ private static final String userDir = System.getProperty("user.dir", ".");
+ private static final boolean userDirWritable = Files.isWritable(Paths.get(userDir));
+
+ static enum ConfigMode { APPEND, REPLACE, DEFAULT;
+ boolean append() { return this == APPEND; }
+ Function<String, BiFunction<String,String,String>> remapper() {
+ switch(this) {
+ case APPEND:
+ return (k) -> ((o,n) -> (n == null ? o : n));
+ case REPLACE:
+ return (k) -> ((o,n) -> n);
+ }
+ return null;
+ }
+ }
+
+ private static final List<Properties> properties;
+ static {
+ // The test will be run with each of the configurations below.
+ // The 'child' logger is forgotten after each test
+
+ Properties props1 = new Properties();
+ props1.setProperty("test.name", "props1");
+ props1.setProperty("test.config.mode", ConfigMode.REPLACE.name());
+ props1.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props1.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props1.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props1.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props1.setProperty("com.foo.handlers", FileHandler.class.getName());
+ props1.setProperty("com.bar.level", "FINEST");
+
+ Properties props2 = new Properties();
+ props2.setProperty("test.name", "props2");
+ props2.setProperty("test.config.mode", ConfigMode.DEFAULT.name());
+ props2.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props2.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props2.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props2.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props2.setProperty("com.foo.handlers", FileHandler.class.getName());
+ props2.setProperty("com.foo.handlers.ensureCloseOnReset", "true");
+ props2.setProperty("com.level", "FINE");
+
+ Properties props3 = new Properties();
+ props3.setProperty("test.name", "props3");
+ props3.setProperty("test.config.mode", ConfigMode.APPEND.name());
+ props3.setProperty(FileHandler.class.getName() + ".pattern", PREFIX);
+ props3.setProperty(FileHandler.class.getName() + ".limit", String.valueOf(Integer.MAX_VALUE));
+ props3.setProperty(FileHandler.class.getName() + ".level", "ALL");
+ props3.setProperty(FileHandler.class.getName() + ".formatter", "java.util.logging.SimpleFormatter");
+ props3.setProperty("com.foo.handlers", ""); // specify "" to override the value in the previous conf
+ props3.setProperty("com.foo.handlers.ensureCloseOnReset", "false");
+ props3.setProperty("com.bar.level", "FINER");
+
+
+ properties = Collections.unmodifiableList(Arrays.asList(
+ props1, props2, props3, props1));
+ }
+
+ static Properties previous;
+ static Properties current;
+ static final Field propsField;
+ static {
+ LogManager manager = LogManager.getLogManager();
+ try {
+ propsField = LogManager.class.getDeclaredField("props");
+ propsField.setAccessible(true);
+ previous = current = (Properties) propsField.get(manager);
+ } catch (NoSuchFieldException | IllegalAccessException ex) {
+ throw new ExceptionInInitializerError(ex);
+ }
+ }
+
+ static Properties getProperties() {
+ try {
+ return (Properties) propsField.get(LogManager.getLogManager());
+ } catch (IllegalAccessException x) {
+ throw new RuntimeException(x);
+ }
+ }
+
+ static String trim(String value) {
+ return value == null ? null : value.trim();
+ }
+
+
+ /**
+ * Tests one of the configuration defined above.
+ * <p>
+ * This is the main test method (the rest is infrastructure).
+ * <p>
+ * Creates a child of the com.foo logger (com.foo.child), resets
+ * the configuration, and verifies that com.foo has no handler.
+ * Then reapplies the configuration and verifies that the handler
+ * for com.foo has been reestablished, depending on whether
+ * java.util.logging.LogManager.reconfigureHandlers is present and
+ * true.
+ * <p>
+ * Finally releases the logger com.foo.child, so that com.foo can
+ * be garbage collected, and the next configuration can be
+ * tested.
+ */
+ static void test(ConfigMode mode, String name, Properties props, boolean last)
+ throws Exception {
+
+ // Then create a child of the com.foo logger.
+ Logger fooChild = Logger.getLogger("com.foo.child");
+ fooChild.info("hello world");
+ Logger barChild = Logger.getLogger("com.bar.child");
+ barChild.info("hello world");
+
+ ReferenceQueue<Logger> queue = new ReferenceQueue();
+ WeakReference<Logger> fooRef = new WeakReference<>(Logger.getLogger("com.foo"), queue);
+ if (fooRef.get() != fooChild.getParent()) {
+ throw new RuntimeException("Unexpected parent logger: "
+ + fooChild.getParent() +"\n\texpected: " + fooRef.get());
+ }
+ WeakReference<Logger> barRef = new WeakReference<>(Logger.getLogger("com.bar"), queue);
+ if (barRef.get() != barChild.getParent()) {
+ throw new RuntimeException("Unexpected parent logger: "
+ + barChild.getParent() +"\n\texpected: " + barRef.get());
+ }
+ Reference<? extends Logger> ref2;
+ int max = 3;
+ barChild = null;
+ while ((ref2 = queue.poll()) == null) {
+ System.gc();
+ Thread.sleep(100);
+ if (--max == 0) break;
+ }
+
+ Throwable failed = null;
+ try {
+ if (ref2 != null) {
+ String refName = ref2 == fooRef ? "fooRef" : ref2 == barRef ? "barRef" : "unknown";
+ if (ref2 != barRef) {
+ throw new RuntimeException("Unexpected logger reference cleared: " + refName);
+ } else {
+ System.out.println("Reference " + refName + " cleared as expected");
+ }
+ } else if (ref2 == null) {
+ throw new RuntimeException("Expected 'barRef' to be cleared");
+ }
+ // Now lets try to check that ref2 has expected handlers, and
+ // attempt to configure again.
+ String p = current.getProperty("com.foo.handlers", "").trim();
+ assertEquals(p.isEmpty() ? 0 : 1, fooChild.getParent().getHandlers().length,
+ "["+name+"] fooChild.getParent().getHandlers().length");
+ Configure.doPrivileged(() -> Configure.updateConfigurationWith(props, mode.remapper()));
+ String p2 = previous.getProperty("com.foo.handlers", "").trim();
+ assertEquals(p, p2, "["+name+"] com.foo.handlers");
+ String n = trim(props.getProperty("com.foo.handlers", null));
+ boolean hasHandlers = mode.append()
+ ? (n == null ? !p.isEmpty() : !n.isEmpty())
+ : n != null && !n.isEmpty();
+ assertEquals( hasHandlers ? 1 : 0,
+ fooChild.getParent().getHandlers().length,
+ "["+name+"] fooChild.getParent().getHandlers().length"
+ + "[p=\""+p+"\", n=" + (n==null?null:"\""+n+"\"") + "]");
+
+ checkProperties(mode, previous, current, props);
+
+ } catch (Throwable t) {
+ failed = t;
+ } finally {
+ if (last || failed != null) {
+ final Throwable suppressed = failed;
+ Configure.doPrivileged(LogManager.getLogManager()::reset);
+ Configure.doPrivileged(() -> {
+ try {
+ StringBuilder builder = new StringBuilder();
+ Files.list(Paths.get(userDir))
+ .filter((f) -> f.toString().contains(PREFIX))
+ .filter((f) -> f.toString().endsWith(".lck"))
+ .forEach((f) -> {
+ builder.append(f.toString()).append('\n');
+ });
+ if (!builder.toString().isEmpty()) {
+ throw new RuntimeException("Lock files not cleaned:\n"
+ + builder.toString());
+ }
+ } catch(RuntimeException | Error x) {
+ if (suppressed != null) x.addSuppressed(suppressed);
+ throw x;
+ } catch(Exception x) {
+ if (suppressed != null) x.addSuppressed(suppressed);
+ throw new RuntimeException(x);
+ }
+ });
+
+ // Now we need to forget the child, so that loggers are released,
+ // and so that we can run the test with the next configuration...
+
+ fooChild = null;
+ System.out.println("Setting fooChild to: " + fooChild);
+ while ((ref2 = queue.poll()) == null) {
+ System.gc();
+ Thread.sleep(1000);
+ }
+ if (ref2 != fooRef) {
+ throw new RuntimeException("Unexpected reference: "
+ + ref2 +"\n\texpected: " + fooRef);
+ }
+ if (ref2.get() != null) {
+ throw new RuntimeException("Referent not cleared: " + ref2.get());
+ }
+ System.out.println("Got fooRef after reset(), fooChild is " + fooChild);
+
+ }
+ }
+ if (failed != null) {
+ // should rarely happen...
+ throw new RuntimeException(failed);
+ }
+
+ }
+
+ private static void checkProperties(ConfigMode mode,
+ Properties previous, Properties current, Properties props) {
+ Set<String> set = new HashSet<>();
+
+ // Check that all property names from 'props' are in current.
+ set.addAll(props.stringPropertyNames());
+ set.removeAll(current.keySet());
+ if (!set.isEmpty()) {
+ throw new RuntimeException("Missing properties in current: " + set);
+ }
+ set.clear();
+ set.addAll(current.stringPropertyNames());
+ set.removeAll(previous.keySet());
+ set.removeAll(props.keySet());
+ if (!set.isEmpty()) {
+ throw new RuntimeException("Superfluous properties in current: " + set);
+ }
+ set.clear();
+ Stream<String> allnames =
+ Stream.concat(
+ Stream.concat(previous.stringPropertyNames().stream(),
+ props.stringPropertyNames().stream()),
+ current.stringPropertyNames().stream())
+ .collect(Collectors.toCollection(TreeSet::new))
+ .stream();
+ if (mode.append()) {
+ // Check that all previous property names are in current.
+ set.addAll(previous.stringPropertyNames());
+ set.removeAll(current.keySet());
+ if (!set.isEmpty()) {
+ throw new RuntimeException("Missing properties in current: " + set
+ + "\n\tprevious: " + previous
+ + "\n\tcurrent: " + current
+ + "\n\tprops: " + props);
+
+ }
+ allnames.forEach((k) -> {
+ String p = previous.getProperty(k, "").trim();
+ String n = current.getProperty(k, "").trim();
+ if (props.containsKey(k)) {
+ assertEquals(props.getProperty(k), n, k);
+ } else {
+ assertEquals(p, n, k);
+ }
+ });
+ } else {
+ // Check that only properties from 'props' are in current.
+ set.addAll(current.stringPropertyNames());
+ set.removeAll(props.keySet());
+ if (!set.isEmpty()) {
+ throw new RuntimeException("Superfluous properties in current: " + set);
+ }
+ allnames.forEach((k) -> {
+ String p = previous.getProperty(k, "");
+ String n = current.getProperty(k, "");
+ if (props.containsKey(k)) {
+ assertEquals(props.getProperty(k), n, k);
+ } else {
+ assertEquals("", n, k);
+ }
+ });
+ }
+
+ }
+
+ public static void main(String... args) throws Exception {
+
+
+ if (args == null || args.length == 0) {
+ args = new String[] {
+ TestCase.UNSECURE.name(),
+ TestCase.SECURE.name(),
+ };
+ }
+
+ try {
+ for (String testName : args) {
+ TestCase test = TestCase.valueOf(testName);
+ for (int i=0; i<properties.size();i++) {
+ Properties propertyFile = properties.get(i);
+ test.run(propertyFile, i == properties.size() - 1);
+ }
+ }
+ } finally {
+ if (userDirWritable) {
+ Configure.doPrivileged(() -> {
+ // cleanup - delete files that have been created
+ try {
+ Files.list(Paths.get(userDir))
+ .filter((f) -> f.toString().contains(PREFIX))
+ .forEach((f) -> {
+ try {
+ System.out.println("deleting " + f);
+ Files.delete(f);
+ } catch(Throwable t) {
+ System.err.println("Failed to delete " + f + ": " + t);
+ }
+ });
+ } catch(Throwable t) {
+ System.err.println("Cleanup failed to list files: " + t);
+ t.printStackTrace();
+ }
+ });
+ }
+ }
+ }
+
+ static class Configure {
+ static Policy policy = null;
+ static final ThreadLocal<AtomicBoolean> allowAll = new ThreadLocal<AtomicBoolean>() {
+ @Override
+ protected AtomicBoolean initialValue() {
+ return new AtomicBoolean(false);
+ }
+ };
+ static void setUp(TestCase test) {
+ switch (test) {
+ case SECURE:
+ if (policy == null && System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ } else if (policy == null) {
+ policy = new SimplePolicy(TestCase.SECURE, allowAll);
+ Policy.setPolicy(policy);
+ System.setSecurityManager(new SecurityManager());
+ }
+ if (System.getSecurityManager() == null) {
+ throw new IllegalStateException("No SecurityManager.");
+ }
+ if (policy == null) {
+ throw new IllegalStateException("policy not configured");
+ }
+ break;
+ case UNSECURE:
+ if (System.getSecurityManager() != null) {
+ throw new IllegalStateException("SecurityManager already set");
+ }
+ break;
+ default:
+ new InternalError("No such testcase: " + test);
+ }
+ }
+
+ static void updateConfigurationWith(Properties propertyFile,
+ Function<String,BiFunction<String,String,String>> remapper) {
+ try {
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ propertyFile.store(bytes, propertyFile.getProperty("test.name"));
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes.toByteArray());
+ LogManager.getLogManager().updateConfiguration(bais, remapper);
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ static void doPrivileged(Runnable run) {
+ final boolean old = allowAll.get().getAndSet(true);
+ try {
+ Properties before = getProperties();
+ try {
+ run.run();
+ } finally {
+ Properties after = getProperties();
+ if (before != after) {
+ previous = before;
+ current = after;
+ }
+ }
+ } finally {
+ allowAll.get().set(old);
+ }
+ }
+ static <T> T callPrivileged(Callable<T> call) throws Exception {
+ final boolean old = allowAll.get().getAndSet(true);
+ try {
+ Properties before = getProperties();
+ try {
+ return call.call();
+ } finally {
+ Properties after = getProperties();
+ if (before != after) {
+ previous = before;
+ current = after;
+ }
+ }
+ } finally {
+ allowAll.get().set(old);
+ }
+ }
+ }
+
+ @FunctionalInterface
+ public static interface FileHandlerSupplier {
+ public FileHandler test() throws Exception;
+ }
+
+ static final class TestAssertException extends RuntimeException {
+ TestAssertException(String msg) {
+ super(msg);
+ }
+ }
+
+ private static void assertEquals(long expected, long received, String msg) {
+ if (expected != received) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+ private static void assertEquals(String expected, String received, String msg) {
+ if (!Objects.equals(expected, received)) {
+ throw new TestAssertException("Unexpected result for " + msg
+ + ".\n\texpected: " + expected
+ + "\n\tactual: " + received);
+ } else {
+ System.out.println("Got expected " + msg + ": " + received);
+ }
+ }
+
+
+ public static void test(String name, Properties props, boolean last) throws Exception {
+ ConfigMode configMode = ConfigMode.valueOf(props.getProperty("test.config.mode"));
+ System.out.println("\nTesting: " + name + " mode=" + configMode);
+ if (!userDirWritable) {
+ throw new RuntimeException("Not writable: "+userDir);
+ }
+ switch(configMode) {
+ case REPLACE:
+ case APPEND:
+ case DEFAULT:
+ test(configMode, name, props, last); break;
+ default:
+ throw new RuntimeException("Unknwown mode: " + configMode);
+ }
+ }
+
+ final static class PermissionsBuilder {
+ final Permissions perms;
+ public PermissionsBuilder() {
+ this(new Permissions());
+ }
+ public PermissionsBuilder(Permissions perms) {
+ this.perms = perms;
+ }
+ public PermissionsBuilder add(Permission p) {
+ perms.add(p);
+ return this;
+ }
+ public PermissionsBuilder addAll(PermissionCollection col) {
+ if (col != null) {
+ for (Enumeration<Permission> e = col.elements(); e.hasMoreElements(); ) {
+ perms.add(e.nextElement());
+ }
+ }
+ return this;
+ }
+ public Permissions toPermissions() {
+ final PermissionsBuilder builder = new PermissionsBuilder();
+ builder.addAll(perms);
+ return builder.perms;
+ }
+ }
+
+ public static class SimplePolicy extends Policy {
+
+ final Permissions permissions;
+ final Permissions allPermissions;
+ final ThreadLocal<AtomicBoolean> allowAll; // actually: this should be in a thread locale
+ public SimplePolicy(TestCase test, ThreadLocal<AtomicBoolean> allowAll) {
+ this.allowAll = allowAll;
+ permissions = new Permissions();
+ permissions.add(new LoggingPermission("control", null));
+ permissions.add(new FilePermission(PREFIX+".lck", "read,write,delete"));
+ permissions.add(new FilePermission(PREFIX, "read,write"));
+
+ // these are used for configuring the test itself...
+ allPermissions = new Permissions();
+ allPermissions.add(new java.security.AllPermission());
+
+ }
+
+ @Override
+ public boolean implies(ProtectionDomain domain, Permission permission) {
+ if (allowAll.get().get()) return allPermissions.implies(permission);
+ return permissions.implies(permission);
+ }
+
+ @Override
+ public PermissionCollection getPermissions(CodeSource codesource) {
+ return new PermissionsBuilder().addAll(allowAll.get().get()
+ ? allPermissions : permissions).toPermissions();
+ }
+
+ @Override
+ public PermissionCollection getPermissions(ProtectionDomain domain) {
+ return new PermissionsBuilder().addAll(allowAll.get().get()
+ ? allPermissions : permissions).toPermissions();
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/pkcs11/Provider/LoginISE.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.security.*;
+import javax.security.auth.callback.*;
+
+/**
+ * @test
+ * @bug 8130648
+ * @summary make sure IllegalStateException is thrown for uninitialized
+ * SunPKCS11 provider instance
+ */
+public class LoginISE {
+
+ public static void main(String[] args) throws Exception {
+
+ Provider p = Security.getProvider("SunPKCS11");
+ if (p == null) {
+ System.out.println("No un-initialized PKCS11 provider available; skip");
+ return;
+ }
+ if (!(p instanceof AuthProvider)) {
+ throw new RuntimeException("Error: expect AuthProvider!");
+ }
+ AuthProvider ap = (AuthProvider) p;
+ if (ap.isConfigured()) {
+ throw new RuntimeException("Fail: isConfigured() should return false");
+ }
+ try {
+ ap.login(null, null);
+ throw new RuntimeException("Fail: expected ISE not thrown!");
+ } catch (IllegalStateException ise) {
+ System.out.println("Expected ISE thrown for login call");
+ }
+ try {
+ ap.logout();
+ throw new RuntimeException("Fail: expected ISE not thrown!");
+ } catch (IllegalStateException ise) {
+ System.out.println("Expected ISE thrown for logout call");
+ }
+ try {
+ ap.setCallbackHandler(new PasswordCallbackHandler());
+ throw new RuntimeException("Fail: expected ISE not thrown!");
+ } catch (IllegalStateException ise) {
+ System.out.println("Expected ISE thrown for logout call");
+ }
+
+ System.out.println("Test Passed");
+ }
+
+ public static class PasswordCallbackHandler implements CallbackHandler {
+ public void handle(Callback[] callbacks)
+ throws IOException, UnsupportedCallbackException {
+ }
+ }
+}
--- a/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.java Mon Oct 12 14:41:36 2015 -0700
@@ -39,7 +39,7 @@
String host = "localhost";
- URL u = new URL("file:/home/duke");
+ URL u = new URL("file:/tmp/duke");
CodeSource cs =
new CodeSource(u, (java.security.cert.Certificate[]) null);
Permissions p = new Permissions();
--- a/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.policy Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/sun/security/provider/PolicyFile/CombinedPerms.policy Mon Oct 12 14:41:36 2015 -0700
@@ -1,3 +1,3 @@
-grant codebase "file:/home/duke" {
+grant codebase "file:/tmp/duke" {
permission java.net.SocketPermission "localhost", "accept";
};
--- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java Mon Oct 12 14:41:36 2015 -0700
@@ -40,7 +40,6 @@
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import sun.misc.IOUtils;
import sun.security.pkcs.ContentInfo;
import sun.security.pkcs.PKCS7;
import sun.security.pkcs.PKCS9Attribute;
@@ -343,7 +342,7 @@
try (JarFile jf = new JarFile(file)) {
JarEntry je = jf.getJarEntry("META-INF/OLD.RSA");
try (InputStream is = jf.getInputStream(je)) {
- byte[] content = IOUtils.readFully(is, -1, true);
+ byte[] content = is.readAllBytes();
PKCS7 p7 = new PKCS7(content);
SignerInfo[] si = p7.getSignerInfos();
if (si == null || si.length == 0) {
--- a/jdk/test/sun/security/util/DerValue/BadValue.java Mon Oct 12 16:26:58 2015 +0300
+++ b/jdk/test/sun/security/util/DerValue/BadValue.java Mon Oct 12 14:41:36 2015 -0700
@@ -25,13 +25,11 @@
* @test
* @bug 6864911
* @summary ASN.1/DER input stream parser needs more work
- * @modules java.base/sun.misc
- * java.base/sun.security.util
+ * @modules java.base/sun.security.util
*/
import java.io.*;
import sun.security.util.*;
-import sun.misc.IOUtils;
public class BadValue {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/util/resources/TimeZone/Bug8139107.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8139107
+ * @summary Test that date parsing with DateTimeFormatter pattern
+ * that contains timezone field doesn't trigger NPE. All supported
+ * locales are tested.
+ * @run testng/othervm -Djava.locale.providers=JRE,SPI Bug8139107
+ */
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+import org.testng.annotations.Test;
+
+public class Bug8139107 {
+
+ @Test
+ public void testSupportedLocales() {
+ for (Locale loc:Locale.getAvailableLocales()) {
+ testLocale(loc);
+ }
+ }
+
+ //Test one locale
+ void testLocale(Locale tl) {
+ System.out.println("Locale:" + tl);
+ DateTimeFormatter inputDateTimeFormat = DateTimeFormatter
+ .ofPattern(pattern)
+ .withLocale(tl);
+ System.out.println("Parse result: " + inputDateTimeFormat.parse(inputDate));
+ }
+
+ // Input date time string with short time zone name
+ static final String inputDate = "06-10-2015 18:58:04 MSK";
+ // Pattern with time zone field
+ static final String pattern = "dd-MM-yyyy HH:mm:ss z";
+}
+
--- a/langtools/.hgtags Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/.hgtags Mon Oct 12 14:41:36 2015 -0700
@@ -326,3 +326,5 @@
ead8b7192f00417185f0e64d0cb332f0f8ad4ae1 jdk9-b81
d68904d5a00e7e6c714e11f7ec9d0689af959d79 jdk9-b82
6b3b94a2ebca4a99b2effefb2a1556cee954fd2f jdk9-b83
+e3445ccab58f741801021dec9aa46e7f2c09efd9 jdk9-b84
+7ef2c66892a3af15540c2800104c660c4f7f45e9 jdk9-b85
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java Mon Oct 12 14:41:36 2015 -0700
@@ -3781,11 +3781,24 @@
* Compute a hash code on a type.
*/
public int hashCode(Type t) {
- return hashCode.visit(t);
+ return hashCode(t, false);
+ }
+
+ public int hashCode(Type t, boolean strict) {
+ return strict ?
+ hashCodeStrictVisitor.visit(t) :
+ hashCodeVisitor.visit(t);
}
// where
- private static final UnaryVisitor<Integer> hashCode = new UnaryVisitor<Integer>() {
-
+ private static final HashCodeVisitor hashCodeVisitor = new HashCodeVisitor();
+ private static final HashCodeVisitor hashCodeStrictVisitor = new HashCodeVisitor() {
+ @Override
+ public Integer visitTypeVar(TypeVar t, Void ignored) {
+ return System.identityHashCode(t);
+ }
+ };
+
+ private static class HashCodeVisitor extends UnaryVisitor<Integer> {
public Integer visitType(Type t, Void ignored) {
return t.getTag().ordinal();
}
@@ -3841,7 +3854,7 @@
public Integer visitErrorType(ErrorType t, Void ignored) {
return 0;
}
- };
+ }
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Return-Type-Substitutable">
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java Mon Oct 12 14:41:36 2015 -0700
@@ -29,6 +29,7 @@
import com.sun.tools.javac.code.Source;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.Types;
+import com.sun.tools.javac.comp.ArgumentAttr.LocalCacheContext;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.JCTree.JCBlock;
import com.sun.tools.javac.tree.JCTree.JCClassDecl;
@@ -54,7 +55,6 @@
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.DefinedBy;
import com.sun.tools.javac.util.DefinedBy.Api;
-import com.sun.tools.javac.util.Filter;
import com.sun.tools.javac.util.JCDiagnostic;
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
import com.sun.tools.javac.util.List;
@@ -72,7 +72,6 @@
import static com.sun.tools.javac.code.Flags.SYNTHETIC;
import static com.sun.tools.javac.code.TypeTag.CLASS;
import static com.sun.tools.javac.tree.JCTree.Tag.APPLY;
-import static com.sun.tools.javac.tree.JCTree.Tag.CLASSDEF;
import static com.sun.tools.javac.tree.JCTree.Tag.METHODDEF;
import static com.sun.tools.javac.tree.JCTree.Tag.NEWCLASS;
import static com.sun.tools.javac.tree.JCTree.Tag.TYPEAPPLY;
@@ -88,6 +87,7 @@
final Log log;
final Attr attr;
final DeferredAttr deferredAttr;
+ final ArgumentAttr argumentAttr;
final TreeMaker make;
final Names names;
private final boolean allowDiamondWithAnonymousClassCreation;
@@ -107,6 +107,7 @@
log = Log.instance(context);
attr = Attr.instance(context);
deferredAttr = DeferredAttr.instance(context);
+ argumentAttr = ArgumentAttr.instance(context);
make = TreeMaker.instance(context);
names = Names.instance(context);
Options options = Options.instance(context);
@@ -363,8 +364,13 @@
TreeMapper treeMapper = new TreeMapper(context);
//TODO: to further refine the analysis, try all rewriting combinations
- deferredAttr.attribSpeculative(fakeBlock, env, attr.statInfo, treeMapper,
- t -> new AnalyzeDeferredDiagHandler(context));
+ LocalCacheContext localCacheContext = argumentAttr.withLocalCacheContext();
+ try {
+ deferredAttr.attribSpeculative(fakeBlock, env, attr.statInfo, treeMapper,
+ t -> new AnalyzeDeferredDiagHandler(context));
+ } finally {
+ localCacheContext.leave();
+ }
context.treeMap.entrySet().forEach(e -> {
context.treesToAnalyzer.get(e.getKey())
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java Mon Oct 12 14:41:36 2015 -0700
@@ -109,9 +109,6 @@
/** Cache for argument types; behavior is influences by the currrently selected cache policy. */
Map<UniquePos, ArgumentType<?>> argumentTypeCache = new LinkedHashMap<>();
- /** Cache policy: should argument types be cached? */
- private CachePolicy cachePolicy = CachePolicy.CACHE;
-
public static ArgumentAttr instance(Context context) {
ArgumentAttr instance = context.get(methodAttrKey);
if (instance == null)
@@ -160,12 +157,29 @@
}
/**
- * Sets given ache policy and returns current policy.
+ * Returns a local caching context in which argument types can safely be cached without
+ * the risk of polluting enclosing contexts. This is useful when attempting speculative
+ * attribution of potentially erroneous expressions, which could end up polluting the cache.
+ */
+ LocalCacheContext withLocalCacheContext() {
+ return new LocalCacheContext();
+ }
+
+ /**
+ * Local cache context; this class keeps track of the previous cache and reverts to it
+ * when the {@link LocalCacheContext#leave()} method is called.
*/
- CachePolicy withCachePolicy(CachePolicy newPolicy) {
- CachePolicy oldPolicy = this.cachePolicy;
- this.cachePolicy = newPolicy;
- return oldPolicy;
+ class LocalCacheContext {
+ Map<UniquePos, ArgumentType<?>> prevCache;
+
+ public LocalCacheContext() {
+ this.prevCache = argumentTypeCache;
+ argumentTypeCache = new HashMap<>();
+ }
+
+ public void leave() {
+ argumentTypeCache = prevCache;
+ }
}
/**
@@ -226,9 +240,7 @@
setResult(that, cached.dup(that, env));
} else {
Z res = argumentTypeFactory.get();
- if (cachePolicy == CachePolicy.CACHE) {
- argumentTypeCache.put(pos, res);
- }
+ argumentTypeCache.put(pos, res);
setResult(that, res);
}
}
@@ -341,7 +353,7 @@
speculativeTypes.put(resultInfo, t);
return t;
} else {
- if (!env.info.isSpeculative && cachePolicy == CachePolicy.CACHE) {
+ if (!env.info.isSpeculative) {
argumentTypeCache.remove(new UniquePos(dt.tree));
}
return deferredAttr.basicCompleter.complete(dt, resultInfo, deferredAttrContext);
@@ -663,17 +675,4 @@
return source.getFile().getName() + " @ " + source.getLineNumber(pos);
}
}
-
- /**
- * Argument type caching policy.
- */
- enum CachePolicy {
- /** Cache argument types. */
- CACHE,
- /**
- * Don't cache argument types. This is useful when performing speculative attribution on
- * a tree that is known to contain erroneous info.
- */
- NO_CACHE;
- }
}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Mon Oct 12 14:41:36 2015 -0700
@@ -2215,7 +2215,7 @@
inferenceContext.addFreeTypeListener(List.of(tree.constructorType, tree.clazz.type),
instantiatedContext -> {
tree.constructorType = instantiatedContext.asInstType(tree.constructorType);
- clazz.type = instantiatedContext.asInstType(clazz.type);
+ tree.clazz.type = clazz.type = instantiatedContext.asInstType(clazz.type);
ResultInfo prevResult = this.resultInfo;
try {
this.resultInfo = resultInfoForClassDefinition;
@@ -3733,17 +3733,17 @@
" in tree " + tree);
}
- // Test (1): emit a `deprecation' warning if symbol is deprecated.
- // (for constructors, the error was given when the constructor was
- // resolved)
-
- if (sym.name != names.init) {
+ // Emit a `deprecation' warning if symbol is deprecated.
+ // (for constructors (but not for constructor references), the error
+ // was given when the constructor was resolved)
+
+ if (sym.name != names.init || tree.hasTag(REFERENCE)) {
chk.checkDeprecated(tree.pos(), env.info.scope.owner, sym);
chk.checkSunAPI(tree.pos(), sym);
chk.checkProfile(tree.pos(), sym);
}
- // Test (3): if symbol is a variable, check that its type and
+ // If symbol is a variable, check that its type and
// kind are compatible with the prototype and protokind.
return check(tree, owntype, sym.kind.toSelector(), resultInfo);
}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java Mon Oct 12 14:41:36 2015 -0700
@@ -808,7 +808,7 @@
*/
List<Type> checkDiamondDenotable(ClassType t) {
ListBuffer<Type> buf = new ListBuffer<>();
- for (Type arg : t.getTypeArguments()) {
+ for (Type arg : t.allparams()) {
if (!diamondTypeChecker.visit(arg, null)) {
buf.append(arg);
}
@@ -831,7 +831,7 @@
if (t.isCompound()) {
return false;
}
- for (Type targ : t.getTypeArguments()) {
+ for (Type targ : t.allparams()) {
if (!visit(targ, s)) {
return false;
}
@@ -842,13 +842,16 @@
@Override
public Boolean visitTypeVar(TypeVar t, Void s) {
/* Any type variable mentioned in the inferred type must have been declared as a type parameter
- (i.e cannot have been produced by capture conversion (5.1.10) or by inference (18.4)
+ (i.e cannot have been produced by inference (18.4))
*/
return t.tsym.owner.type.getTypeArguments().contains(t);
}
@Override
public Boolean visitCapturedType(CapturedType t, Void s) {
+ /* Any type variable mentioned in the inferred type must have been declared as a type parameter
+ (i.e cannot have been produced by capture conversion (5.1.10))
+ */
return false;
}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Mon Oct 12 14:41:36 2015 -0700
@@ -29,7 +29,7 @@
import com.sun.source.tree.NewClassTree;
import com.sun.tools.javac.code.*;
import com.sun.tools.javac.code.Type.TypeMapping;
-import com.sun.tools.javac.comp.ArgumentAttr.CachePolicy;
+import com.sun.tools.javac.comp.ArgumentAttr.LocalCacheContext;
import com.sun.tools.javac.comp.Resolve.ResolveError;
import com.sun.tools.javac.resources.CompilerProperties.Fragments;
import com.sun.tools.javac.tree.*;
@@ -777,14 +777,14 @@
boolean canLambdaBodyCompleteNormally(JCLambda tree) {
List<JCVariableDecl> oldParams = tree.params;
- CachePolicy prevPolicy = argumentAttr.withCachePolicy(CachePolicy.NO_CACHE);
+ LocalCacheContext localCacheContext = argumentAttr.withLocalCacheContext();
try {
tree.params = tree.params.stream()
.map(vd -> make.VarDef(vd.mods, vd.name, make.Erroneous(), null))
.collect(List.collector());
return attribSpeculativeLambda(tree, env, attr.unknownExprInfo).canCompleteNormally;
} finally {
- argumentAttr.withCachePolicy(prevPolicy);
+ localCacheContext.leave();
tree.params = oldParams;
}
}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Mon Oct 12 14:41:36 2015 -0700
@@ -1254,9 +1254,9 @@
public int hashCode() {
int result = opKind.hashCode();
result *= 127;
- result += types.hashCode(op1);
+ result += types.hashCode(op1, true);
result *= 127;
- result += types.hashCode(op2);
+ result += types.hashCode(op2, true);
return result;
}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java Mon Oct 12 14:41:36 2015 -0700
@@ -290,6 +290,13 @@
}
public boolean isAccessible(Env<AttrContext> env, TypeSymbol c, boolean checkInner) {
+
+ /* 15.9.5.1: Note that it is possible for the signature of the anonymous constructor
+ to refer to an inaccessible type
+ */
+ if (env.enclMethod != null && (env.enclMethod.mods.flags & ANONCONSTR) != 0)
+ return true;
+
boolean isAccessible = false;
switch ((short)(c.flags() & AccessFlags)) {
case PRIVATE:
@@ -301,13 +308,7 @@
isAccessible =
env.toplevel.packge == c.owner // fast special case
||
- env.toplevel.packge == c.packge()
- ||
- // Hack: this case is added since synthesized default constructors
- // of anonymous classes should be allowed to access
- // classes which would be inaccessible otherwise.
- env.enclMethod != null &&
- (env.enclMethod.mods.flags & ANONCONSTR) != 0;
+ env.toplevel.packge == c.packge();
break;
default: // error recovery
case PUBLIC:
@@ -361,6 +362,13 @@
}
public boolean isAccessible(Env<AttrContext> env, Type site, Symbol sym, boolean checkInner) {
if (sym.name == names.init && sym.owner != site.tsym) return false;
+
+ /* 15.9.5.1: Note that it is possible for the signature of the anonymous constructor
+ to refer to an inaccessible type
+ */
+ if (env.enclMethod != null && (env.enclMethod.mods.flags & ANONCONSTR) != 0)
+ return true;
+
switch ((short)(sym.flags() & AccessFlags)) {
case PRIVATE:
return
@@ -2426,7 +2434,9 @@
return spMethod;
}
};
- polymorphicSignatureScope.enter(msym);
+ if (!mtype.isErroneous()) { // Cache only if kosher.
+ polymorphicSignatureScope.enter(msym);
+ }
return msym;
}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java Mon Oct 12 14:41:36 2015 -0700
@@ -194,7 +194,7 @@
dependencies.push((ClassSymbol) sym, CompletionCause.MEMBER_ENTER);
try {
- queue = completeClass.runPhase(List.of(typeEnvs.get((ClassSymbol) sym)));
+ queue = completeClass.completeEnvs(List.of(typeEnvs.get((ClassSymbol) sym)));
} finally {
dependencies.pop();
}
@@ -237,9 +237,22 @@
this.next = next;
}
- public List<Env<AttrContext>> runPhase(List<Env<AttrContext>> envs) {
+ public final List<Env<AttrContext>> completeEnvs(List<Env<AttrContext>> envs) {
boolean firstToComplete = queue.isEmpty();
+ doCompleteEnvs(envs);
+
+ if (firstToComplete) {
+ List<Env<AttrContext>> out = queue.toList();
+
+ queue.clear();
+ return next != null ? next.completeEnvs(out) : out;
+ } else {
+ return List.nil();
+ }
+ }
+
+ protected void doCompleteEnvs(List<Env<AttrContext>> envs) {
for (Env<AttrContext> env : envs) {
JCClassDecl tree = (JCClassDecl)env.tree;
@@ -249,7 +262,7 @@
DiagnosticPosition prevLintPos = deferredLintHandler.setPos(tree.pos());
try {
dependencies.push(env.enclClass.sym, phaseName);
- doRunPhase(env);
+ runPhase(env);
} catch (CompletionFailure ex) {
chk.completionError(tree.pos(), ex);
} finally {
@@ -258,18 +271,9 @@
log.useSource(prev);
}
}
-
- if (firstToComplete) {
- List<Env<AttrContext>> out = queue.toList();
+ }
- queue.clear();
- return next != null ? next.runPhase(out) : out;
- } else {
- return List.nil();
- }
- }
-
- protected abstract void doRunPhase(Env<AttrContext> env);
+ protected abstract void runPhase(Env<AttrContext> env);
}
private final ImportsPhase completeClass = new ImportsPhase();
@@ -289,7 +293,7 @@
(imp, cf) -> chk.completionError(imp.pos(), cf);
@Override
- protected void doRunPhase(Env<AttrContext> env) {
+ protected void runPhase(Env<AttrContext> env) {
JCClassDecl tree = env.enclClass;
ClassSymbol sym = tree.sym;
@@ -699,14 +703,29 @@
}
}
- private final class HierarchyPhase extends AbstractHeaderPhase {
+ private final class HierarchyPhase extends AbstractHeaderPhase implements Completer {
public HierarchyPhase() {
super(CompletionCause.HIERARCHY_PHASE, new HeaderPhase());
}
@Override
- protected void doRunPhase(Env<AttrContext> env) {
+ protected void doCompleteEnvs(List<Env<AttrContext>> envs) {
+ //The ClassSymbols in the envs list may not be in the dependency order.
+ //To get proper results, for every class or interface C, the supertypes of
+ //C must be processed by the HierarchyPhase phase before C.
+ //To achieve that, the HierarchyPhase is registered as the Completer for
+ //all the classes first, and then all the classes are completed.
+ for (Env<AttrContext> env : envs) {
+ env.enclClass.sym.completer = this;
+ }
+ for (Env<AttrContext> env : envs) {
+ env.enclClass.sym.complete();
+ }
+ }
+
+ @Override
+ protected void runPhase(Env<AttrContext> env) {
JCClassDecl tree = env.enclClass;
ClassSymbol sym = tree.sym;
ClassType ct = (ClassType)sym.type;
@@ -760,6 +779,14 @@
}
return false;
}
+
+ @Override
+ public void complete(Symbol sym) throws CompletionFailure {
+ Env<AttrContext> env = typeEnvs.get((ClassSymbol) sym);
+
+ super.doCompleteEnvs(List.of(env));
+ }
+
}
private final class HeaderPhase extends AbstractHeaderPhase {
@@ -769,7 +796,7 @@
}
@Override
- protected void doRunPhase(Env<AttrContext> env) {
+ protected void runPhase(Env<AttrContext> env) {
JCClassDecl tree = env.enclClass;
ClassSymbol sym = tree.sym;
ClassType ct = (ClassType)sym.type;
@@ -824,7 +851,7 @@
}
@Override
- protected void doRunPhase(Env<AttrContext> env) {
+ protected void runPhase(Env<AttrContext> env) {
JCClassDecl tree = env.enclClass;
ClassSymbol sym = tree.sym;
ClassType ct = (ClassType)sym.type;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties Mon Oct 12 14:41:36 2015 -0700
@@ -320,9 +320,9 @@
javac.msg.bug=\
An exception has occurred in the compiler ({0}). \
-Please file a bug at the Java Bug Database (http://bugreport.java.com/bugreport/) \
-after checking the database for duplicates. \
-Include your program and the following diagnostic in your report. Thank you.
+Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) \
+after checking the Bug Database (http://bugs.java.com) for duplicates. \
+Include your program and the following diagnostic in your report. Thank you.
javac.msg.io=\
\n\nAn input/output error occurred.\n\
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/AnonymousClass/CtorAccessBypassTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8075799
+ *
+ * @summary Extraneous access checks implemented by javac
+ * @compile CtorAccessBypassTest.java
+ * @run main CtorAccessBypassTest
+ *
+ */
+
+public class CtorAccessBypassTest {
+ public static void main(String[] args) {
+ new CtorAccessBypassTest_01<Object>(null) {};
+ new CtorAccessBypassTest_01<>(null) {};
+ }
+}
+
+class CtorAccessBypassTest_01<T> {
+ private class Private {}
+ CtorAccessBypassTest_01(Private p) {
+ }
+}
--- a/langtools/test/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTestBase.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/test/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTestBase.java Mon Oct 12 14:41:36 2015 -0700
@@ -23,6 +23,7 @@
import com.sun.tools.classfile.*;
+import java.nio.file.Paths;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -62,6 +63,7 @@
boolean failed = false;
for (TestCase testCase : testCases) {
try {
+ writeToFileIfEnabled(Paths.get(testCase.getName() + ".java"), testCase.src);
Set<Integer> coveredLines = new HashSet<>();
for (JavaFileObject file : compile(testCase.src).getClasses().values()) {
ClassFile classFile = ClassFile.read(file.openInputStream());
--- a/langtools/test/tools/javac/classfiles/attributes/annotations/AnnotationsTestBase.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/test/tools/javac/classfiles/attributes/annotations/AnnotationsTestBase.java Mon Oct 12 14:41:36 2015 -0700
@@ -218,7 +218,7 @@
String source = testCase.generateSource();
Path sourceFile = Paths.get(getClass().getSimpleName() + i + ".java");
addTestCase(sourceFile.toAbsolutePath().toString());
- writeToFile(sourceFile, source);
+ writeToFileIfEnabled(sourceFile, source);
echo("Testing: " + sourceFile.toString());
try {
test(testCase, compile(source).getClasses());
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesTestBase.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesTestBase.java Mon Oct 12 14:41:36 2015 -0700
@@ -26,8 +26,10 @@
import com.sun.tools.classfile.InnerClasses_attribute;
import com.sun.tools.classfile.InnerClasses_attribute.Info;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -87,8 +89,13 @@
*/
public void test(String classToTest, String...skipClasses) throws TestFailedException {
try {
- for (TestCase test : generateTestCases()) {
- addTestCase(test.getSource());
+ String testName = getClass().getName();
+ List<TestCase> testCases = generateTestCases();
+ for (int i = 0; i < testCases.size(); ++i) {
+ TestCase test = testCases.get(i);
+ String testCaseName = testName + i + ".java";
+ addTestCase(testCaseName);
+ writeToFileIfEnabled(Paths.get(testCaseName), test.getSource());
test(classToTest, test, skipClasses);
}
} catch (Exception e) {
@@ -330,7 +337,7 @@
list.add(Arrays.asList(access, mod1, mod2));
}
if (mod1 == Modifier.EMPTY) {
- list.add(Arrays.asList(access));
+ list.add(Collections.singletonList(access));
}
}
}
@@ -413,7 +420,7 @@
private final String classType;
- private ClassType(String clazz) {
+ ClassType(String clazz) {
this.classType = clazz;
}
@@ -435,7 +442,7 @@
private final String str;
- private Modifier(String str) {
+ Modifier(String str) {
this.str = str;
}
--- a/langtools/test/tools/javac/classfiles/attributes/lib/TestBase.java Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/test/tools/javac/classfiles/attributes/lib/TestBase.java Mon Oct 12 14:41:36 2015 -0700
@@ -44,6 +44,7 @@
public class TestBase {
public static final String LINE_SEPARATOR = System.lineSeparator();
+ public static final boolean isDumpOfSourceEnabled = Boolean.getBoolean("dump.src");
private <S> InMemoryFileManager compile(
List<String> options,
@@ -176,7 +177,9 @@
* @throws ConstantPoolException if constant pool error occurs
*/
public ClassFile readClassFile(File file) throws IOException, ConstantPoolException {
- return readClassFile(new FileInputStream(file));
+ try (InputStream is = new FileInputStream(file)) {
+ return readClassFile(is);
+ }
}
public void assertEquals(Object actual, Object expected, String message) {
@@ -215,6 +218,14 @@
}
}
+ public void writeToFileIfEnabled(Path path, String source) throws IOException {
+ if (isDumpOfSourceEnabled) {
+ writeToFile(path, source);
+ } else {
+ System.err.println("Source dumping disabled. To enable, run the test with '-Ddump.src=true'");
+ }
+ }
+
public File getSourceDir() {
return new File(System.getProperty("test.src", "."));
}
--- a/langtools/test/tools/javac/generics/diamond/neg/Neg18.out Mon Oct 12 16:26:58 2015 +0300
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg18.out Mon Oct 12 14:41:36 2015 -0700
@@ -1,3 +1,3 @@
Neg18.java:14:21: compiler.err.prob.found.req: (compiler.misc.cant.apply.diamond.1: (compiler.misc.diamond: pkg.Neg18_01), (compiler.misc.inaccessible.varargs.type: pkg.Neg18_01.PkgPrivate, kindname.class, Neg18))
-Neg18.java:14:26: compiler.err.not.def.public.cant.access: pkg.Neg18_01.PkgPrivate, pkg.Neg18_01
+Neg18.java:14:9: compiler.err.cant.apply.symbol: kindname.constructor, , pkg.Neg18_01.PkgPrivate[], compiler.misc.no.args, kindname.class, compiler.misc.anonymous.class: <any>, (compiler.misc.inaccessible.varargs.type: pkg.Neg18_01.PkgPrivate, kindname.class, Neg18)
2 errors
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg21.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,15 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8132535
+ * @summary Compiler fails with diamond anonymous class creation with intersection bound of enclosing class.
+ * @compile/fail/ref=Neg21.out Neg21.java -XDrawDiagnostics
+ */
+
+public class Neg21 <T extends java.io.Serializable & Cloneable> {
+
+ class A <X>{}
+
+ public void foo(){
+ new Neg21<>().new A<>(){} ;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg21.out Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,2 @@
+Neg21.java:13:28: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg21.A), (compiler.misc.diamond.invalid.arg: java.lang.Object&java.io.Serializable&java.lang.Cloneable, (compiler.misc.diamond: Neg21.A))
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg22.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,21 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8132535
+ * @summary Compiler fails with diamond anonymous class creation with intersection bound of enclosing class.
+ * @compile/fail/ref=Neg22.out Neg22.java -XDrawDiagnostics
+ */
+
+public class Neg22 {
+
+ class Outer<X extends Runnable & java.io.Serializable> {
+ class Inner<Y> { }
+ }
+
+ class Box<Z> {
+ Box(Z z) { }
+ }
+
+ {
+ new Box<>(new Outer<>().new Inner<>()) { };
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg22.out Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,2 @@
+Neg22.java:19:16: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg22.Box), (compiler.misc.diamond.invalid.arg: Neg22.Outer<java.lang.Object&java.io.Serializable&java.lang.Runnable>.Inner<java.lang.Object>, (compiler.misc.diamond: Neg22.Box))
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg23.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,12 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8132535
+ * @summary Compiler fails with diamond anonymous class creation with intersection bound of enclosing class.
+ * @compile/fail/ref=Neg23.out Neg23.java -XDrawDiagnostics
+ */
+
+public class Neg23 {
+ {
+ new pkg.Neg23_01<>().new Inner<>();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/Neg23.out Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,2 @@
+Neg23.java:10:39: compiler.err.not.def.public.cant.access: pkg.Neg23_02, pkg
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/neg/pkg/Neg23_01.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+package pkg;
+
+public class Neg23_01<X extends Neg23_02> {
+ public class Inner<Y> { }
+}
+
+class Neg23_02 {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/diamond/pos/Pos08.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8133135
+ *
+ * @summary Compiler internall error (NPE) on anonymous class defined by qualified instance creation expression with diamond
+ * @author sadayapalam
+ * @compile Pos08.java
+ *
+ */
+
+class Pos08 {
+
+ static class List<T> {
+ }
+
+ static class FooOuter {
+ class Foo<T> {
+ public Foo(){}
+ }
+ }
+
+ public static <T> List<T> m(List<T> list, T item) {
+ return list;
+ }
+
+
+ public static void run() {
+ m(new List<FooOuter.Foo<String>>(), new FooOuter().new Foo<>(){ });
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8075274/C.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+package P.Q;
+
+public class C extends D {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8075274/D.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+package P.Q;
+
+public class D {
+ public interface I {
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8075274/Outer.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8075274
+ * @summary Ensuring order of imports or inputs does not affect compilability of the sources
+ * @compile C.java D.java Outer.java
+ * @compile C.java Outer.java D.java
+ * @compile D.java C.java Outer.java
+ * @compile D.java Outer.java C.java
+ * @compile Outer.java D.java C.java
+ * @compile Outer.java C.java D.java
+ */
+package P;
+
+import static P.Outer.Nested.*;
+import static P.Q.C.*;
+
+public class Outer {
+ public static class Nested implements I {
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8133235/A.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8133235
+ * @summary Ensuring order of inputs does not affect compilability of the sources
+ * @compile A.java B.java C.java D.java
+ * @compile A.java B.java D.java C.java
+ * @compile A.java C.java B.java D.java
+ * @compile A.java C.java D.java B.java
+ * @compile A.java D.java B.java C.java
+ * @compile A.java D.java C.java B.java
+ * @compile D.java A.java B.java C.java
+ * @compile D.java A.java C.java B.java
+ * @compile D.java B.java A.java C.java
+ * @compile D.java B.java C.java A.java
+ * @compile D.java C.java B.java A.java
+ * @compile D.java C.java A.java B.java
+ */
+package pkg;
+
+public class A {
+ public interface One {
+ public interface N2 {
+ public class N3 { }
+ }
+
+ public class Foo extends D {}
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8133235/B.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+package pkg;
+
+import pkg.A;
+
+public class B extends A {
+ public static interface Two {
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8133235/C.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+package pkg;
+
+import pkg.B.Two;
+
+public class C implements B.One {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8133235/D.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+package pkg;
+
+import static pkg.C.*;
+
+public class D implements C.N2 {
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/MethodHandleInvokeTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8130506
+ * @summary javac AssertionError when invoking MethodHandle.invoke with lambda paramterer
+ * @run main MethodHandleInvokeTest
+ */
+
+import java.lang.invoke.MethodHandle;
+
+public class MethodHandleInvokeTest {
+
+ private static interface Obj2Obj {
+ Object run(Object obj) throws Throwable;
+ }
+
+ private static void m(Obj2Obj param) {
+ }
+
+ public static void main(String[] args) {
+ m((obj) -> {
+ MethodHandle mhandle = null;
+ mhandle.invoke(obj);
+ return null;
+ });
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/DeprecationSE8Test.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,47 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 8065219
+ * @summary Deprecated warning in method reference are missing in some cases.
+ * @compile/ref=DeprecationSE8Test.noLint.out -XDrawDiagnostics DeprecationSE8Test.java
+ * @compile/ref=DeprecationSE8Test.out -Xlint:deprecation,-options -source 8 -XDrawDiagnostics DeprecationSE8Test.java
+ */
+
+
+class DeprecationSE8Test {
+ @FunctionalInterface
+ interface I {
+ DeprecationSE8Test meth();
+ }
+
+ @FunctionalInterface
+ interface J {
+ int meth();
+ }
+
+ @Deprecated
+ public DeprecationSE8Test() {
+ }
+
+ @Deprecated
+ public static int foo() {
+ return 1;
+ }
+
+ // Using deprecated entities from within one's own top level class does not merit warning.
+ void notBadUsages() {
+ I i = DeprecationSE8Test::new;
+ new DeprecationSE8Test();
+ J j = DeprecationSE8Test::foo;
+ foo();
+ }
+}
+
+class DeprecationSE8_01 {
+ // Using deprecated entities from outside one's own top level class deserves warning.
+ void badUsages() {
+ DeprecationSE8Test.I i = DeprecationSE8Test::new;
+ new DeprecationSE8Test();
+ DeprecationSE8Test.foo();
+ DeprecationSE8Test.J j = DeprecationSE8Test::foo;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/DeprecationSE8Test.noLint.out Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,2 @@
+- compiler.note.deprecated.filename: DeprecationSE8Test.java
+- compiler.note.deprecated.recompile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/DeprecationSE8Test.out Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,5 @@
+DeprecationSE8Test.java:42:34: compiler.warn.has.been.deprecated: DeprecationSE8Test(), DeprecationSE8Test
+DeprecationSE8Test.java:43:9: compiler.warn.has.been.deprecated: DeprecationSE8Test(), DeprecationSE8Test
+DeprecationSE8Test.java:44:27: compiler.warn.has.been.deprecated: foo(), DeprecationSE8Test
+DeprecationSE8Test.java:45:34: compiler.warn.has.been.deprecated: foo(), DeprecationSE8Test
+4 warnings
--- a/make/Init.gmk Mon Oct 12 16:26:58 2015 +0300
+++ b/make/Init.gmk Mon Oct 12 14:41:36 2015 -0700
@@ -287,7 +287,7 @@
$(call StartGlobalTimer)
$(call PrepareSmartJavac)
( cd $(TOPDIR) && \
- $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
+ $(BUILD_LOG_WRAPPER) $(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
-j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
$(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) || \
( exitcode=$$? && $(BUILD_LOG_WRAPPER) \
--- a/make/Main.gmk Mon Oct 12 16:26:58 2015 +0300
+++ b/make/Main.gmk Mon Oct 12 14:41:36 2015 -0700
@@ -72,9 +72,6 @@
interim-langtools:
+($(CD) $(LANGTOOLS_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
-interim-corba:
- +($(CD) $(CORBA_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterim.gmk)
-
interim-rmic:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
@@ -84,7 +81,7 @@
buildtools-jdk:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Tools.gmk java-tools)
-ALL_TARGETS += buildtools-langtools interim-langtools interim-corba \
+ALL_TARGETS += buildtools-langtools interim-langtools \
interim-rmic interim-cldrconverter buildtools-jdk
################################################################################
@@ -357,13 +354,11 @@
$(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk
- interim-corba: $(CORBA_GENSRC_TARGETS)
-
$(GENDATA_TARGETS): interim-langtools buildtools-jdk
interim-rmic: interim-langtools
- $(RMIC_TARGETS): interim-langtools interim-corba interim-rmic
+ $(RMIC_TARGETS): interim-langtools interim-rmic
$(JAVA_TARGETS): interim-langtools
@@ -463,7 +458,7 @@
################################################################################
# Virtual targets without recipes
-buildtools: buildtools-langtools interim-langtools interim-corba interim-rmic \
+buildtools: buildtools-langtools interim-langtools interim-rmic \
buildtools-jdk
gensrc: $(GENSRC_TARGETS)
--- a/make/StripBinaries.gmk Mon Oct 12 16:26:58 2015 +0300
+++ b/make/StripBinaries.gmk Mon Oct 12 14:41:36 2015 -0700
@@ -38,13 +38,13 @@
MODULES_CMDS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped
MODULES_LIBS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped
-ifneq ($(POST_STRIP_CMD), )
+ifneq ($(STRIP), )
define StripRecipe
$(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<)
$(MKDIR) -p $(@D)
$(CP) $< $@.tmp
$(CHMOD) u+w $@.tmp
- $(POST_STRIP_CMD) $@.tmp
+ $(STRIP) $(STRIPFLAGS) $@.tmp
$(CHMOD) go-w $@.tmp
$(MV) $@.tmp $@
endef
--- a/make/common/JavaCompilation.gmk Mon Oct 12 16:26:58 2015 +0300
+++ b/make/common/JavaCompilation.gmk Mon Oct 12 14:41:36 2015 -0700
@@ -122,9 +122,9 @@
$1_GREP_INCLUDES:=| ( $(GREP) $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_INCLUDE_PATTERNS)) \
|| test "$$$$?" = "1" )
else
- $1_GREP_INCLUDE_OUTPUT:=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_include $$(NEWLINE) \
- $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS,\n, \
- >> $$($1_BIN)/_the.$$($1_JARNAME)_include)
+ $1_GREP_INCLUDE_OUTPUT = \
+ $$(eval $$(call ListPathsSafely,$1_GREP_INCLUDE_PATTERNS, \
+ $$($1_BIN)/_the.$$($1_JARNAME)_include))
$1_GREP_INCLUDES:=| ( $(GREP) -f $$($1_BIN)/_the.$$($1_JARNAME)_include \
|| test "$$$$?" = "1" )
endif
@@ -138,9 +138,9 @@
$1_GREP_EXCLUDES:=| ( $(GREP) -v $$(patsubst %,$(SPACE)-e$(SPACE)$(DQUOTE)%$(DQUOTE),$$($1_GREP_EXCLUDE_PATTERNS)) \
|| test "$$$$?" = "1" )
else
- $1_GREP_EXCLUDE_OUTPUT=$(RM) $$($1_BIN)/_the.$$($1_JARNAME)_exclude $$(NEWLINE) \
- $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS,\n, \
- >> $$($1_BIN)/_the.$$($1_JARNAME)_exclude)
+ $1_GREP_EXCLUDE_OUTPUT = \
+ $$(eval $$(call ListPathsSafely,$1_GREP_EXCLUDE_PATTERNS, \
+ $$($1_BIN)/_the.$$($1_JARNAME)_exclude))
$1_GREP_EXCLUDES:=| ( $(GREP) -v -f $$($1_BIN)/_the.$$($1_JARNAME)_exclude \
|| test "$$$$?" = "1" )
endif
@@ -190,13 +190,12 @@
# The EXTRA_FILES_RESOLVED varible must be set in the macro so that it's evaluated
# in the recipe when the files are guaranteed to exist.
$1_CAPTURE_EXTRA_FILES=\
- $(RM) $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra $$(NEWLINE) \
- $$(eval $1_EXTRA_FILES_RESOLVED:=$$(call DoubleDollar, $$(call DoubleDollar, \
+ $$(eval $1_EXTRA_FILES_RESOLVED:=$$(call DoubleDollar, \
$$(wildcard $$(foreach src, $$($1_SRCS), \
- $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES))))) \
+ $$(addprefix $$(src)/, $$($1_EXTRA_FILES))) $$($1_EXTRA_FILES)))) \
$$(if $$($1_EXTRA_FILES_RESOLVED), \
- $$(call ListPathsSafely,$1_EXTRA_FILES_RESOLVED,\n, \
- >> $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra) $$(NEWLINE) \
+ $$(eval $$(call ListPathsSafely,$1_EXTRA_FILES_RESOLVED, \
+ $$($1_BIN)/_the.$$($1_JARNAME)_contents.extra)) \
$(SED) $$(foreach src,$$($1_SRCS), -e 's|$$(src)/|-C $$(src) |g') \
$$($1_BIN)/_the.$$($1_JARNAME)_contents.extra \
>> $$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE))
@@ -577,7 +576,7 @@
$$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
$(MKDIR) -p $$(@D) $$(dir $$($1_SJAVAC_PORTFILE))
- $$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
+ $$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
$(ECHO) Compiling $1
$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
$$($1_JVM) $$($1_SJAVAC) \
@@ -636,8 +635,7 @@
# When not using sjavac, pass along all sources to javac using an @file.
$$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
$(MKDIR) -p $$(@D)
- $(RM) $$($1_BIN)/_the.$1_batch $$($1_BIN)/_the.$1_batch.tmp
- $$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
+ $$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
$$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
--- a/make/common/MakeBase.gmk Mon Oct 12 16:26:58 2015 +0300
+++ b/make/common/MakeBase.gmk Mon Oct 12 14:41:36 2015 -0700
@@ -64,6 +64,11 @@
endef
+# In GNU Make 4.0 and higher, there is a file function for writing to files.
+ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
+ HAS_FILE_FUNCTION := true
+endif
+
##############################
# Functions
##############################
@@ -122,266 +127,111 @@
DoubleDollar = $(subst $$,$$$$,$(strip $1))
################################################################################
+# ListPathsSafely can be used to print command parameters to a file. This is
+# typically done if the command line lenght risk being too long for the
+# OS/shell. In later make versions, the file function can be used for this
+# purpose. For earlier versions, a more complex implementation is provided.
+#
+# The function ListPathsSafely can be called either directly or, more commonly
+# from a recipe line. If called from a recipe, it will be executed in the
+# evaluation phase of that recipe, which means that it will write to the file
+# before any other line in the recipe has been run.
+ifeq ($(HAS_FILE_FUNCTION), true)
+ # Param 1 - Name of variable containing paths/arguments to output
+ # Param 2 - File to print to
+ # Param 3 - Set to true to append to file instead of overwriting
+ define ListPathsSafely
+ $$(call MakeDir, $$(dir $$(strip $2)))
+ $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
+ $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
+ endef
-# If the variable that you want to send to stdout for piping into a file or otherwise,
-# is potentially long, for example the a list of file paths, eg a list of all package directories.
-# Then you need to use ListPathsSafely, which optimistically splits the output into several shell
-# calls as well as use compression on recurrent file paths segments, to get around the potential
-# command line length problem that exists in cygwin and other shells.
-compress_pre:=$(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-pre-compress.incl))
-compress_post:=$(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-post-compress.incl))
-compress_paths=$(compress_pre)\
+else # HAS_FILE_FUNCTION
+
+ $(eval compress_paths = \
+ $(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-pre-compress.incl)))
+ compress_paths += \
$(subst $(SRC_ROOT),X97,\
$(subst $(OUTPUT_ROOT),X98,\
$(subst X,X00,\
-$(subst $(SPACE),\n,$(strip $1)))))\
-$(compress_post)
-
-decompress_paths=$(SED) -f $(SRC_ROOT)/make/common/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \
- -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
- -e 's|X00|X|g' | tr '\n' '$2'
-
-define ListPathsSafely_If
- $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
-endef
-
-define ListPathsSafely_Printf
- $(if $(strip $($1_LPS$4)),$(if $(findstring $(LOG_LEVEL),trace),,@)printf \
- -- "$(strip $(call EscapeDollar, $($1_LPS$4)))\n" | $(decompress_paths) $3)
-endef
-
-# Receipt example:
-# rm -f thepaths
-# $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
-# The \n argument means translate spaces into \n
-# if instead , , (a space) is supplied, then spaces remain spaces.
-define ListPathsSafely
- $(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!))
- $(ECHO) $(LOG_DEBUG) Writing $(words $($1)) paths to '$3'
- $(call ListPathsSafely_If,$1,$2,1,250)
- $(call ListPathsSafely_If,$1,$2,251,500)
- $(call ListPathsSafely_If,$1,$2,501,750)
- $(call ListPathsSafely_If,$1,$2,751,1000)
-
- $(call ListPathsSafely_If,$1,$2,1001,1250)
- $(call ListPathsSafely_If,$1,$2,1251,1500)
- $(call ListPathsSafely_If,$1,$2,1501,1750)
- $(call ListPathsSafely_If,$1,$2,1751,2000)
-
- $(call ListPathsSafely_If,$1,$2,2001,2250)
- $(call ListPathsSafely_If,$1,$2,2251,2500)
- $(call ListPathsSafely_If,$1,$2,2501,2750)
- $(call ListPathsSafely_If,$1,$2,2751,3000)
-
- $(call ListPathsSafely_If,$1,$2,3001,3250)
- $(call ListPathsSafely_If,$1,$2,3251,3500)
- $(call ListPathsSafely_If,$1,$2,3501,3750)
- $(call ListPathsSafely_If,$1,$2,3751,4000)
+ $(subst $(SPACE),\n,$(strip $1)))))
+ $(eval compress_paths += \
+ $(strip $(shell $(CAT) $(SRC_ROOT)/make/common/support/ListPathsSafely-post-compress.incl)))
- $(call ListPathsSafely_If,$1,$2,4001,4250)
- $(call ListPathsSafely_If,$1,$2,4251,4500)
- $(call ListPathsSafely_If,$1,$2,4501,4750)
- $(call ListPathsSafely_If,$1,$2,4751,5000)
-
- $(call ListPathsSafely_If,$1,$2,5001,5250)
- $(call ListPathsSafely_If,$1,$2,5251,5500)
- $(call ListPathsSafely_If,$1,$2,5501,5750)
- $(call ListPathsSafely_If,$1,$2,5751,6000)
-
- $(call ListPathsSafely_If,$1,$2,6001,6250)
- $(call ListPathsSafely_If,$1,$2,6251,6500)
- $(call ListPathsSafely_If,$1,$2,6501,6750)
- $(call ListPathsSafely_If,$1,$2,6751,7000)
-
- $(call ListPathsSafely_If,$1,$2,7001,7250)
- $(call ListPathsSafely_If,$1,$2,7251,7500)
- $(call ListPathsSafely_If,$1,$2,7501,7750)
- $(call ListPathsSafely_If,$1,$2,7751,8000)
-
- $(call ListPathsSafely_If,$1,$2,8001,8250)
- $(call ListPathsSafely_If,$1,$2,8251,8500)
- $(call ListPathsSafely_If,$1,$2,8501,8750)
- $(call ListPathsSafely_If,$1,$2,8751,9000)
-
- $(call ListPathsSafely_If,$1,$2,9001,9250)
- $(call ListPathsSafely_If,$1,$2,9251,9500)
- $(call ListPathsSafely_If,$1,$2,9501,9750)
- $(call ListPathsSafely_If,$1,$2,9751,10000)
-
- $(call ListPathsSafely_If,$1,$2,10001,10250)
- $(call ListPathsSafely_If,$1,$2,10251,10500)
- $(call ListPathsSafely_If,$1,$2,10501,10750)
- $(call ListPathsSafely_If,$1,$2,10751,11000)
-
- $(call ListPathsSafely_If,$1,$2,11001,11250)
- $(call ListPathsSafely_If,$1,$2,11251,11500)
- $(call ListPathsSafely_If,$1,$2,11501,11750)
- $(call ListPathsSafely_If,$1,$2,11751,12000)
-
- $(call ListPathsSafely_If,$1,$2,12001,12250)
- $(call ListPathsSafely_If,$1,$2,12251,12500)
- $(call ListPathsSafely_If,$1,$2,12501,12750)
- $(call ListPathsSafely_If,$1,$2,12751,13000)
-
- $(call ListPathsSafely_If,$1,$2,13001,13250)
- $(call ListPathsSafely_If,$1,$2,13251,13500)
- $(call ListPathsSafely_If,$1,$2,13501,13750)
- $(call ListPathsSafely_If,$1,$2,13751,14000)
+ decompress_paths=$(SED) -f $(SRC_ROOT)/make/common/support/ListPathsSafely-uncompress.sed \
+ -e 's|X99|\\n|g' \
+ -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
+ -e 's|X00|X|g'
- $(call ListPathsSafely_If,$1,$2,14001,14250)
- $(call ListPathsSafely_If,$1,$2,14251,14500)
- $(call ListPathsSafely_If,$1,$2,14501,14750)
- $(call ListPathsSafely_If,$1,$2,14751,15000)
-
- $(call ListPathsSafely_If,$1,$2,15001,15250)
- $(call ListPathsSafely_If,$1,$2,15251,15500)
- $(call ListPathsSafely_If,$1,$2,15501,15750)
- $(call ListPathsSafely_If,$1,$2,15751,16000)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,1)
- $(call ListPathsSafely_Printf,$1,$2,$3,251)
- $(call ListPathsSafely_Printf,$1,$2,$3,501)
- $(call ListPathsSafely_Printf,$1,$2,$3,751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,1001)
- $(call ListPathsSafely_Printf,$1,$2,$3,1251)
- $(call ListPathsSafely_Printf,$1,$2,$3,1501)
- $(call ListPathsSafely_Printf,$1,$2,$3,1751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,2001)
- $(call ListPathsSafely_Printf,$1,$2,$3,2251)
- $(call ListPathsSafely_Printf,$1,$2,$3,2501)
- $(call ListPathsSafely_Printf,$1,$2,$3,2751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,3001)
- $(call ListPathsSafely_Printf,$1,$2,$3,3251)
- $(call ListPathsSafely_Printf,$1,$2,$3,3501)
- $(call ListPathsSafely_Printf,$1,$2,$3,3751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,4001)
- $(call ListPathsSafely_Printf,$1,$2,$3,4251)
- $(call ListPathsSafely_Printf,$1,$2,$3,4501)
- $(call ListPathsSafely_Printf,$1,$2,$3,4751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,5001)
- $(call ListPathsSafely_Printf,$1,$2,$3,5251)
- $(call ListPathsSafely_Printf,$1,$2,$3,5501)
- $(call ListPathsSafely_Printf,$1,$2,$3,5751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,6001)
- $(call ListPathsSafely_Printf,$1,$2,$3,6251)
- $(call ListPathsSafely_Printf,$1,$2,$3,6501)
- $(call ListPathsSafely_Printf,$1,$2,$3,6751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,7001)
- $(call ListPathsSafely_Printf,$1,$2,$3,7251)
- $(call ListPathsSafely_Printf,$1,$2,$3,7501)
- $(call ListPathsSafely_Printf,$1,$2,$3,7751)
+ ListPathsSafely_IfPrintf = \
+ $(if $(word $3,$($(strip $1))), \
+ $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
+ $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
+ | $(decompress_paths) >> $2))
- $(call ListPathsSafely_Printf,$1,$2,$3,8001)
- $(call ListPathsSafely_Printf,$1,$2,$3,8251)
- $(call ListPathsSafely_Printf,$1,$2,$3,8501)
- $(call ListPathsSafely_Printf,$1,$2,$3,8751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,9001)
- $(call ListPathsSafely_Printf,$1,$2,$3,9251)
- $(call ListPathsSafely_Printf,$1,$2,$3,9501)
- $(call ListPathsSafely_Printf,$1,$2,$3,9751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,10001)
- $(call ListPathsSafely_Printf,$1,$2,$3,10251)
- $(call ListPathsSafely_Printf,$1,$2,$3,10501)
- $(call ListPathsSafely_Printf,$1,$2,$3,10751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,11001)
- $(call ListPathsSafely_Printf,$1,$2,$3,11251)
- $(call ListPathsSafely_Printf,$1,$2,$3,11501)
- $(call ListPathsSafely_Printf,$1,$2,$3,11751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,12001)
- $(call ListPathsSafely_Printf,$1,$2,$3,12251)
- $(call ListPathsSafely_Printf,$1,$2,$3,12501)
- $(call ListPathsSafely_Printf,$1,$2,$3,12751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,13001)
- $(call ListPathsSafely_Printf,$1,$2,$3,13251)
- $(call ListPathsSafely_Printf,$1,$2,$3,13501)
- $(call ListPathsSafely_Printf,$1,$2,$3,13751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,14001)
- $(call ListPathsSafely_Printf,$1,$2,$3,14251)
- $(call ListPathsSafely_Printf,$1,$2,$3,14501)
- $(call ListPathsSafely_Printf,$1,$2,$3,14751)
-
- $(call ListPathsSafely_Printf,$1,$2,$3,15001)
- $(call ListPathsSafely_Printf,$1,$2,$3,15251)
- $(call ListPathsSafely_Printf,$1,$2,$3,15501)
- $(call ListPathsSafely_Printf,$1,$2,$3,15751)
-endef
-
-define ListPathsSafelyNow_IfPrintf
- ifneq (,$$(word $4,$$($1)))
- $$(eval $1_LPS$4:=$$(call compress_paths,$$(wordlist $4,$5,$$($1))))
- $$(shell printf -- "$$(strip $$($1_LPS$4))\n" | $(decompress_paths) $3)
- endif
-endef
-
-# And an non-receipt version:
-define ListPathsSafelyNow
+ # Param 1 - Name of variable containing paths/arguments to output
+ # Param 2 - File to print to
+ # Param 3 - Set to true to append to file instead of overwriting
+define ListPathsSafely
ifneq (,$$(word 10001,$$($1)))
$$(error Cannot list safely more than 10000 paths. $1 has $$(words $$($1)) paths!)
endif
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1,250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,251,500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,501,750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,751,1000)
+ $$(call MakeDir, $$(dir $2))
+ ifneq ($$(strip $3), true)
+ $$(shell $(RM) $$(strip $2))
+ endif
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1001,1250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1251,1500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1501,1750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,1751,2000)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2001,2250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2251,2500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2501,2750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,2751,3000)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3001,3250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3251,3500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3501,3750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,3751,4000)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4001,4250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4251,4500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4501,4750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,4751,5000)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5001,5250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5251,5500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5501,5750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,5751,6000)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6001,6250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6251,6500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6501,6750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,6751,7000)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
+
+ $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7001,7250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7251,7500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7501,7750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,7751,8000)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8001,8250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8251,8500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8501,8750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,8751,9000)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9001,9250)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9251,9500)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9501,9750)
- $(call ListPathsSafelyNow_IfPrintf,$1,$2,$3,9751,10000)
-
+ $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
+ $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
endef
+endif # HAS_FILE_FUNCTION
# The source tips can come from the Mercurial repository, or in the files
# $(HGTIP_FILENAME) which contains the tip but is also positioned in the same
@@ -674,6 +524,10 @@
$3 += $2
endef
+# Returns the value of the first argument
+identity = \
+ $(strip $1)
+
# Setup make rules for copying files, with an option to do more complex
# processing instead of copying.
#
@@ -688,6 +542,8 @@
# FLATTEN : Set to flatten the directory structure in the DEST dir.
# MACRO : Optionally override the default macro used for making the copy.
# Default is 'install-file'
+# NAME_MACRO : Optionally supply a macro that rewrites the target file name
+# based on the source file name
SetupCopyFiles = $(NamedParamsMacroTemplate)
define SetupCopyFilesBody
@@ -700,12 +556,17 @@
$1_SRC := $$(dir $$(firstword $$($1_FILES)))
endif
+ ifeq ($$($1_NAME_MACRO), )
+ $1_NAME_MACRO := identity
+ endif
+
# Remove any trailing slash from SRC
$1_SRC := $$(patsubst %/,%,$$($1_SRC))
$$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
$$(eval $$(call AddFileToCopy, $$($1_SRC)/$$f, \
- $$($1_DEST)/$$(if $$($1_FLATTEN),$$(notdir $$f),$$f), $1, $$($1_MACRO))))
+ $$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)), \
+ $1, $$($1_MACRO))))
endef
@@ -727,9 +588,14 @@
# Param 1 - Text to write
# Param 2 - File to write to
+ifeq ($(HAS_FILE_FUNCTION), true)
+ WriteFile = \
+ $(file >$2,$(strip $1))
+else
# Use printf to get consistent behavior on all platforms.
WriteFile = \
$(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
+endif
################################################################################
# DependOnVariable
@@ -767,15 +633,16 @@
# Param 1 - Name of variable
# Param 2 - (optional) name of file to store value in
DependOnVariableHelper = \
- $(strip $(if $(and $(wildcard $(call DependOnVariableFileName, $1, $2)),\
- $(call equals, $(strip $($1)), \
- $(call ReadFile, $(call DependOnVariableFileName, $1, $2)))),,\
- $(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \
- $(if $(findstring $(LOG_LEVEL), trace), \
- $(info Variable $1: >$(strip $($1))<) \
- $(info File: >$(call ReadFile, $(call DependOnVariableFileName, $1, $2))<)) \
- $(call WriteFile, $($1), $(call DependOnVariableFileName, $1, $2))) \
- $(call DependOnVariableFileName, $1, $2))
+ $(strip \
+ $(eval -include $(call DependOnVariableFileName, $1, $2)) \
+ $(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
+ $(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \
+ $(if $(findstring $(LOG_LEVEL), trace), \
+ $(info NewVariable $1: >$(strip $($1))<) \
+ $(info OldVariable $1: >$(strip $($1_old))<)) \
+ $(call WriteFile, $1_old:=$($1), $(call DependOnVariableFileName, $1, $2))) \
+ $(call DependOnVariableFileName, $1, $2) \
+ )
# Main macro
# Param 1 - Name of variable
--- a/make/common/NativeCompilation.gmk Mon Oct 12 16:26:58 2015 +0300
+++ b/make/common/NativeCompilation.gmk Mon Oct 12 14:41:36 2015 -0700
@@ -49,6 +49,7 @@
# AS - Assembler
# MT - Windows MT tool
# RC - Windows RC tool
+# STRIP - The tool to use for stripping debug symbols
# SYSROOT_CFLAGS - Compiler flags for using the specific sysroot
# SYSROOT_LDFLAGS - Linker flags for using the specific sysroot
DefineNativeToolchain = $(NamedParamsMacroTemplate)
@@ -64,6 +65,7 @@
$$(call SetIfEmpty, $1_AS, $$($$($1_EXTENDS)_AS))
$$(call SetIfEmpty, $1_MT, $$($$($1_EXTENDS)_MT))
$$(call SetIfEmpty, $1_RC, $$($$($1_EXTENDS)_RC))
+ $$(call SetIfEmpty, $1_STRIP, $$($$($1_EXTENDS)_STRIP))
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_EXTENDS)_SYSROOT_CFLAGS))
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_EXTENDS)_SYSROOT_LDFLAGS))
endif
@@ -78,6 +80,7 @@
AS := $(AS), \
MT := $(MT), \
RC := $(RC), \
+ STRIP := $(STRIP), \
SYSROOT_CFLAGS := $(SYSROOT_CFLAGS), \
SYSROOT_LDFLAGS := $(SYSROOT_LDFLAGS), \
))
@@ -211,23 +214,25 @@
$(call LogFailures, $$($1_$2_OBJ).log, $$($1_SAFE_NAME)_$$(notdir $2), \
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2)
endif
+ # Create a dependency target file from the dependency file.
+ # Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
+ ifneq ($$($1_$2_DEP),)
+ $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
+ endif
else
# The Visual Studio compiler lacks a feature for generating make dependencies, but by
# setting -showIncludes, all included files are printed. These are filtered out and
# parsed into make dependences.
+ # Keep as much as possible on one execution line for best performance on Windows
($(call LogFailures, $$($1_$2_OBJ).log, $$($1_SAFE_NAME)_$$(notdir $2), \
$$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
$(CC_OUT_OPTION)$$($1_$2_OBJ) $2) ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
| $(TEE) $$($1_$2_DEP).raw | $(GREP) -v -e "^Note: including file:" \
-e "^$(notdir $2)$$$$" || test "$$$$?" = "1" ; \
- exit `cat $$($1_$2_DEP).exitvalue`
- $(RM) $$($1_$2_DEP).exitvalue
- ($(ECHO) $$@: \\ \
- && $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_DEP).raw) | $(SORT) -u > $$($1_$2_DEP)
- endif
- # Create a dependency target file from the dependency file.
- # Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
- ifneq ($$($1_$2_DEP),)
+ exit `cat $$($1_$2_DEP).exitvalue` ; \
+ $(RM) $$($1_$2_DEP).exitvalue ; \\
+ ($(ECHO) $$@: \\ ; \
+ $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_DEP).raw) | $(SORT) -u > $$($1_$2_DEP) ; \
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_$2_DEP) > $$($1_$2_DEP_TARGETS)
endif
endif
@@ -265,6 +270,8 @@
# LD the linker to use, default is $(LD)
# OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
# DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
+# STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it
+# STRIPFLAGS Optionally change the flags given to the strip command
SetupNativeCompilation = $(NamedParamsMacroTemplate)
define SetupNativeCompilationBody
@@ -368,6 +375,7 @@
$$(call SetIfEmpty, $1_AS, $$($$($1_TOOLCHAIN)_AS))
$$(call SetIfEmpty, $1_MT, $$($$($1_TOOLCHAIN)_MT))
$$(call SetIfEmpty, $1_RC, $$($$($1_TOOLCHAIN)_RC))
+ $$(call SetIfEmpty, $1_STRIP, $$($$($1_TOOLCHAIN)_STRIP))
$$(call SetIfEmpty, $1_SYSROOT_CFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_CFLAGS))
$$(call SetIfEmpty, $1_SYSROOT_LDFLAGS, $$($$($1_TOOLCHAIN)_SYSROOT_LDFLAGS))
@@ -628,6 +636,10 @@
"-map:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map"
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map
+ # No separate command is needed for debuginfo on windows, instead
+ # touch target to make sure it has a later time stamp than the debug
+ # symbol files to avoid unnecessary relinking on rebuild.
+ $1_CREATE_DEBUGINFO_CMDS := $(TOUCH) $$($1_TARGET)
else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).debuginfo
@@ -662,6 +674,14 @@
endif # $1_DEBUG_SYMBOLS
endif # !STATIC_LIBRARY
+ ifeq ($$($1_STRIP_SYMBOLS), true)
+ ifneq ($$($1_STRIP), )
+ # Default to using the global STRIPFLAGS. Allow for overriding with an empty value
+ $1_STRIPFLAGS ?= $(STRIPFLAGS)
+ $1_STRIP_CMD := $$($1_STRIP) $$($1_STRIPFLAGS) $$($1_TARGET)
+ endif
+ endif
+
ifneq (,$$($1_LIBRARY))
# Generating a dynamic library.
$1_EXTRA_LDFLAGS += $$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
@@ -672,19 +692,21 @@
$1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
- $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_CREATE_DEBUGINFO_CMDS)
+ $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_CREATE_DEBUGINFO_CMDS) \
+ $$($1_STRIP_CMD)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
$$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
$$($1_VARDEPS_FILE)
- $(ECHO) $(LOG_INFO) "Linking $$($1_BASENAME)"
+ $(ECHO) $(LOG_INFO) "Linking $$($1_BASENAME)" ; \
$(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(LD_OUT_OPTION)$$@ \
$$($1_EXPECTED_OBJS) $$($1_RES) \
- $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX))
+ $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)) ; \
$$($1_CREATE_DEBUGINFO_CMDS)
+ $$($1_STRIP_CMD)
# Touch target to make sure it has a later time stamp than the debug
# symbol files to avoid unnecessary relinking on rebuild.
ifeq ($(OPENJDK_TARGET_OS), windows)
@@ -713,13 +735,14 @@
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
$$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_MT) \
- $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION)
+ $$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
+ $$($1_STRIP_CMD)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
$$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_MANIFEST) \
$$($1_VARDEPS_FILE)
- $(ECHO) $(LOG_INFO) "Linking executable $$($1_BASENAME)"
+ $(ECHO) $(LOG_INFO) "Linking executable $$($1_BASENAME)" ; \
$(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(EXE_OUT_OPTION)$$($1_TARGET) \
@@ -738,6 +761,7 @@
endif
endif
$$($1_CREATE_DEBUGINFO_CMDS)
+ $$($1_STRIP_CMD)
# Touch target to make sure it has a later time stamp than the debug
# symbol files to avoid unnecessary relinking on rebuild.
ifeq ($(OPENJDK_TARGET_OS), windows)
--- a/make/common/RMICompilation.gmk Mon Oct 12 16:26:58 2015 +0300
+++ b/make/common/RMICompilation.gmk Mon Oct 12 14:41:36 2015 -0700
@@ -34,8 +34,6 @@
# STUB_CLASSES_DIR:=Directory in where to put stub classes
# RUN_V11:=Set to run rmic with -v1.1
# RUN_V12:=Set to run rmic with -v1.2
-# RUN_IIOP:=Set to run rmic with -iiop
-# RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
# KEEP_GENERATED:=Set to keep generated sources around
SetupRMICompilation = $(NamedParamsMacroTemplate)
define SetupRMICompilationBody
@@ -60,15 +58,6 @@
$1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
$1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
- ifneq (,$$($1_RUN_IIOP))
- $1_TARGETS += $$($1_TIE_FILES)
- $1_ARGS += -iiop -emitPermissionCheck
- endif
- ifneq (,$$($1_RUN_IIOP_STDPKG))
- $1_TARGETS += $$($1_TIE_STDPKG_FILES)
- $1_ARGS2 := -iiop -emitPermissionCheck -standardPackage
- endif
-
ifneq (,$$($1_KEEP_GENERATED))
$1_ARGS += -keepgenerated
$1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
--- a/modules.xml Mon Oct 12 16:26:58 2015 +0300
+++ b/modules.xml Mon Oct 12 14:41:36 2015 -0700
@@ -223,6 +223,16 @@
<to>jdk.dev</to>
</export>
<export>
+ <name>jdk.internal.misc</name>
+ <to>java.corba</to>
+ <to>java.desktop</to>
+ <to>java.logging</to>
+ <to>java.management</to>
+ <to>java.naming</to>
+ <to>java.sql</to>
+ <to>jdk.management.resource</to>
+ </export>
+ <export>
<name>jdk.internal.org.objectweb.asm</name>
<to>java.instrument</to>
<to>jdk.jfr</to>
@@ -265,7 +275,6 @@
<to>java.rmi</to>
<to>java.security.jgss</to>
<to>java.security.sasl</to>
- <to>java.sql</to>
<to>java.xml</to>
<to>java.xml.ws</to>
<to>jdk.charsets</to>
--- a/nashorn/.hgtags Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/.hgtags Mon Oct 12 14:41:36 2015 -0700
@@ -317,3 +317,5 @@
42d8ed4651b62572b39e6fed3fafcb7ee93f9dc2 jdk9-b81
8bab0a9d8a638affdd680c5ec783373f71c19267 jdk9-b82
21b86b980a5f0d27f1f758a3e4818d3331387172 jdk9-b83
+214b97ba911f4d768c0214098739e32ab54c8503 jdk9-b84
+285628dac94332d95979de365630c93ab8fa9962 jdk9-b85
--- a/nashorn/make/build.xml Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/make/build.xml Mon Oct 12 14:41:36 2015 -0700
@@ -219,13 +219,14 @@
<!-- generate javadoc for all Nashorn and ASM classes -->
<target name="javadoc" depends="jar">
- <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
+ <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${nashorn.module.src.dir}/overview.html"
extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
additionalparam="-quiet" failonerror="true" useexternalfile="true">
<classpath>
<pathelement location="${build.classes.dir}"/>
</classpath>
- <fileset dir="${src.dir}" includes="**/*.java"/>
+ <fileset dir="${nashorn.module.src.dir}" includes="**/*.java"/>
+ <fileset dir="${nashorn.shell.module.src.dir}" includes="**/*.java"/>
<fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
<!-- The following tags are used only in ASM sources - just ignore these -->
@@ -251,13 +252,13 @@
<!-- generate javadoc only for nashorn extension api classes -->
<target name="javadocapi" depends="jar">
- <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${src.dir}/overview.html"
+ <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="${nashorn.module.src.dir}/overview.html"
extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
additionalparam="-quiet" failonerror="true" useexternalfile="true">
<classpath>
<pathelement location="${build.classes.dir}"/>
</classpath>
- <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/>
+ <fileset dir="${nashorn.module.src.dir}" includes="jdk/nashorn/api/**/*.java"/>
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
</javadoc>
</target>
--- a/nashorn/make/nbproject/project.xml Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/make/nbproject/project.xml Mon Oct 12 14:41:36 2015 -0700
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -20,157 +20,175 @@
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.
--->
-<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.ant.freeform</type>
- <configuration>
- <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
- <name>nashorn</name>
- </general-data>
- <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
- <!-- Do not use Project Properties customizer when editing this file manually. -->
- <name>nashorn</name>
- <properties/>
- <folders>
- <source-folder>
- <label>nashorn</label>
- <location>.</location>
- <encoding>UTF-8</encoding>
- </source-folder>
- <source-folder>
- <label>../test/src</label>
- <location>../test/src</location>
- </source-folder>
- <source-folder>
- <label>../buildtools/nasgen/src</label>
- <location>../buildtools/nasgen/src</location>
- </source-folder>
- <source-folder>
- <label>../src/jdk.scripting.nashorn/share/classes</label>
- <location>../src/jdk.scripting.nashorn/share/classes</location>
- </source-folder>
- <source-folder>
- <label>../test/src</label>
- <type>java</type>
- <location>../test/src</location>
- <encoding>UTF-8</encoding>
- </source-folder>
- <source-folder>
- <label>../buildtools/nasgen/src</label>
- <type>java</type>
- <location>../buildtools/nasgen/src</location>
- <encoding>UTF-8</encoding>
- </source-folder>
- <source-folder>
- <label>../src/jdk.scripting.nashorn/share/classes</label>
- <type>java</type>
- <location>../src/jdk.scripting.nashorn/share/classes</location>
- <encoding>UTF-8</encoding>
- </source-folder>
- </folders>
- <ide-actions>
- <action name="build">
- <script>nbproject/nbjdk.xml</script>
- <target>jar</target>
- </action>
- <action name="clean">
- <script>nbproject/nbjdk.xml</script>
- <target>clean</target>
- </action>
- <action name="javadoc">
- <script>nbproject/nbjdk.xml</script>
- <target>javadoc</target>
- </action>
- <action name="test">
- <script>nbproject/nbjdk.xml</script>
- <target>test</target>
- </action>
- <action name="rebuild">
- <script>nbproject/nbjdk.xml</script>
- <target>clean</target>
- <target>jar</target>
- </action>
- <action name="run">
- <script>nbproject/nbjdk.xml</script>
- <target>run</target>
- </action>
- <action name="debug">
- <script>nbproject/nbjdk.xml</script>
- <target>debug-nb</target>
- </action>
- <action name="run.single">
- <script>build.xml</script>
- <target>test</target>
- <context>
- <property>test.class</property>
- <folder>../test/src</folder>
- <pattern>\.java$</pattern>
- <format>relative-path-noext</format>
- <arity>
- <one-file-only/>
- </arity>
- </context>
- </action>
- <action name="debug.single">
- <script>nbproject/ide-file-targets.xml</script>
- <target>debug-selected-file-in-src</target>
- <context>
- <property>test.class</property>
- <folder>../test/src</folder>
- <pattern>\.java$</pattern>
- <format>relative-path-noext</format>
- <arity>
- <one-file-only/>
- </arity>
- </context>
- </action>
- </ide-actions>
- <view>
- <items>
- <source-folder style="packages">
- <label>../test/src</label>
- <location>../test/src</location>
- </source-folder>
- <source-folder style="packages">
- <label>../buildtools/nasgen/src</label>
- <location>../buildtools/nasgen/src</location>
- </source-folder>
- <source-folder style="packages">
- <label>../src/jdk.scripting.nashorn/share/classes</label>
- <location>../src/jdk.scripting.nashorn/share/classes</location>
- </source-folder>
- <source-file>
- <location>build.xml</location>
- </source-file>
- </items>
- <context-menu>
- <ide-action name="build"/>
- <ide-action name="rebuild"/>
- <ide-action name="clean"/>
- <ide-action name="javadoc"/>
- <ide-action name="run"/>
- <ide-action name="test"/>
- <ide-action name="debug"/>
- </context-menu>
- </view>
- <subprojects/>
- </general-data>
- <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4">
- <compilation-unit>
- <package-root>../test/src</package-root>
- <unit-tests/>
- <classpath mode="compile">../test/lib/testng.jar:../build/classes:../src/jdk.scripting.nashorn/share/classes</classpath>
- <source-level>1.8</source-level>
- </compilation-unit>
- <compilation-unit>
- <package-root>../buildtools/nasgen/src</package-root>
- <classpath mode="compile">../build/classes:../src</classpath>
- <source-level>1.8</source-level>
- </compilation-unit>
- <compilation-unit>
- <package-root>../src/jdk.scripting.nashorn/share/classes</package-root>
- <source-level>1.8</source-level>
- </compilation-unit>
- </java-data>
- </configuration>
-</project>
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.ant.freeform</type>
+ <configuration>
+ <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+ <name>nashorn</name>
+ </general-data>
+ <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
+ <!-- Do not use Project Properties customizer when editing this file manually. -->
+ <name>nashorn</name>
+ <properties/>
+ <folders>
+ <source-folder>
+ <label>nashorn</label>
+ <location>.</location>
+ <encoding>UTF-8</encoding>
+ </source-folder>
+ <source-folder>
+ <label>../test/src</label>
+ <location>../test/src</location>
+ </source-folder>
+ <source-folder>
+ <label>../buildtools/nasgen/src</label>
+ <location>../buildtools/nasgen/src</location>
+ </source-folder>
+ <source-folder>
+ <label>../src/jdk.scripting.nashorn/share/classes</label>
+ <location>../src/jdk.scripting.nashorn/share/classes</location>
+ </source-folder>
+ <source-folder>
+ <label>../test/src</label>
+ <type>java</type>
+ <location>../test/src</location>
+ <encoding>UTF-8</encoding>
+ </source-folder>
+ <source-folder>
+ <label>../buildtools/nasgen/src</label>
+ <type>java</type>
+ <location>../buildtools/nasgen/src</location>
+ <encoding>UTF-8</encoding>
+ </source-folder>
+ <source-folder>
+ <label>../src/jdk.scripting.nashorn/share/classes</label>
+ <type>java</type>
+ <location>../src/jdk.scripting.nashorn/share/classes</location>
+ <encoding>UTF-8</encoding>
+ </source-folder>
+ <source-folder>
+ <label>../src/jdk.scripting.nashorn.shell/share/classes</label>
+ <type>java</type>
+ <location>../src/jdk.scripting.nashorn.shell/share/classes</location>
+ <encoding>UTF-8</encoding>
+ </source-folder>
+ <source-folder>
+ <label>../src/jdk.scripting.nashorn.shell/share/classes</label>
+ <location>../src/jdk.scripting.nashorn.shell/share/classes</location>
+ </source-folder>
+ </folders>
+ <ide-actions>
+ <action name="build">
+ <script>nbproject/nbjdk.xml</script>
+ <target>jar</target>
+ </action>
+ <action name="clean">
+ <script>nbproject/nbjdk.xml</script>
+ <target>clean</target>
+ </action>
+ <action name="javadoc">
+ <script>nbproject/nbjdk.xml</script>
+ <target>javadoc</target>
+ </action>
+ <action name="test">
+ <script>nbproject/nbjdk.xml</script>
+ <target>test</target>
+ </action>
+ <action name="rebuild">
+ <script>nbproject/nbjdk.xml</script>
+ <target>clean</target>
+ <target>jar</target>
+ </action>
+ <action name="run">
+ <script>nbproject/nbjdk.xml</script>
+ <target>run</target>
+ </action>
+ <action name="debug">
+ <script>nbproject/nbjdk.xml</script>
+ <target>debug-nb</target>
+ </action>
+ <action name="run.single">
+ <script>build.xml</script>
+ <target>test</target>
+ <context>
+ <property>test.class</property>
+ <folder>../test/src</folder>
+ <pattern>\.java$</pattern>
+ <format>relative-path-noext</format>
+ <arity>
+ <one-file-only/>
+ </arity>
+ </context>
+ </action>
+ <action name="debug.single">
+ <script>nbproject/ide-file-targets.xml</script>
+ <target>debug-selected-file-in-src</target>
+ <context>
+ <property>test.class</property>
+ <folder>../test/src</folder>
+ <pattern>\.java$</pattern>
+ <format>relative-path-noext</format>
+ <arity>
+ <one-file-only/>
+ </arity>
+ </context>
+ </action>
+ </ide-actions>
+ <view>
+ <items>
+ <source-folder style="packages">
+ <label>../test/src</label>
+ <location>../test/src</location>
+ </source-folder>
+ <source-folder style="packages">
+ <label>../buildtools/nasgen/src</label>
+ <location>../buildtools/nasgen/src</location>
+ </source-folder>
+ <source-folder style="packages">
+ <label>../src/jdk.scripting.nashorn/share/classes</label>
+ <location>../src/jdk.scripting.nashorn/share/classes</location>
+ </source-folder>
+ <source-folder style="packages">
+ <label>../src/jdk.scripting.nashorn.shell/share/classes</label>
+ <location>../src/jdk.scripting.nashorn.shell/share/classes</location>
+ </source-folder>
+ <source-file>
+ <location>build.xml</location>
+ </source-file>
+ </items>
+ <context-menu>
+ <ide-action name="build"/>
+ <ide-action name="rebuild"/>
+ <ide-action name="clean"/>
+ <ide-action name="javadoc"/>
+ <ide-action name="run"/>
+ <ide-action name="test"/>
+ <ide-action name="debug"/>
+ </context-menu>
+ </view>
+ <subprojects/>
+ </general-data>
+ <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4">
+ <compilation-unit>
+ <package-root>../test/src</package-root>
+ <unit-tests/>
+ <classpath mode="compile">../test/lib/testng.jar:../build/classes:../src/jdk.scripting.nashorn/share/classes</classpath>
+ <source-level>1.8</source-level>
+ </compilation-unit>
+ <compilation-unit>
+ <package-root>../buildtools/nasgen/src</package-root>
+ <classpath mode="compile">../build/classes:../src</classpath>
+ <source-level>1.8</source-level>
+ </compilation-unit>
+ <compilation-unit>
+ <package-root>../src/jdk.scripting.nashorn/share/classes</package-root>
+ <source-level>1.8</source-level>
+ </compilation-unit>
+ <compilation-unit>
+ <package-root>../src/jdk.scripting.nashorn.shell/share/classes</package-root>
+ <source-level>1.8</source-level>
+ </compilation-unit>
+ </java-data>
+ </configuration>
+</project>
--- a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java Mon Oct 12 14:41:36 2015 -0700
@@ -154,6 +154,10 @@
break;
}
+ if (source == null) {
+ break;
+ }
+
if (source.isEmpty()) {
continue;
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/ChainedCallSite.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/internal/dynalink/ChainedCallSite.java Mon Oct 12 14:41:36 2015 -0700
@@ -103,27 +103,14 @@
* handle is always at the start of the chain.
*/
public class ChainedCallSite extends AbstractRelinkableCallSite {
- private static final MethodHandle PRUNE_CATCHES =
- MethodHandles.insertArguments(
- Lookup.findOwnSpecial(
- MethodHandles.lookup(),
- "prune",
- MethodHandle.class,
- MethodHandle.class,
- boolean.class),
- 2,
- true);
-
- private static final MethodHandle PRUNE_SWITCHPOINTS =
- MethodHandles.insertArguments(
- Lookup.findOwnSpecial(
- MethodHandles.lookup(),
- "prune",
- MethodHandle.class,
- MethodHandle.class,
- boolean.class),
- 2,
- false);
+ private static final MethodHandle PRUNE_CATCHES;
+ private static final MethodHandle PRUNE_SWITCHPOINTS;
+ static {
+ final MethodHandle PRUNE = Lookup.findOwnSpecial(MethodHandles.lookup(), "prune", MethodHandle.class,
+ MethodHandle.class, boolean.class);
+ PRUNE_CATCHES = MethodHandles.insertArguments(PRUNE, 2, true);
+ PRUNE_SWITCHPOINTS = MethodHandles.insertArguments(PRUNE, 2, false);
+ }
private final AtomicReference<LinkedList<GuardedInvocation>> invocations = new AtomicReference<>();
@@ -181,8 +168,8 @@
// prune-and-invoke is used as the fallback for invalidated switchpoints. If a switchpoint gets invalidated, we
// rebuild the chain and get rid of all invalidated switchpoints instead of letting them linger.
- final MethodHandle pruneAndInvokeSwitchPoints = makePruneAndInvokeMethod(relink, getPruneSwitchpoints());
- final MethodHandle pruneAndInvokeCatches = makePruneAndInvokeMethod(relink, getPruneCatches());
+ final MethodHandle pruneAndInvokeSwitchPoints = makePruneAndInvokeMethod(relink, PRUNE_SWITCHPOINTS);
+ final MethodHandle pruneAndInvokeCatches = makePruneAndInvokeMethod(relink, PRUNE_CATCHES);
// Fold the new chain
MethodHandle target = relink;
@@ -200,22 +187,6 @@
}
/**
- * Get the switchpoint pruning function for a chained call site
- * @return function that removes invalidated switchpoints tied to callsite guard chain and relinks
- */
- protected MethodHandle getPruneSwitchpoints() {
- return PRUNE_SWITCHPOINTS;
- }
-
- /**
- * Get the catch pruning function for a chained call site
- * @return function that removes all catches tied to callsite guard chain and relinks
- */
- protected MethodHandle getPruneCatches() {
- return PRUNE_CATCHES;
- }
-
- /**
* Creates a method that rebuilds our call chain, pruning it of any invalidated switchpoints, and then invokes that
* chain.
* @param relink the ultimate fallback for the chain (the {@code DynamicLinker}'s relink).
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java Mon Oct 12 14:41:36 2015 -0700
@@ -140,7 +140,7 @@
this._global_per_engine = nashornContext.getEnv()._global_per_engine;
// create new global object
- this.global = createNashornGlobal(context);
+ this.global = createNashornGlobal();
// set the default ENGINE_SCOPE object for the default context
context.setBindings(new ScriptObjectMirror(global, global), ScriptContext.ENGINE_SCOPE);
}
@@ -167,7 +167,7 @@
// We use same 'global' for all Bindings.
return new SimpleBindings();
}
- return createGlobalMirror(null);
+ return createGlobalMirror();
}
// Compilable methods
@@ -317,7 +317,7 @@
// We didn't find associated nashorn global mirror in the Bindings given!
// Create new global instance mirror and associate with the Bindings.
- final ScriptObjectMirror mirror = createGlobalMirror(ctxt);
+ final ScriptObjectMirror mirror = createGlobalMirror();
bindings.put(NASHORN_GLOBAL, mirror);
return mirror.getHomeGlobal();
}
@@ -333,13 +333,13 @@
}
// Create a new ScriptObjectMirror wrapping a newly created Nashorn Global object
- private ScriptObjectMirror createGlobalMirror(final ScriptContext ctxt) {
- final Global newGlobal = createNashornGlobal(ctxt);
+ private ScriptObjectMirror createGlobalMirror() {
+ final Global newGlobal = createNashornGlobal();
return new ScriptObjectMirror(newGlobal, newGlobal);
}
// Create a new Nashorn Global object
- private Global createNashornGlobal(final ScriptContext ctxt) {
+ private Global createNashornGlobal() {
final Global newGlobal = AccessController.doPrivileged(new PrivilegedAction<Global>() {
@Override
public Global run() {
@@ -354,7 +354,7 @@
}
}, CREATE_GLOBAL_ACC_CTXT);
- nashornContext.initGlobal(newGlobal, this, ctxt);
+ nashornContext.initGlobal(newGlobal, this);
return newGlobal;
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IRTranslator.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IRTranslator.java Mon Oct 12 14:41:36 2015 -0700
@@ -47,7 +47,6 @@
import jdk.nashorn.internal.ir.IfNode;
import jdk.nashorn.internal.ir.IndexNode;
import jdk.nashorn.internal.ir.LabelNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.ObjectNode;
@@ -64,7 +63,7 @@
import jdk.nashorn.internal.ir.VarNode;
import jdk.nashorn.internal.ir.WhileNode;
import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.parser.Lexer;
import jdk.nashorn.internal.parser.TokenType;
@@ -72,10 +71,9 @@
* This class translates from nashorn IR Node objects
* to nashorn parser API Tree objects.
*/
-final class IRTranslator extends NodeVisitor<LexicalContext> {
+final class IRTranslator extends SimpleNodeVisitor {
public IRTranslator() {
- super(new LexicalContext());
}
// currently translated Statement
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ApplySpecialization.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ApplySpecialization.java Mon Oct 12 14:41:36 2015 -0700
@@ -41,9 +41,8 @@
import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.IdentNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.Node;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.logging.DebugLogger;
@@ -81,7 +80,7 @@
*/
@Logger(name="apply2call")
-public final class ApplySpecialization extends NodeVisitor<LexicalContext> implements Loggable {
+public final class ApplySpecialization extends SimpleNodeVisitor implements Loggable {
private static final boolean USE_APPLY2CALL = Options.getBooleanProperty("nashorn.apply2call", true);
@@ -105,7 +104,6 @@
* @param compiler compiler
*/
public ApplySpecialization(final Compiler compiler) {
- super(new LexicalContext());
this.compiler = compiler;
this.log = initLogger(compiler.getContext());
}
@@ -138,7 +136,7 @@
private boolean hasApplies(final FunctionNode functionNode) {
try {
- functionNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ functionNode.accept(new SimpleNodeVisitor() {
@Override
public boolean enterFunctionNode(final FunctionNode fn) {
return fn == functionNode;
@@ -172,7 +170,7 @@
final Deque<Set<Expression>> stack = new ArrayDeque<>();
//ensure that arguments is only passed as arg to apply
- functionNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ functionNode.accept(new SimpleNodeVisitor() {
private boolean isCurrentArg(final Expression expr) {
return !stack.isEmpty() && stack.peek().contains(expr); //args to current apply call
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java Mon Oct 12 14:41:36 2015 -0700
@@ -67,7 +67,6 @@
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.IdentNode;
import jdk.nashorn.internal.ir.IndexNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LexicalContextNode;
import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.Node;
@@ -81,7 +80,7 @@
import jdk.nashorn.internal.ir.UnaryNode;
import jdk.nashorn.internal.ir.VarNode;
import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.parser.TokenType;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ECMAErrors;
@@ -102,7 +101,7 @@
* visitor.
*/
@Logger(name="symbols")
-final class AssignSymbols extends NodeVisitor<LexicalContext> implements Loggable {
+final class AssignSymbols extends SimpleNodeVisitor implements Loggable {
private final DebugLogger log;
private final boolean debug;
@@ -150,7 +149,6 @@
private final boolean isOnDemand;
public AssignSymbols(final Compiler compiler) {
- super(new LexicalContext());
this.compiler = compiler;
this.log = initLogger(compiler.getContext());
this.debug = log.isEnabled();
@@ -187,7 +185,7 @@
*/
private void acceptDeclarations(final FunctionNode functionNode, final Block body) {
// This visitor will assign symbol to all declared variables.
- body.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ body.accept(new SimpleNodeVisitor() {
@Override
protected boolean enterDefault(final Node node) {
// Don't bother visiting expressions; var is a statement, it can't be inside an expression.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CacheAst.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CacheAst.java Mon Oct 12 14:41:36 2015 -0700
@@ -29,19 +29,17 @@
import java.util.Collections;
import java.util.Deque;
import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.Statement;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
-class CacheAst extends NodeVisitor<LexicalContext> {
+class CacheAst extends SimpleNodeVisitor {
private final Deque<RecompilableScriptFunctionData> dataStack = new ArrayDeque<>();
private final Compiler compiler;
CacheAst(final Compiler compiler) {
- super(new LexicalContext());
this.compiler = compiler;
assert !compiler.isOnDemandCompilation();
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java Mon Oct 12 14:41:36 2015 -0700
@@ -129,7 +129,7 @@
import jdk.nashorn.internal.ir.WhileNode;
import jdk.nashorn.internal.ir.WithNode;
import jdk.nashorn.internal.ir.visitor.NodeOperatorVisitor;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.parser.Lexer.RegexToken;
import jdk.nashorn.internal.parser.TokenType;
@@ -1433,8 +1433,7 @@
final Block currentBlock = lc.getCurrentBlock();
final CodeGeneratorLexicalContext codegenLexicalContext = lc;
- function.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
-
+ function.accept(new SimpleNodeVisitor() {
private MethodEmitter sharedScopeCall(final IdentNode identNode, final int flags) {
final Symbol symbol = identNode.getSymbol();
final boolean isFastScope = isFastScope(symbol);
@@ -2461,7 +2460,7 @@
@Override
public Boolean get() {
- value.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ value.accept(new SimpleNodeVisitor() {
@Override
public boolean enterFunctionNode(final FunctionNode functionNode) {
return false;
@@ -2799,7 +2798,7 @@
boolean contains;
@Override
public Boolean get() {
- rootExpr.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ rootExpr.accept(new SimpleNodeVisitor() {
@Override
public boolean enterFunctionNode(final FunctionNode functionNode) {
return false;
@@ -4347,7 +4346,7 @@
* on the stack throughout the store and used at the end to execute it
*/
- target.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ target.accept(new SimpleNodeVisitor() {
@Override
public boolean enterIdentNode(final IdentNode node) {
if (node.getSymbol().isScope()) {
@@ -4446,7 +4445,7 @@
* need to do a conversion on non-equivalent types exists, but is
* very rare. See for example test/script/basic/access-specializer.js
*/
- target.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ target.accept(new SimpleNodeVisitor() {
@Override
protected boolean enterDefault(final Node node) {
throw new AssertionError("Unexpected node " + node + " in store epilogue");
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java Mon Oct 12 14:41:36 2015 -0700
@@ -36,13 +36,13 @@
import jdk.nashorn.internal.codegen.Compiler.CompilationPhases;
import jdk.nashorn.internal.ir.Block;
import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.Symbol;
import jdk.nashorn.internal.ir.debug.ASTWriter;
import jdk.nashorn.internal.ir.debug.PrintVisitor;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.runtime.CodeInstaller;
import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
import jdk.nashorn.internal.runtime.ScriptEnvironment;
@@ -118,7 +118,7 @@
FunctionNode newFunctionNode;
//ensure elementTypes, postsets and presets exist for splitter and arraynodes
- newFunctionNode = transformFunction(fn, new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ newFunctionNode = transformFunction(fn, new SimpleNodeVisitor() {
@Override
public LiteralNode<?> leaveLiteralNode(final LiteralNode<?> literalNode) {
return literalNode.initialize(lc);
@@ -222,7 +222,7 @@
// correctness, it's just an optimization -- runtime type calculation is not used when the compilation
// is not an on-demand optimistic compilation, so we can skip locals marking then.
if (compiler.useOptimisticTypes() && compiler.isOnDemandCompilation()) {
- fn.getBody().accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ fn.getBody().accept(new SimpleNodeVisitor() {
@Override
public boolean enterFunctionNode(final FunctionNode functionNode) {
// OTOH, we must not declare symbols from nested functions to be locals. As we're doing on-demand
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/FindScopeDepths.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/FindScopeDepths.java Mon Oct 12 14:41:36 2015 -0700
@@ -39,7 +39,7 @@
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.Symbol;
import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
import jdk.nashorn.internal.runtime.logging.DebugLogger;
@@ -53,7 +53,7 @@
* FunctionNode being compiled
*/
@Logger(name="scopedepths")
-final class FindScopeDepths extends NodeVisitor<LexicalContext> implements Loggable {
+final class FindScopeDepths extends SimpleNodeVisitor implements Loggable {
private final Compiler compiler;
private final Map<Integer, Map<Integer, RecompilableScriptFunctionData>> fnIdToNestedFunctions = new HashMap<>();
@@ -66,7 +66,6 @@
private int dynamicScopeCount;
FindScopeDepths(final Compiler compiler) {
- super(new LexicalContext());
this.compiler = compiler;
this.log = initLogger(compiler.getContext());
}
@@ -273,7 +272,7 @@
//get all symbols that are referenced inside this function body
final Set<Symbol> symbols = new HashSet<>();
- block.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ block.accept(new SimpleNodeVisitor() {
@Override
public boolean enterIdentNode(final IdentNode identNode) {
final Symbol symbol = identNode.getSymbol();
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/FoldConstants.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/FoldConstants.java Mon Oct 12 14:41:36 2015 -0700
@@ -38,7 +38,6 @@
import jdk.nashorn.internal.ir.Expression;
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.IfNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.LiteralNode.ArrayLiteralNode;
import jdk.nashorn.internal.ir.Node;
@@ -47,7 +46,7 @@
import jdk.nashorn.internal.ir.TernaryNode;
import jdk.nashorn.internal.ir.UnaryNode;
import jdk.nashorn.internal.ir.VarNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.ScriptRuntime;
@@ -59,12 +58,11 @@
* Simple constant folding pass, executed before IR is starting to be lowered.
*/
@Logger(name="fold")
-final class FoldConstants extends NodeVisitor<LexicalContext> implements Loggable {
+final class FoldConstants extends SimpleNodeVisitor implements Loggable {
private final DebugLogger log;
FoldConstants(final Compiler compiler) {
- super(new LexicalContext());
this.log = initLogger(compiler.getContext());
}
@@ -194,7 +192,7 @@
* initializers removed.
*/
static void extractVarNodesFromDeadCode(final Node deadCodeRoot, final List<Statement> statements) {
- deadCodeRoot.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ deadCodeRoot.accept(new SimpleNodeVisitor() {
@Override
public boolean enterVarNode(final VarNode varNode) {
statements.add(varNode.setInit(null));
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/LocalVariableTypesCalculator.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/LocalVariableTypesCalculator.java Mon Oct 12 14:41:36 2015 -0700
@@ -87,6 +87,7 @@
import jdk.nashorn.internal.ir.WhileNode;
import jdk.nashorn.internal.ir.WithNode;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.parser.TokenType;
/**
@@ -105,7 +106,7 @@
* instances of the calculator to be run on nested functions (when not lazy compiling).
*
*/
-final class LocalVariableTypesCalculator extends NodeVisitor<LexicalContext>{
+final class LocalVariableTypesCalculator extends SimpleNodeVisitor {
private static class JumpOrigin {
final JoinPredecessor node;
@@ -425,7 +426,6 @@
private final Deque<Label> catchLabels = new ArrayDeque<>();
LocalVariableTypesCalculator(final Compiler compiler) {
- super(new LexicalContext());
this.compiler = compiler;
}
@@ -1330,7 +1330,7 @@
// Sets the return type of the function and also performs the bottom-up pass of applying type and conversion
// information to nodes as well as doing the calculation on nested functions as required.
FunctionNode newFunction = functionNode;
- final NodeVisitor<LexicalContext> applyChangesVisitor = new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ final SimpleNodeVisitor applyChangesVisitor = new SimpleNodeVisitor() {
private boolean inOuterFunction = true;
private final Deque<JoinPredecessor> joinPredecessors = new ArrayDeque<>();
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Lower.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Lower.java Mon Oct 12 14:41:36 2015 -0700
@@ -74,7 +74,7 @@
import jdk.nashorn.internal.ir.WhileNode;
import jdk.nashorn.internal.ir.WithNode;
import jdk.nashorn.internal.ir.visitor.NodeOperatorVisitor;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.parser.Token;
import jdk.nashorn.internal.parser.TokenType;
import jdk.nashorn.internal.runtime.Context;
@@ -331,7 +331,7 @@
@SuppressWarnings("unchecked")
private static <T extends Node> T ensureUniqueNamesIn(final T node) {
- return (T)node.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ return (T)node.accept(new SimpleNodeVisitor() {
@Override
public Node leaveFunctionNode(final FunctionNode functionNode) {
final String name = functionNode.getName();
@@ -396,7 +396,7 @@
final Block finallyBlock = createFinallyBlock(finallyBody);
final ArrayList<Block> inlinedFinallies = new ArrayList<>();
final FunctionNode fn = lc.getCurrentFunction();
- final TryNode newTryNode = (TryNode)tryNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ final TryNode newTryNode = (TryNode)tryNode.accept(new SimpleNodeVisitor() {
@Override
public boolean enterFunctionNode(final FunctionNode functionNode) {
@@ -539,7 +539,7 @@
final Block catchAll = catchAllBlock(tryNode);
final List<ThrowNode> rethrows = new ArrayList<>(1);
- catchAll.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ catchAll.accept(new SimpleNodeVisitor() {
@Override
public boolean enterThrowNode(final ThrowNode throwNode) {
rethrows.add(throwNode);
@@ -686,7 +686,7 @@
private static boolean controlFlowEscapes(final LexicalContext lex, final Block loopBody) {
final List<Node> escapes = new ArrayList<>();
- loopBody.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ loopBody.accept(new SimpleNodeVisitor() {
@Override
public Node leaveBreakNode(final BreakNode node) {
escapes.add(node);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java Mon Oct 12 14:41:36 2015 -0700
@@ -42,7 +42,6 @@
import jdk.nashorn.internal.ir.IfNode;
import jdk.nashorn.internal.ir.IndexNode;
import jdk.nashorn.internal.ir.JoinPredecessorExpression;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LoopNode;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.Optimistic;
@@ -52,7 +51,7 @@
import jdk.nashorn.internal.ir.UnaryNode;
import jdk.nashorn.internal.ir.VarNode;
import jdk.nashorn.internal.ir.WhileNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.parser.TokenType;
import jdk.nashorn.internal.runtime.ScriptObject;
@@ -61,7 +60,7 @@
* must not ever be marked as optimistic, assigning narrowest non-invalidated types to program points from the
* compilation environment, as well as initializing optimistic types of global properties for scripts.
*/
-final class OptimisticTypesCalculator extends NodeVisitor<LexicalContext> {
+final class OptimisticTypesCalculator extends SimpleNodeVisitor {
final Compiler compiler;
@@ -69,7 +68,6 @@
final Deque<BitSet> neverOptimistic = new ArrayDeque<>();
OptimisticTypesCalculator(final Compiler compiler) {
- super(new LexicalContext());
this.compiler = compiler;
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ProgramPoints.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ProgramPoints.java Mon Oct 12 14:41:36 2015 -0700
@@ -37,25 +37,20 @@
import jdk.nashorn.internal.ir.FunctionNode;
import jdk.nashorn.internal.ir.IdentNode;
import jdk.nashorn.internal.ir.IndexNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.Optimistic;
import jdk.nashorn.internal.ir.UnaryNode;
import jdk.nashorn.internal.ir.VarNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
/**
* Find program points in the code that are needed for optimistic assumptions
*/
-class ProgramPoints extends NodeVisitor<LexicalContext> {
+class ProgramPoints extends SimpleNodeVisitor {
private final IntDeque nextProgramPoint = new IntDeque();
private final Set<Node> noProgramPoint = new HashSet<>();
- ProgramPoints() {
- super(new LexicalContext());
- }
-
private int next() {
final int next = nextProgramPoint.getAndIncrement();
if(next > MAX_PROGRAM_POINT_VALUE) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ReplaceCompileUnits.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/ReplaceCompileUnits.java Mon Oct 12 14:41:36 2015 -0700
@@ -27,24 +27,19 @@
import java.util.ArrayList;
import java.util.List;
-
import jdk.nashorn.internal.ir.CompileUnitHolder;
import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.LiteralNode.ArrayLiteralNode;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.ObjectNode;
import jdk.nashorn.internal.ir.Splittable;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
/**
* Base class for a node visitor that replaces {@link CompileUnit}s in {@link CompileUnitHolder}s.
*/
-abstract class ReplaceCompileUnits extends NodeVisitor<LexicalContext> {
- ReplaceCompileUnits() {
- super(new LexicalContext());
- }
+abstract class ReplaceCompileUnits extends SimpleNodeVisitor {
/**
* Override to provide a replacement for an old compile unit.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Splitter.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Splitter.java Mon Oct 12 14:41:36 2015 -0700
@@ -33,7 +33,6 @@
import java.util.Map;
import jdk.nashorn.internal.ir.Block;
import jdk.nashorn.internal.ir.FunctionNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.LiteralNode.ArrayLiteralNode;
import jdk.nashorn.internal.ir.Node;
@@ -42,7 +41,7 @@
import jdk.nashorn.internal.ir.SplitNode;
import jdk.nashorn.internal.ir.Splittable;
import jdk.nashorn.internal.ir.Statement;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.logging.DebugLogger;
import jdk.nashorn.internal.runtime.logging.Loggable;
@@ -53,7 +52,7 @@
* Split the IR into smaller compile units.
*/
@Logger(name="splitter")
-final class Splitter extends NodeVisitor<LexicalContext> implements Loggable {
+final class Splitter extends SimpleNodeVisitor implements Loggable {
/** Current compiler. */
private final Compiler compiler;
@@ -79,7 +78,6 @@
* @param outermostCompileUnit compile unit for outermost function, if non-lazy this is the script's compile unit
*/
public Splitter(final Compiler compiler, final FunctionNode functionNode, final CompileUnit outermostCompileUnit) {
- super(new LexicalContext());
this.compiler = compiler;
this.outermost = functionNode;
this.outermostCompileUnit = outermostCompileUnit;
@@ -142,7 +140,7 @@
final Block body = functionNode.getBody();
final List<FunctionNode> dc = directChildren(functionNode);
- final Block newBody = (Block)body.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ final Block newBody = (Block)body.accept(new SimpleNodeVisitor() {
@Override
public boolean enterFunctionNode(final FunctionNode nestedFunction) {
return dc.contains(nestedFunction);
@@ -164,7 +162,7 @@
private static List<FunctionNode> directChildren(final FunctionNode functionNode) {
final List<FunctionNode> dc = new ArrayList<>();
- functionNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ functionNode.accept(new SimpleNodeVisitor() {
@Override
public boolean enterFunctionNode(final FunctionNode child) {
if (child == functionNode) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/JSONWriter.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/JSONWriter.java Mon Oct 12 14:41:36 2015 -0700
@@ -49,7 +49,6 @@
import jdk.nashorn.internal.ir.IndexNode;
import jdk.nashorn.internal.ir.JoinPredecessorExpression;
import jdk.nashorn.internal.ir.LabelNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LiteralNode;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.ObjectNode;
@@ -66,7 +65,7 @@
import jdk.nashorn.internal.ir.VarNode;
import jdk.nashorn.internal.ir.WhileNode;
import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.parser.JSONParser;
import jdk.nashorn.internal.parser.Lexer.RegexToken;
import jdk.nashorn.internal.parser.Parser;
@@ -78,7 +77,7 @@
/**
* This IR writer produces a JSON string that represents AST as a JSON string.
*/
-public final class JSONWriter extends NodeVisitor<LexicalContext> {
+public final class JSONWriter extends SimpleNodeVisitor {
/**
* Returns AST as JSON compatible string.
@@ -945,7 +944,6 @@
// Internals below
private JSONWriter(final boolean includeLocation) {
- super(new LexicalContext());
this.buf = new StringBuilder();
this.includeLocation = includeLocation;
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/PrintVisitor.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/PrintVisitor.java Mon Oct 12 14:41:36 2015 -0700
@@ -41,7 +41,6 @@
import jdk.nashorn.internal.ir.JoinPredecessor;
import jdk.nashorn.internal.ir.JoinPredecessorExpression;
import jdk.nashorn.internal.ir.LabelNode;
-import jdk.nashorn.internal.ir.LexicalContext;
import jdk.nashorn.internal.ir.LocalVariableConversion;
import jdk.nashorn.internal.ir.Node;
import jdk.nashorn.internal.ir.SplitNode;
@@ -53,7 +52,7 @@
import jdk.nashorn.internal.ir.VarNode;
import jdk.nashorn.internal.ir.WhileNode;
import jdk.nashorn.internal.ir.WithNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
/**
* Print out the AST as human readable source code.
@@ -61,7 +60,7 @@
*
* see the flags --print-parse and --print-lower-parse
*/
-public final class PrintVisitor extends NodeVisitor<LexicalContext> {
+public final class PrintVisitor extends SimpleNodeVisitor {
/** Tab width */
private static final int TABWIDTH = 4;
@@ -96,7 +95,6 @@
* @param printTypes should we print optimistic and inferred types?
*/
public PrintVisitor(final boolean printLineNumbers, final boolean printTypes) {
- super(new LexicalContext());
this.EOLN = System.lineSeparator();
this.sb = new StringBuilder();
this.printLineNumbers = printLineNumbers;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/visitor/NodeOperatorVisitor.java Mon Oct 12 14:41:36 2015 -0700
@@ -34,7 +34,7 @@
* Like NodeVisitor but navigating further into operators.
* @param <T> Lexical context class for this NodeOperatorVisitor
*/
-public class NodeOperatorVisitor<T extends LexicalContext> extends NodeVisitor<T> {
+public abstract class NodeOperatorVisitor<T extends LexicalContext> extends NodeVisitor<T> {
/**
* Constructor
*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/visitor/SimpleNodeVisitor.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+package jdk.nashorn.internal.ir.visitor;
+
+import jdk.nashorn.internal.ir.LexicalContext;
+
+/**
+ * Convenience base class for a {@link NodeVisitor} with a plain {@link LexicalContext}.
+ */
+public abstract class SimpleNodeVisitor extends NodeVisitor<LexicalContext> {
+
+ /**
+ * Creates a new simple node visitor.
+ */
+ public SimpleNodeVisitor() {
+ super(new LexicalContext());
+ }
+}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java Mon Oct 12 14:41:36 2015 -0700
@@ -928,8 +928,6 @@
private ThreadLocal<ScriptContext> scontext;
// current ScriptEngine associated - can be null.
private ScriptEngine engine;
- // initial ScriptContext - can be null
- private volatile ScriptContext initscontext;
// ES6 global lexical scope.
private final LexicalScope lexicalScope;
@@ -957,7 +955,7 @@
private ScriptContext currentContext() {
final ScriptContext sc = scontext != null? scontext.get() : null;
- return sc == null? initscontext : sc;
+ return (sc != null)? sc : (engine != null? engine.getContext() : null);
}
@Override
@@ -1067,16 +1065,14 @@
* of the global scope object.
*
* @param eng ScriptEngine to initialize
- * @param ctxt ScriptContext to initialize
*/
- public void initBuiltinObjects(final ScriptEngine eng, final ScriptContext ctxt) {
+ public void initBuiltinObjects(final ScriptEngine eng) {
if (this.builtinObject != null) {
// already initialized, just return
return;
}
this.engine = eng;
- this.initscontext = ctxt;
if (this.engine != null) {
this.scontext = new ThreadLocal<>();
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeJSAdapter.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeJSAdapter.java Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, 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
@@ -52,18 +52,18 @@
import jdk.nashorn.internal.scripts.JO;
/**
- * This class is the implementation of the Nashorn-specific global object named {@code JSAdapter}. It can be
- * thought of as the {@link java.lang.reflect.Proxy} equivalent for JavaScript. NativeJSAdapter calls specially named
+ * This class is the implementation of the Nashorn-specific global object named {@code JSAdapter}. It can be thought of
+ * as the {@link java.lang.reflect.Proxy} equivalent for JavaScript. A {@code NativeJSAdapter} calls specially named
* JavaScript methods on an adaptee object when property access/update/call/new/delete is attempted on it. Example:
*<pre>
* var y = {
- * __get__ : function (name) { ... }
- * __has__ : function (name) { ... }
- * __put__ : function (name, value) {...}
- * __call__ : function (name, arg1, arg2) {...}
- * __new__ : function (arg1, arg2) {...}
- * __delete__ : function (name) { ... }
- * __getIds__ : function () { ... }
+ * __get__ : function (name) { ... }
+ * __has__ : function (name) { ... }
+ * __put__ : function (name, value) {...}
+ * __call__ : function (name, arg1, arg2) {...}
+ * __new__ : function (arg1, arg2) {...}
+ * __delete__ : function (name) { ... }
+ * __getKeys__ : function () { ... }
* };
*
* var x = new JSAdapter(y);
@@ -74,17 +74,21 @@
* i in x; // calls y.__has__
* x.p = 10; // calls y.__put__
* delete x.p; // calls y.__delete__
- * for (i in x) { print(i); } // calls y.__getIds__
+ * for (i in x) { print(i); } // calls y.__getKeys__
* </pre>
* <p>
- * JavaScript caller of adapter object is isolated from the fact that the property access/mutation/deletion are really
- * calls to JavaScript methods on adaptee.
+ * The {@code __getKeys__} and {@code __getIds__} properties are mapped to the same operation. Concrete
+ * {@code JSAdapter} implementations are expected to use only one of these. As {@code __getIds__} exists for
+ * compatibility reasons only, use of {@code __getKeys__} is recommended.
* </p>
* <p>
- * JSAdapter constructor can optionally receive an "overrides" object. Properties of overrides object is copied to
- * JSAdapter instance. When user accessed property is one of these, then adaptee's methods like {@code __get__},
- * {@code __put__} etc. are not called for those. This can be used to make certain "preferred" properties that can be
- * accessed in the usual/faster way avoiding proxy mechanism. Example:
+ * The JavaScript caller of an adapter object is oblivious of the property access/mutation/deletion's being adapted.
+ * </p>
+ * <p>
+ * The {@code JSAdapter} constructor can optionally receive an "overrides" object. The properties of overrides object
+ * are copied to the {@code JSAdapter} instance. In case user-accessed properties are among these, the adaptee's methods
+ * like {@code __get__}, {@code __put__} etc. are not called for them. This can be used to make certain "preferred"
+ * properties that can be accessed in the usual/faster way avoiding the proxy mechanism. Example:
* </p>
* <pre>
* var x = new JSAdapter({ foo: 444, bar: 6546 }) {
@@ -95,13 +99,13 @@
* x.bar = 'hello'; // "bar" directly set without __put__ call
* x.prop // calls __get__("prop") as 'prop' is not overridden
* </pre>
- * It is possible to pass a specific prototype for JSAdapter instance by passing three arguments to JSAdapter
- * constructor. So exact signature of JSAdapter constructor is as follows:
+ * It is possible to pass a specific prototype for the {@code JSAdapter} instance by passing three arguments to the
+ * {@code JSAdapter} constructor. The exact signature of the {@code JSAdapter} constructor is as follows:
* <pre>
* JSAdapter([proto], [overrides], adaptee);
* </pre>
- * Both proto and overrides are optional - but adaptee is not. When proto is not passed {@code JSAdapter.prototype} is
- * used.
+ * Both the {@code proto} and {@code overrides} arguments are optional - but {@code adaptee} is not. When {@code proto}
+ * is not passed, {@code JSAdapter.prototype} is used.
*/
@ScriptClass("JSAdapter")
public final class NativeJSAdapter extends ScriptObject {
@@ -113,7 +117,7 @@
public static final String __call__ = "__call__";
/** object new operation */
public static final String __new__ = "__new__";
- /** object getIds operation */
+ /** object getIds operation (provided for compatibility reasons; use of getKeys is preferred) */
public static final String __getIds__ = "__getIds__";
/** object getKeys operation */
public static final String __getKeys__ = "__getKeys__";
@@ -142,7 +146,7 @@
private final ScriptObject adaptee;
private final boolean overrides;
- private static final MethodHandle IS_JSADAPTOR = findOwnMH("isJSAdaptor", boolean.class, Object.class, Object.class, MethodHandle.class, Object.class, ScriptFunction.class);
+ private static final MethodHandle IS_JSADAPTER = findOwnMH("isJSAdapter", boolean.class, Object.class, Object.class, MethodHandle.class, Object.class, ScriptFunction.class);
// initialized by nasgen
private static PropertyMap $nasgenmap$;
@@ -626,7 +630,7 @@
// to name. Probably not a big deal, but if we can ever make it leaner, it'd be nice.
return new GuardedInvocation(MH.dropArguments(MH.constant(Object.class,
func.createBound(this, new Object[] { name })), 0, Object.class),
- testJSAdaptor(adaptee, null, null, null),
+ testJSAdapter(adaptee, null, null, null),
adaptee.getProtoSwitchPoints(__call__, find.getOwner()), null);
}
}
@@ -697,7 +701,7 @@
if (methodHandle != null) {
return new GuardedInvocation(
methodHandle,
- testJSAdaptor(adaptee, findData.getGetter(Object.class, INVALID_PROGRAM_POINT, null), findData.getOwner(), func),
+ testJSAdapter(adaptee, findData.getGetter(Object.class, INVALID_PROGRAM_POINT, null), findData.getOwner(), func),
adaptee.getProtoSwitchPoints(hook, findData.getOwner()), null);
}
}
@@ -710,16 +714,16 @@
final MethodHandle methodHandle = hook.equals(__put__) ?
MH.asType(Lookup.EMPTY_SETTER, type) :
Lookup.emptyGetter(type.returnType());
- return new GuardedInvocation(methodHandle, testJSAdaptor(adaptee, null, null, null), adaptee.getProtoSwitchPoints(hook, null), null);
+ return new GuardedInvocation(methodHandle, testJSAdapter(adaptee, null, null, null), adaptee.getProtoSwitchPoints(hook, null), null);
}
}
- private static MethodHandle testJSAdaptor(final Object adaptee, final MethodHandle getter, final Object where, final ScriptFunction func) {
- return MH.insertArguments(IS_JSADAPTOR, 1, adaptee, getter, where, func);
+ private static MethodHandle testJSAdapter(final Object adaptee, final MethodHandle getter, final Object where, final ScriptFunction func) {
+ return MH.insertArguments(IS_JSADAPTER, 1, adaptee, getter, where, func);
}
@SuppressWarnings("unused")
- private static boolean isJSAdaptor(final Object self, final Object adaptee, final MethodHandle getter, final Object where, final ScriptFunction func) {
+ private static boolean isJSAdapter(final Object self, final Object adaptee, final MethodHandle getter, final Object where, final ScriptFunction func) {
final boolean res = self instanceof NativeJSAdapter && ((NativeJSAdapter)self).getAdaptee() == adaptee;
if (res && getter != null) {
try {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java Mon Oct 12 14:41:36 2015 -0700
@@ -140,7 +140,7 @@
private static final LongAdder NAMED_INSTALLED_SCRIPT_COUNT = new LongAdder();
private static final LongAdder ANONYMOUS_INSTALLED_SCRIPT_COUNT = new LongAdder();
- private static final boolean DISABLE_VM_ANONYMOUS_CLASSES = Options.getBooleanProperty("nashorn.disableVmAnonymousClasses");
+
/**
* Should scripts use only object slots for fields, or dual long/object slots? The default
* behaviour is to couple this to optimistic types, using dual representation if optimistic types are enabled
@@ -775,7 +775,7 @@
* @return reusable compiled script across many global scopes.
*/
public MultiGlobalCompiledScript compileScript(final Source source) {
- final Class<?> clazz = compile(source, this.errors, this._strict);
+ final Class<?> clazz = compile(source, this.errors, this._strict, false);
final MethodHandle createProgramFunctionHandle = getCreateProgramFunctionHandle(clazz);
return new MultiGlobalCompiledScript() {
@@ -829,7 +829,7 @@
Class<?> clazz = null;
try {
- clazz = compile(source, new ThrowErrorManager(), strictFlag);
+ clazz = compile(source, new ThrowErrorManager(), strictFlag, true);
} catch (final ParserException e) {
e.throwAsEcmaException(global);
return null;
@@ -1264,17 +1264,16 @@
*
* @param global the global
* @param engine the associated ScriptEngine instance, can be null
- * @param ctxt the initial ScriptContext, can be null
* @return the initialized global scope object.
*/
- public Global initGlobal(final Global global, final ScriptEngine engine, final ScriptContext ctxt) {
+ public Global initGlobal(final Global global, final ScriptEngine engine) {
// Need only minimal global object, if we are just compiling.
if (!env._compile_only) {
final Global oldGlobal = Context.getGlobal();
try {
Context.setGlobal(global);
// initialize global scope with builtin global objects
- global.initBuiltinObjects(engine, ctxt);
+ global.initBuiltinObjects(engine);
} finally {
Context.setGlobal(oldGlobal);
}
@@ -1290,7 +1289,7 @@
* @return the initialized global scope object.
*/
public Global initGlobal(final Global global) {
- return initGlobal(global, null, null);
+ return initGlobal(global, null);
}
/**
@@ -1380,10 +1379,10 @@
}
private ScriptFunction compileScript(final Source source, final ScriptObject scope, final ErrorManager errMan) {
- return getProgramFunction(compile(source, errMan, this._strict), scope);
+ return getProgramFunction(compile(source, errMan, this._strict, false), scope);
}
- private synchronized Class<?> compile(final Source source, final ErrorManager errMan, final boolean strict) {
+ private synchronized Class<?> compile(final Source source, final ErrorManager errMan, final boolean strict, final boolean isEval) {
// start with no errors, no warnings.
errMan.reset();
@@ -1435,7 +1434,7 @@
final URL url = source.getURL();
final CodeSource cs = new CodeSource(url, (CodeSigner[])null);
final CodeInstaller installer;
- if (DISABLE_VM_ANONYMOUS_CLASSES || env._persistent_cache || !env._lazy_compilation) {
+ if (!env.useAnonymousClasses(isEval) || env._persistent_cache || !env._lazy_compilation) {
// Persistent code cache and eager compilation preclude use of VM anonymous classes
final ScriptLoader loader = env._loader_per_compile ? createNewLoader() : scriptLoader;
installer = new NamedContextCodeInstaller(this, cs, loader);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/PropertyMap.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/PropertyMap.java Mon Oct 12 14:41:36 2015 -0700
@@ -34,7 +34,9 @@
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.lang.invoke.SwitchPoint;
+import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
+import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collection;
@@ -43,6 +45,7 @@
import java.util.NoSuchElementException;
import java.util.WeakHashMap;
import java.util.concurrent.atomic.LongAdder;
+import jdk.nashorn.internal.runtime.options.Options;
import jdk.nashorn.internal.scripts.JO;
/**
@@ -55,6 +58,9 @@
* will return a new map.
*/
public class PropertyMap implements Iterable<Object>, Serializable {
+ private static final int INITIAL_SOFT_REFERENCE_DERIVATION_LIMIT =
+ Math.max(0, Options.getIntProperty("nashorn.propertyMap.softReferenceDerivationLimit", 32));
+
/** Used for non extensible PropertyMaps, negative logic as the normal case is extensible. See {@link ScriptObject#preventExtensions()} */
private static final int NOT_EXTENSIBLE = 0b0000_0001;
/** Does this map contain valid array keys? */
@@ -78,6 +84,13 @@
/** Structure class name */
private final String className;
+ /**
+ * Countdown of number of times this property map has been derived from another property map. When it
+ * reaches zero, the property map will start using weak references instead of soft references to hold on
+ * to its history elements.
+ */
+ private final int softReferenceDerivationLimit;
+
/** A reference to the expected shared prototype property map. If this is set this
* property map should only be used if it the same as the actual prototype map. */
private transient SharedPropertyMap sharedProtoMap;
@@ -86,7 +99,7 @@
private transient HashMap<String, SwitchPoint> protoSwitches;
/** History of maps, used to limit map duplication. */
- private transient WeakHashMap<Property, SoftReference<PropertyMap>> history;
+ private transient WeakHashMap<Property, Reference<PropertyMap>> history;
/** History of prototypes, used to limit map duplication. */
private transient WeakHashMap<ScriptObject, SoftReference<PropertyMap>> protoHistory;
@@ -114,6 +127,7 @@
this.fieldMaximum = fieldMaximum;
this.spillLength = spillLength;
this.flags = flags;
+ this.softReferenceDerivationLimit = INITIAL_SOFT_REFERENCE_DERIVATION_LIMIT;
if (Context.DEBUG) {
count.increment();
@@ -126,7 +140,7 @@
* @param propertyMap Existing property map.
* @param properties A {@link PropertyHashMap} with a new set of properties.
*/
- private PropertyMap(final PropertyMap propertyMap, final PropertyHashMap properties, final int flags, final int fieldCount, final int spillLength) {
+ private PropertyMap(final PropertyMap propertyMap, final PropertyHashMap properties, final int flags, final int fieldCount, final int spillLength, final int softReferenceDerivationLimit) {
this.properties = properties;
this.flags = flags;
this.spillLength = spillLength;
@@ -137,6 +151,7 @@
this.listeners = propertyMap.listeners;
this.freeSlots = propertyMap.freeSlots;
this.sharedProtoMap = propertyMap.sharedProtoMap;
+ this.softReferenceDerivationLimit = softReferenceDerivationLimit;
if (Context.DEBUG) {
count.increment();
@@ -150,7 +165,7 @@
* @param propertyMap Existing property map.
*/
protected PropertyMap(final PropertyMap propertyMap) {
- this(propertyMap, propertyMap.properties, propertyMap.flags, propertyMap.fieldCount, propertyMap.spillLength);
+ this(propertyMap, propertyMap.properties, propertyMap.flags, propertyMap.fieldCount, propertyMap.spillLength, propertyMap.softReferenceDerivationLimit);
}
private void writeObject(final ObjectOutputStream out) throws IOException {
@@ -438,11 +453,7 @@
*/
public final PropertyMap addPropertyNoHistory(final Property property) {
propertyAdded(property, true);
- final PropertyHashMap newProperties = properties.immutableAdd(property);
- final PropertyMap newMap = new PropertyMap(this, newProperties, newFlags(property), newFieldCount(property), newSpillLength(property));
- newMap.updateFreeSlots(null, property);
-
- return newMap;
+ return addPropertyInternal(property);
}
/**
@@ -457,15 +468,24 @@
PropertyMap newMap = checkHistory(property);
if (newMap == null) {
- final PropertyHashMap newProperties = properties.immutableAdd(property);
- newMap = new PropertyMap(this, newProperties, newFlags(property), newFieldCount(property), newSpillLength(property));
- newMap.updateFreeSlots(null, property);
+ newMap = addPropertyInternal(property);
addToHistory(property, newMap);
}
return newMap;
}
+ private PropertyMap deriveMap(final PropertyHashMap newProperties, final int newFlags, final int newFieldCount, final int newSpillLength) {
+ return new PropertyMap(this, newProperties, newFlags, newFieldCount, newSpillLength, softReferenceDerivationLimit == 0 ? 0 : softReferenceDerivationLimit - 1);
+ }
+
+ private PropertyMap addPropertyInternal(final Property property) {
+ final PropertyHashMap newProperties = properties.immutableAdd(property);
+ final PropertyMap newMap = deriveMap(newProperties, newFlags(property), newFieldCount(property), newSpillLength(property));
+ newMap.updateFreeSlots(null, property);
+ return newMap;
+ }
+
/**
* Remove a property from a map. Cloning or using an existing map if available.
*
@@ -485,13 +505,13 @@
// If deleted property was last field or spill slot we can make it reusable by reducing field/slot count.
// Otherwise mark it as free in free slots bitset.
if (isSpill && slot >= 0 && slot == spillLength - 1) {
- newMap = new PropertyMap(this, newProperties, flags, fieldCount, spillLength - 1);
+ newMap = deriveMap(newProperties, flags, fieldCount, spillLength - 1);
newMap.freeSlots = freeSlots;
} else if (!isSpill && slot >= 0 && slot == fieldCount - 1) {
- newMap = new PropertyMap(this, newProperties, flags, fieldCount - 1, spillLength);
+ newMap = deriveMap(newProperties, flags, fieldCount - 1, spillLength);
newMap.freeSlots = freeSlots;
} else {
- newMap = new PropertyMap(this, newProperties, flags, fieldCount, spillLength);
+ newMap = deriveMap(newProperties, flags, fieldCount, spillLength);
newMap.updateFreeSlots(property, null);
}
addToHistory(property, newMap);
@@ -539,7 +559,7 @@
// Add replaces existing property.
final PropertyHashMap newProperties = properties.immutableReplace(oldProperty, newProperty);
- final PropertyMap newMap = new PropertyMap(this, newProperties, flags, fieldCount, newSpillLength);
+ final PropertyMap newMap = deriveMap(newProperties, flags, fieldCount, newSpillLength);
if (!sameType) {
newMap.updateFreeSlots(oldProperty, newProperty);
@@ -584,7 +604,7 @@
final Property[] otherProperties = other.properties.getProperties();
final PropertyHashMap newProperties = properties.immutableAdd(otherProperties);
- final PropertyMap newMap = new PropertyMap(this, newProperties, flags, fieldCount, spillLength);
+ final PropertyMap newMap = deriveMap(newProperties, flags, fieldCount, spillLength);
for (final Property property : otherProperties) {
// This method is only safe to use with non-slotted, native getter/setter properties
assert property.getSlot() == -1;
@@ -618,7 +638,7 @@
* @return New map with {@link #NOT_EXTENSIBLE} flag set.
*/
PropertyMap preventExtensions() {
- return new PropertyMap(this, properties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
+ return deriveMap(properties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
}
/**
@@ -634,7 +654,7 @@
newProperties = newProperties.immutableAdd(oldProperty.addFlags(Property.NOT_CONFIGURABLE));
}
- return new PropertyMap(this, newProperties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
+ return deriveMap(newProperties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
}
/**
@@ -656,7 +676,7 @@
newProperties = newProperties.immutableAdd(oldProperty.addFlags(propertyFlags));
}
- return new PropertyMap(this, newProperties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
+ return deriveMap(newProperties, flags | NOT_EXTENSIBLE, fieldCount, spillLength);
}
/**
@@ -743,7 +763,7 @@
history = new WeakHashMap<>();
}
- history.put(property, new SoftReference<>(newMap));
+ history.put(property, softReferenceDerivationLimit == 0 ? new WeakReference<>(newMap) : new SoftReference<>(newMap));
}
/**
@@ -756,7 +776,7 @@
private PropertyMap checkHistory(final Property property) {
if (history != null) {
- final SoftReference<PropertyMap> ref = history.get(property);
+ final Reference<PropertyMap> ref = history.get(property);
final PropertyMap historicMap = ref == null ? null : ref.get();
if (historicMap != null) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java Mon Oct 12 14:41:36 2015 -0700
@@ -62,7 +62,7 @@
import jdk.nashorn.internal.ir.SwitchNode;
import jdk.nashorn.internal.ir.Symbol;
import jdk.nashorn.internal.ir.TryNode;
-import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor;
import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.parser.Parser;
import jdk.nashorn.internal.parser.Token;
@@ -518,8 +518,7 @@
// don't cache non-split functions from the eager pass); those already cached, or those not split
// don't need this step.
final Set<Symbol> blockDefinedSymbols = fn.isSplit() && !cached ? Collections.newSetFromMap(new IdentityHashMap<>()) : null;
- FunctionNode newFn = (FunctionNode)fn.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
-
+ FunctionNode newFn = (FunctionNode)fn.accept(new SimpleNodeVisitor() {
private Symbol getReplacement(final Symbol original) {
if (original == null) {
return null;
@@ -757,7 +756,7 @@
private FunctionNode extractFunctionFromScript(final FunctionNode script) {
final Set<FunctionNode> fns = new HashSet<>();
- script.getBody().accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
+ script.getBody().accept(new SimpleNodeVisitor() {
@Override
public boolean enterFunctionNode(final FunctionNode fn) {
fns.add(fn);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptEnvironment.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptEnvironment.java Mon Oct 12 14:41:36 2015 -0700
@@ -213,6 +213,14 @@
/** Timing */
public final Timing _timing;
+ /** Whether to use anonymous classes. See {@link #useAnonymousClasses(boolean)}. */
+ private final AnonymousClasses _anonymousClasses;
+ private enum AnonymousClasses {
+ AUTO,
+ OFF,
+ ON
+ }
+
/**
* Constructor
*
@@ -279,6 +287,18 @@
_version = options.getBoolean("version");
_verify_code = options.getBoolean("verify.code");
+ final String anonClasses = options.getString("anonymous.classes");
+ if (anonClasses == null || anonClasses.equals("auto")) {
+ _anonymousClasses = AnonymousClasses.AUTO;
+ } else if (anonClasses.equals("true")) {
+ _anonymousClasses = AnonymousClasses.ON;
+ } else if (anonClasses.equals("false")) {
+ _anonymousClasses = AnonymousClasses.OFF;
+ } else {
+ throw new RuntimeException("Unsupported value for anonymous classes: " + anonClasses);
+ }
+
+
final String language = options.getString("language");
if (language == null || language.equals("es5")) {
_es6 = false;
@@ -411,4 +431,13 @@
return _timing != null ? _timing.isEnabled() : false;
}
+ /**
+ * Returns true if compilation should use anonymous classes.
+ * @param isEval true if compilation is an eval call.
+ * @return true if anonymous classes should be used
+ */
+ public boolean useAnonymousClasses(final boolean isEval) {
+ return _anonymousClasses == AnonymousClasses.ON || (_anonymousClasses == AnonymousClasses.AUTO && isEval);
+ }
+
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java Mon Oct 12 14:41:36 2015 -0700
@@ -710,8 +710,7 @@
final long longIndex = ArrayIndex.toLongIndex(index);
final long oldLength = getArray().length();
if (longIndex >= oldLength) {
- setArray(getArray().ensure(longIndex));
- doesNotHaveEnsureDelete(longIndex, oldLength, false);
+ setArray(getArray().ensure(longIndex).safeDelete(oldLength, longIndex - 1, false));
}
setArray(getArray().set(index, value, false));
}
@@ -2693,11 +2692,7 @@
}
if (newLength > arrayLength) {
- data = data.ensure(newLength - 1);
- if (data.canDelete(arrayLength, newLength - 1, false)) {
- data = data.delete(arrayLength, newLength - 1);
- }
- setArray(data);
+ setArray(data.ensure(newLength - 1).safeDelete(arrayLength, newLength - 1, false));
return;
}
@@ -3118,23 +3113,12 @@
return false;
}
- private void doesNotHaveEnsureDelete(final long longIndex, final long oldLength, final boolean strict) {
- if (longIndex > oldLength) {
- ArrayData array = getArray();
- if (array.canDelete(oldLength, longIndex - 1, strict)) {
- array = array.delete(oldLength, longIndex - 1);
- }
- setArray(array);
- }
- }
-
private void doesNotHave(final int index, final int value, final int callSiteFlags) {
final long oldLength = getArray().length();
final long longIndex = ArrayIndex.toLongIndex(index);
if (!doesNotHaveCheckArrayKeys(longIndex, value, callSiteFlags) && !doesNotHaveEnsureLength(longIndex, oldLength, callSiteFlags)) {
final boolean strict = isStrictFlag(callSiteFlags);
- setArray(getArray().set(index, value, strict));
- doesNotHaveEnsureDelete(longIndex, oldLength, strict);
+ setArray(getArray().set(index, value, strict).safeDelete(oldLength, longIndex - 1, strict));
}
}
@@ -3143,8 +3127,7 @@
final long longIndex = ArrayIndex.toLongIndex(index);
if (!doesNotHaveCheckArrayKeys(longIndex, value, callSiteFlags) && !doesNotHaveEnsureLength(longIndex, oldLength, callSiteFlags)) {
final boolean strict = isStrictFlag(callSiteFlags);
- setArray(getArray().set(index, value, strict));
- doesNotHaveEnsureDelete(longIndex, oldLength, strict);
+ setArray(getArray().set(index, value, strict).safeDelete(oldLength, longIndex - 1, strict));
}
}
@@ -3153,8 +3136,7 @@
final long longIndex = ArrayIndex.toLongIndex(index);
if (!doesNotHaveCheckArrayKeys(longIndex, value, callSiteFlags) && !doesNotHaveEnsureLength(longIndex, oldLength, callSiteFlags)) {
final boolean strict = isStrictFlag(callSiteFlags);
- setArray(getArray().set(index, value, strict));
- doesNotHaveEnsureDelete(longIndex, oldLength, strict);
+ setArray(getArray().set(index, value, strict).safeDelete(oldLength, longIndex - 1, strict));
}
}
@@ -3163,8 +3145,7 @@
final long longIndex = ArrayIndex.toLongIndex(index);
if (!doesNotHaveCheckArrayKeys(longIndex, value, callSiteFlags) && !doesNotHaveEnsureLength(longIndex, oldLength, callSiteFlags)) {
final boolean strict = isStrictFlag(callSiteFlags);
- setArray(getArray().set(index, value, strict));
- doesNotHaveEnsureDelete(longIndex, oldLength, strict);
+ setArray(getArray().set(index, value, strict).safeDelete(oldLength, longIndex - 1, strict));
}
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ArrayData.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ArrayData.java Mon Oct 12 14:41:36 2015 -0700
@@ -258,7 +258,7 @@
* Factory method for unspecified array - start as int
* @return ArrayData
*/
- public final static ArrayData initialArray() {
+ public static ArrayData initialArray() {
return new IntArrayData();
}
@@ -278,7 +278,7 @@
* @param size size required
* @return size given, always >= size
*/
- protected final static int alignUp(final int size) {
+ protected static int alignUp(final int size) {
return size + CHUNK_SIZE - 1 & ~(CHUNK_SIZE - 1);
}
@@ -288,7 +288,7 @@
* @param length the initial length
* @return ArrayData
*/
- public static final ArrayData allocate(final int length) {
+ public static ArrayData allocate(final int length) {
if (length == 0) {
return new IntArrayData();
} else if (length >= SparseArrayData.MAX_DENSE_LENGTH) {
@@ -304,7 +304,7 @@
* @param array the array
* @return ArrayData wrapping this array
*/
- public static final ArrayData allocate(final Object array) {
+ public static ArrayData allocate(final Object array) {
final Class<?> clazz = array.getClass();
if (clazz == int[].class) {
@@ -324,7 +324,7 @@
* @param array the array to use for initial elements
* @return the ArrayData
*/
- public static final ArrayData allocate(final int[] array) {
+ public static ArrayData allocate(final int[] array) {
return new IntArrayData(array, array.length);
}
@@ -334,7 +334,7 @@
* @param array the array to use for initial elements
* @return the ArrayData
*/
- public static final ArrayData allocate(final long[] array) {
+ public static ArrayData allocate(final long[] array) {
return new LongArrayData(array, array.length);
}
@@ -344,7 +344,7 @@
* @param array the array to use for initial elements
* @return the ArrayData
*/
- public static final ArrayData allocate(final double[] array) {
+ public static ArrayData allocate(final double[] array) {
return new NumberArrayData(array, array.length);
}
@@ -354,7 +354,7 @@
* @param array the array to use for initial elements
* @return the ArrayData
*/
- public static final ArrayData allocate(final Object[] array) {
+ public static ArrayData allocate(final Object[] array) {
return new ObjectArrayData(array, array.length);
}
@@ -364,7 +364,7 @@
* @param buf the nio ByteBuffer to wrap
* @return the ArrayData
*/
- public static final ArrayData allocate(final ByteBuffer buf) {
+ public static ArrayData allocate(final ByteBuffer buf) {
return new ByteBufferArrayData(buf);
}
@@ -374,7 +374,7 @@
* @param underlying the underlying ArrayData to wrap in the freeze filter
* @return the frozen ArrayData
*/
- public static final ArrayData freeze(final ArrayData underlying) {
+ public static ArrayData freeze(final ArrayData underlying) {
return new FrozenArrayFilter(underlying);
}
@@ -384,7 +384,7 @@
* @param underlying the underlying ArrayData to wrap in the seal filter
* @return the sealed ArrayData
*/
- public static final ArrayData seal(final ArrayData underlying) {
+ public static ArrayData seal(final ArrayData underlying) {
return new SealedArrayFilter(underlying);
}
@@ -394,7 +394,7 @@
* @param underlying the underlying ArrayData to wrap in the non extensible filter
* @return new array data, filtered
*/
- public static final ArrayData preventExtension(final ArrayData underlying) {
+ public static ArrayData preventExtension(final ArrayData underlying) {
return new NonExtensibleArrayFilter(underlying);
}
@@ -404,7 +404,7 @@
* @param underlying the underlying ArrayDAta to wrap in the non extensible filter
* @return new array data, filtered
*/
- public static final ArrayData setIsLengthNotWritable(final ArrayData underlying) {
+ public static ArrayData setIsLengthNotWritable(final ArrayData underlying) {
return new LengthNotWritableFilter(underlying);
}
@@ -676,19 +676,34 @@
}
/**
- * Returns if element at specific index range can be deleted or not.
+ * Returns if element at specific index can be deleted or not.
*
- * @param fromIndex the start index
- * @param toIndex the end index
+ * @param longIndex the index
* @param strict are we in strict mode
*
* @return true if range can be deleted
*/
- public boolean canDelete(final long fromIndex, final long toIndex, final boolean strict) {
+ public boolean canDelete(final long longIndex, final boolean strict) {
return true;
}
/**
+ * Delete a range from the array if {@code fromIndex} is less than or equal to {@code toIndex}
+ * and the array supports deletion.
+ *
+ * @param fromIndex the start index (inclusive)
+ * @param toIndex the end index (inclusive)
+ * @param strict are we in strict mode
+ * @return an array with the range deleted, or this array if no deletion took place
+ */
+ public final ArrayData safeDelete(final long fromIndex, final long toIndex, final boolean strict) {
+ if (fromIndex <= toIndex && canDelete(fromIndex, strict)) {
+ return delete(fromIndex, toIndex);
+ }
+ return this;
+ }
+
+ /**
* Returns property descriptor for element at a given index
*
* @param global the global object
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ByteBufferArrayData.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ByteBufferArrayData.java Mon Oct 12 14:41:36 2015 -0700
@@ -164,7 +164,7 @@
}
@Override
- public boolean canDelete(final long fromIndex, final long toIndex, final boolean strict) {
+ public boolean canDelete(final long longIndex, final boolean strict) {
return false;
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/SealedArrayFilter.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/SealedArrayFilter.java Mon Oct 12 14:41:36 2015 -0700
@@ -50,15 +50,15 @@
@Override
public boolean canDelete(final int index, final boolean strict) {
- if (strict) {
- throw typeError("cant.delete.property", Integer.toString(index), "sealed array");
- }
- return false;
+ return canDelete(ArrayIndex.toLongIndex(index), strict);
}
@Override
- public boolean canDelete(final long fromIndex, final long toIndex, final boolean strict) {
- return canDelete((int) fromIndex, strict);
+ public boolean canDelete(final long longIndex, final boolean strict) {
+ if (strict) {
+ throw typeError("cant.delete.property", Long.toString(longIndex), "sealed array");
+ }
+ return false;
}
@Override
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/SparseArrayData.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/SparseArrayData.java Mon Oct 12 14:41:36 2015 -0700
@@ -36,7 +36,7 @@
* Handle arrays where the index is very large.
*/
class SparseArrayData extends ArrayData {
- static final int MAX_DENSE_LENGTH = 8 * 1024 * 1024;
+ static final int MAX_DENSE_LENGTH = 1024 * 1024;
/** Underlying array. */
private ArrayData underlying;
@@ -48,7 +48,7 @@
private TreeMap<Long, Object> sparseMap;
SparseArrayData(final ArrayData underlying, final long length) {
- this(underlying, length, new TreeMap<Long, Object>());
+ this(underlying, length, new TreeMap<>());
}
SparseArrayData(final ArrayData underlying, final long length, final TreeMap<Long, Object> sparseMap) {
@@ -166,8 +166,9 @@
@Override
public ArrayData set(final int index, final Object value, final boolean strict) {
if (index >= 0 && index < maxDenseLength) {
+ final long oldLength = underlying.length();
ensure(index);
- underlying = underlying.set(index, value, strict);
+ underlying = underlying.set(index, value, strict).safeDelete(oldLength, index - 1, strict);
setLength(Math.max(underlying.length(), length()));
} else {
final Long longIndex = indexToKey(index);
@@ -181,8 +182,9 @@
@Override
public ArrayData set(final int index, final int value, final boolean strict) {
if (index >= 0 && index < maxDenseLength) {
+ final long oldLength = underlying.length();
ensure(index);
- underlying = underlying.set(index, value, strict);
+ underlying = underlying.set(index, value, strict).safeDelete(oldLength, index - 1, strict);
setLength(Math.max(underlying.length(), length()));
} else {
final Long longIndex = indexToKey(index);
@@ -195,8 +197,9 @@
@Override
public ArrayData set(final int index, final long value, final boolean strict) {
if (index >= 0 && index < maxDenseLength) {
+ final long oldLength = underlying.length();
ensure(index);
- underlying = underlying.set(index, value, strict);
+ underlying = underlying.set(index, value, strict).safeDelete(oldLength, index - 1, strict);
setLength(Math.max(underlying.length(), length()));
} else {
final Long longIndex = indexToKey(index);
@@ -209,8 +212,9 @@
@Override
public ArrayData set(final int index, final double value, final boolean strict) {
if (index >= 0 && index < maxDenseLength) {
+ final long oldLength = underlying.length();
ensure(index);
- underlying = underlying.set(index, value, strict);
+ underlying = underlying.set(index, value, strict).safeDelete(oldLength, index - 1, strict);
setLength(Math.max(underlying.length(), length()));
} else {
final Long longIndex = indexToKey(index);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/TypedArrayData.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/TypedArrayData.java Mon Oct 12 14:41:36 2015 -0700
@@ -83,7 +83,7 @@
}
@Override
- public boolean canDelete(final long fromIndex, final long toIndex, final boolean strict) {
+ public boolean canDelete(final long longIndex, final boolean strict) {
return false;
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/BrowserJSObjectLinker.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/BrowserJSObjectLinker.java Mon Oct 12 14:41:36 2015 -0700
@@ -107,9 +107,10 @@
return null;
}
- final GuardedInvocation inv;
+ GuardedInvocation inv;
if (jsObjectClass.isInstance(self)) {
inv = lookup(desc, request, linkerServices);
+ inv = inv.replaceMethods(linkerServices.filterInternalObjects(inv.getInvocation()), inv.getGuard());
} else {
throw new AssertionError(); // Should never reach here.
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java Mon Oct 12 14:41:36 2015 -0700
@@ -77,9 +77,10 @@
return null;
}
- final GuardedInvocation inv;
+ GuardedInvocation inv;
if (self instanceof JSObject) {
inv = lookup(desc, request, linkerServices);
+ inv = inv.replaceMethods(linkerServices.filterInternalObjects(inv.getInvocation()), inv.getGuard());
} else if (self instanceof Map || self instanceof Bindings) {
// guard to make sure the Map or Bindings does not turn into JSObject later!
final GuardedInvocation beanInv = nashornBeansLinker.getGuardedInvocation(request, linkerServices);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java Mon Oct 12 14:41:36 2015 -0700
@@ -64,9 +64,6 @@
private static final String PROFILEFILE = Options.getStringProperty("nashorn.profilefile", "NashornProfile.txt");
private static final MethodHandle INCREASE_MISS_COUNTER = MH.findStatic(MethodHandles.lookup(), LinkerCallSite.class, "increaseMissCount", MH.type(Object.class, String.class, Object.class));
- private static final MethodHandle ON_CATCH_INVALIDATION = MH.findStatic(MethodHandles.lookup(), LinkerCallSite.class, "onCatchInvalidation", MH.type(ChainedCallSite.class, LinkerCallSite.class));
-
- private int catchInvalidations;
LinkerCallSite(final NashornCallSiteDescriptor descriptor) {
super(descriptor);
@@ -75,34 +72,6 @@
}
}
- @Override
- protected MethodHandle getPruneCatches() {
- return MH.filterArguments(super.getPruneCatches(), 0, ON_CATCH_INVALIDATION);
- }
-
- /**
- * Action to perform when a catch guard around a callsite triggers. Increases
- * catch invalidation counter
- * @param callSite callsite
- * @return the callsite, so this can be used as argument filter
- */
- @SuppressWarnings("unused")
- private static ChainedCallSite onCatchInvalidation(final LinkerCallSite callSite) {
- ++callSite.catchInvalidations;
- return callSite;
- }
-
- /**
- * Get the number of catch invalidations that have happened at this call site so far
- * @param callSiteToken call site token, unique to the callsite.
- * @return number of catch invalidations, i.e. thrown exceptions caught by the linker
- */
- public static int getCatchInvalidationCount(final Object callSiteToken) {
- if (callSiteToken instanceof LinkerCallSite) {
- return ((LinkerCallSite)callSiteToken).catchInvalidations;
- }
- return 0;
- }
/**
* Construct a new linker call site.
* @param name Name of method.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/joni/EncodingHelper.java Mon Oct 12 14:41:36 2015 -0700
@@ -278,8 +278,9 @@
case 0x0d:
return true;
default:
- // true if Unicode separator or BOM
- return (1 << Character.getType(code) & CharacterType.SPACE_MASK) != 0 || code == 0xfeff;
+ // true if Unicode separator or BOM or U+180E (see JDK-8138758)
+ return (1 << Character.getType(code) & CharacterType.SPACE_MASK) != 0
+ || code == 0xfeff || code == 0x180e;
}
case CharacterType.UPPER:
return Character.isUpperCase(code);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Options.properties Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Options.properties Mon Oct 12 14:41:36 2015 -0700
@@ -380,6 +380,15 @@
enterexit [trace callsite enter/exit], objects [print object properties]." \
}
+nashorn.option.anonymous.classes = { \
+ name="--anonymous-classes", \
+ is_undocumented=true, \
+ params=[auto|true|false], \
+ default=auto, \
+ type=string, \
+ desc="Use VM anonymous classes for compiled scripts." \
+}
+
nashorn.option.verify.code = { \
name="--verify-code", \
is_undocumented=true, \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8137281.js Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/**
+ * JDK-8137281: OutOfMemoryError with large numeric keys in JSON.parse
+ *
+ * @test
+ * @run
+ */
+
+function createObject(startKey, level1, level2) {
+ var root = {};
+ var key = startKey;
+ for (var i = 0; i < level1; i++) {
+ var child = {};
+ for (var j = 0; j < level2; j++) {
+ child[key++] = {};
+ }
+ root[key++] = child;
+ }
+ return root;
+}
+
+JSON.parse(JSON.stringify(createObject(500000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(1000000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(2000000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(4000000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(8000000, 20, 20)));
+JSON.parse(JSON.stringify(createObject(16000000, 20, 20)));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8138632.js Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/**
+ * JDK-8138632: Sparse array does not handle growth of underlying dense array
+ *
+ * @test
+ * @run
+ */
+
+var x = [];
+x[10000000] = 1;
+x[10] = 1;
+x[20] = 1;
+print(Object.keys(x));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8138632.js.EXPECTED Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,1 @@
+10,20,10000000
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8138758.js Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/**
+ * JDK-8138758: U+180E not recognized as whitespace by Joni
+ *
+ * @test
+ * @run
+ */
+
+
+Assert.assertEquals("\u180e".replace(/\s/, "OK"), "OK");
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/jsadapter-ids.js Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2015, 2015, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Verify that JSAdapter __getIds__ works as expected.
+ *
+ * @test
+ * @run
+ */
+
+var obj = new JSAdapter() {
+ __getIds__: function() {
+ print("__getIds__ called");
+ return [ "foo", "bar" ];
+ }
+};
+
+// calls __getIds__
+for (i in obj) {
+ print(i);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/jsadapter-ids.js.EXPECTED Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,3 @@
+__getIds__ called
+foo
+bar
--- a/nashorn/test/script/basic/jsadapter.js Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/test/script/basic/jsadapter.js Mon Oct 12 14:41:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, 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
@@ -45,8 +45,8 @@
print("new with " + arg1 + ", " + arg2);
},
- __getIds__: function() {
- print("__getIds__ called");
+ __getKeys__: function() {
+ print("__getKeys__ called");
return [ "foo", "bar" ];
},
@@ -78,22 +78,28 @@
// calls __new__
new obj("hey!", "it works!");
+// calls __getKeys__
for (i in obj) {
print(i);
}
+// calls __getValues__
for each (i in obj) {
print(i);
}
+// calls __has__
var x = "foo" in obj;
print(x);
+// calls __has__
var y = "js" in obj;
print(y);
+// calls __delete__
print(delete obj.prop);
+// call __get__ and __set__
print(obj["js"]);
obj["js"] = "javascript";
print(obj["javascript"]);
--- a/nashorn/test/script/basic/jsadapter.js.EXPECTED Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/test/script/basic/jsadapter.js.EXPECTED Mon Oct 12 14:41:36 2015 -0700
@@ -3,7 +3,7 @@
setter called for 'foo' with 33
method 'func' called with hello, world
new with hey!, it works!
-__getIds__ called
+__getKeys__ called
foo
bar
__getValues__ called
--- a/nashorn/test/script/nosecurity/JDK-8044798.js Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/test/script/nosecurity/JDK-8044798.js Mon Oct 12 14:41:36 2015 -0700
@@ -126,12 +126,12 @@
// private compile method of Context class
var compileMethod = Context.class.getDeclaredMethod("compile",
- sourceCls, errorMgrCls, booleanCls);
+ sourceCls, errorMgrCls, booleanCls, booleanCls);
compileMethod.accessible = true;
var scriptCls = compileMethod.invoke(Context.context,
Source.sourceFor("test", "print('hello')"),
- new Context.ThrowErrorManager(), false);
+ new Context.ThrowErrorManager(), false, false);
var SCRIPT_CLASS_NAME_PREFIX = "jdk.nashorn.internal.scripts.Script$";
print("script class name pattern satisfied? " +
--- a/nashorn/test/src/jdk/nashorn/api/scripting/JSONCompatibleTest.java Mon Oct 12 16:26:58 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2015, 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.
- */
-
-package jdk.nashorn.api.scripting;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import javax.script.ScriptEngine;
-import javax.script.ScriptException;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-public class JSONCompatibleTest {
-
- /**
- * Wrap a top-level array as a list.
- */
- @Test
- public void testWrapArray() throws ScriptException {
- final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
- final Object val = engine.eval("Java.asJSONCompatible([1, 2, 3])");
- assertEquals(asList(val), Arrays.asList(1, 2, 3));
- }
-
- /**
- * Wrap an embedded array as a list.
- */
- @Test
- public void testWrapObjectWithArray() throws ScriptException {
- final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
- final Object val = engine.eval("Java.asJSONCompatible({x: [1, 2, 3]})");
- assertEquals(asList(asMap(val).get("x")), Arrays.asList(1, 2, 3));
- }
-
- /**
- * Check it all works transitively several more levels down.
- */
- @Test
- public void testDeepWrapping() throws ScriptException {
- final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
- final Object val = engine.eval("Java.asJSONCompatible({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
- final Map<String, Object> root = asMap(val);
- final List<Object> x = asList(root.get("x"));
- assertEquals(x.get(0), 1);
- final Map<String, Object> x1 = asMap(x.get(1));
- final List<Object> y = asList(x1.get("y"));
- assertEquals(y.get(0), 2);
- final Map<String, Object> y1 = asMap(y.get(1));
- assertEquals(asList(y1.get("z")), Arrays.asList(3));
- assertEquals(asList(x.get(2)), Arrays.asList(4, 5));
- }
-
- /**
- * Ensure that the old behaviour (every object is a Map) is unchanged.
- */
- @Test
- public void testNonWrapping() throws ScriptException {
- final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
- final Object val = engine.eval("({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
- final Map<String, Object> root = asMap(val);
- final Map<String, Object> x = asMap(root.get("x"));
- assertEquals(x.get("0"), 1);
- final Map<String, Object> x1 = asMap(x.get("1"));
- final Map<String, Object> y = asMap(x1.get("y"));
- assertEquals(y.get("0"), 2);
- final Map<String, Object> y1 = asMap(y.get("1"));
- final Map<String, Object> z = asMap(y1.get("z"));
- assertEquals(z.get("0"), 3);
- final Map<String, Object> x2 = asMap(x.get("2"));
- assertEquals(x2.get("0"), 4);
- assertEquals(x2.get("1"), 5);
- }
-
- @SuppressWarnings("unchecked")
- private static List<Object> asList(final Object obj) {
- assertJSObject(obj);
- Assert.assertTrue(obj instanceof List);
- return (List)obj;
- }
-
- @SuppressWarnings("unchecked")
- private static Map<String, Object> asMap(final Object obj) {
- assertJSObject(obj);
- Assert.assertTrue(obj instanceof Map);
- return (Map)obj;
- }
-
- private static void assertJSObject(final Object obj) {
- assertTrue(obj instanceof JSObject);
- }
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/test/JSONCompatibleTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+package jdk.nashorn.api.scripting.test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
+import jdk.nashorn.api.scripting.JSObject;
+import jdk.nashorn.api.scripting.NashornScriptEngine;
+import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class JSONCompatibleTest {
+
+ /**
+ * Wrap a top-level array as a list.
+ */
+ @Test
+ public void testWrapArray() throws ScriptException {
+ final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+ final Object val = engine.eval("Java.asJSONCompatible([1, 2, 3])");
+ assertEquals(asList(val), Arrays.asList(1, 2, 3));
+ }
+
+ /**
+ * Wrap an embedded array as a list.
+ */
+ @Test
+ public void testWrapObjectWithArray() throws ScriptException {
+ final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+ final Object val = engine.eval("Java.asJSONCompatible({x: [1, 2, 3]})");
+ assertEquals(asList(asMap(val).get("x")), Arrays.asList(1, 2, 3));
+ }
+
+ /**
+ * Check it all works transitively several more levels down.
+ */
+ @Test
+ public void testDeepWrapping() throws ScriptException {
+ final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+ final Object val = engine.eval("Java.asJSONCompatible({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
+ final Map<String, Object> root = asMap(val);
+ final List<Object> x = asList(root.get("x"));
+ assertEquals(x.get(0), 1);
+ final Map<String, Object> x1 = asMap(x.get(1));
+ final List<Object> y = asList(x1.get("y"));
+ assertEquals(y.get(0), 2);
+ final Map<String, Object> y1 = asMap(y.get(1));
+ assertEquals(asList(y1.get("z")), Arrays.asList(3));
+ assertEquals(asList(x.get(2)), Arrays.asList(4, 5));
+ }
+
+ /**
+ * Ensure that the old behaviour (every object is a Map) is unchanged.
+ */
+ @Test
+ public void testNonWrapping() throws ScriptException {
+ final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+ final Object val = engine.eval("({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
+ final Map<String, Object> root = asMap(val);
+ final Map<String, Object> x = asMap(root.get("x"));
+ assertEquals(x.get("0"), 1);
+ final Map<String, Object> x1 = asMap(x.get("1"));
+ final Map<String, Object> y = asMap(x1.get("y"));
+ assertEquals(y.get("0"), 2);
+ final Map<String, Object> y1 = asMap(y.get("1"));
+ final Map<String, Object> z = asMap(y1.get("z"));
+ assertEquals(z.get("0"), 3);
+ final Map<String, Object> x2 = asMap(x.get("2"));
+ assertEquals(x2.get("0"), 4);
+ assertEquals(x2.get("1"), 5);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static List<Object> asList(final Object obj) {
+ assertJSObject(obj);
+ Assert.assertTrue(obj instanceof List);
+ return (List)obj;
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map<String, Object> asMap(final Object obj) {
+ assertJSObject(obj);
+ Assert.assertTrue(obj instanceof Map);
+ return (Map)obj;
+ }
+
+ private static void assertJSObject(final Object obj) {
+ assertTrue(obj instanceof JSObject);
+ }
+}
--- a/nashorn/test/src/jdk/nashorn/api/scripting/test/PluggableJSObjectTest.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/test/PluggableJSObjectTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -27,6 +27,7 @@
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import java.nio.IntBuffer;
@@ -34,9 +35,11 @@
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Set;
+import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import jdk.nashorn.api.scripting.AbstractJSObject;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
import org.testng.annotations.Test;
/**
@@ -286,4 +289,23 @@
fail(exp.getMessage());
}
}
+
+ // @bug 8137258: JSObjectLinker and BrowserJSObjectLinker should not expose internal JS objects
+ @Test
+ public void hidingInternalObjectsForJSObjectTest() throws Exception {
+ final ScriptEngineManager engineManager = new ScriptEngineManager();
+ final ScriptEngine e = engineManager.getEngineByName("nashorn");
+
+ final String code = "function func(obj) { obj.foo = [5, 5]; obj.bar = {} }";
+ e.eval(code);
+
+ // call the exposed function but pass user defined JSObject impl as argument
+ ((Invocable)e).invokeFunction("func", new AbstractJSObject() {
+ @Override
+ public void setMember(final String name, final Object value) {
+ // make sure that wrapped objects are passed (and not internal impl. objects)
+ assertTrue(value.getClass() == ScriptObjectMirror.class);
+ }
+ });
+ }
}
--- a/nashorn/test/src/jdk/nashorn/api/scripting/test/ScopeTest.java Mon Oct 12 16:26:58 2015 +0300
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/test/ScopeTest.java Mon Oct 12 14:41:36 2015 -0700
@@ -30,6 +30,7 @@
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import javax.script.Bindings;
+import javax.script.Invocable;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineFactory;
@@ -855,4 +856,59 @@
assertTrue(ret, "Expected true in iteration " + i);
}
}
+
+ // @bug 8138616: invokeFunction fails if function calls a function defined in GLOBAL_SCOPE
+ @Test
+ public void invokeFunctionInGlobalScopeTest() throws Exception {
+ final ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
+ final ScriptContext ctxt = engine.getContext();
+
+ // define a function called "func"
+ engine.eval("func = function() { return 42 }");
+
+ // move ENGINE_SCOPE Bindings to GLOBAL_SCOPE
+ ctxt.setBindings(ctxt.getBindings(ScriptContext.ENGINE_SCOPE), ScriptContext.GLOBAL_SCOPE);
+
+ // create a new Bindings and set as ENGINE_SCOPE
+ ctxt.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
+
+ // define new function that calls "func" now in GLOBAL_SCOPE
+ engine.eval("newfunc = function() { return func() }");
+
+ // call "newfunc" and check the return value
+ Object value = ((Invocable)engine).invokeFunction("newfunc");
+ assertTrue(((Number)value).intValue() == 42);
+ }
+
+
+ // @bug 8138616: invokeFunction fails if function calls a function defined in GLOBAL_SCOPE
+ // variant of above that replaces default ScriptContext of the engine with a fresh instance!
+ @Test
+ public void invokeFunctionInGlobalScopeTest2() throws Exception {
+ final ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
+
+ // create a new ScriptContext instance
+ final ScriptContext ctxt = new SimpleScriptContext();
+ // set it as 'default' ScriptContext
+ engine.setContext(ctxt);
+
+ // create a new Bindings and set as ENGINE_SCOPE
+ ctxt.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
+
+ // define a function called "func"
+ engine.eval("func = function() { return 42 }");
+
+ // move ENGINE_SCOPE Bindings to GLOBAL_SCOPE
+ ctxt.setBindings(ctxt.getBindings(ScriptContext.ENGINE_SCOPE), ScriptContext.GLOBAL_SCOPE);
+
+ // create a new Bindings and set as ENGINE_SCOPE
+ ctxt.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
+
+ // define new function that calls "func" now in GLOBAL_SCOPE
+ engine.eval("newfunc = function() { return func() }");
+
+ // call "newfunc" and check the return value
+ Object value = ((Invocable)engine).invokeFunction("newfunc");
+ assertTrue(((Number)value).intValue() == 42);
+ }
}
--- a/test/make/TestMakeBase.gmk Mon Oct 12 16:26:58 2015 +0300
+++ b/test/make/TestMakeBase.gmk Mon Oct 12 14:41:36 2015 -0700
@@ -213,23 +213,20 @@
VARDEP_TEST_VAR2 := value3
VARDEP_RETURN_VALUE := $(call DependOnVariable, VARDEP_TEST_VAR2, $(VARDEP_VALUE_FILE))
-ifneq ($(VARDEP_VALUE_FILE), $(VARDEP_RETURN_VALUE))
- $(error Expected: $(VARDEP_VALUE_FILE) - DependOnVariable: $(VARDEP_RETURN_VALUE))
-endif
+$(eval $(call assert-equals, $(VARDEP_RETURN_VALUE), $(VARDEP_VALUE_FILE), \
+ Wrong filename returned))
VARDEP_FILE_CONTENTS := $(shell $(CAT) $(VARDEP_VALUE_FILE))
-ifneq ($(VARDEP_TEST_VAR2), $(VARDEP_FILE_CONTENTS))
- $(error Expected: $(VARDEP_TEST_VAR2) - DependOnVariable file contained: \
- $(VARDEP_FILE_CONTENTS))
-endif
+$(eval $(call assert-equals, $(VARDEP_FILE_CONTENTS), \
+ VARDEP_TEST_VAR2_old:=$(VARDEP_TEST_VAR2), \
+ Wrong contents in vardeps file))
# Test with a variable value containing some problematic characters
VARDEP_TEST_VAR3 := foo '""' "''" bar
VARDEP_VALUE_FILE := $(call DependOnVariable, VARDEP_TEST_VAR3)
VARDEP_FILE_CONTENTS := $(shell $(CAT) $(VARDEP_VALUE_FILE))
-ifneq ($(VARDEP_TEST_VAR3), $(VARDEP_FILE_CONTENTS))
- $(error Expected: >$(VARDEP_TEST_VAR3)< - DependOnVariable file contained: \
- >$(VARDEP_FILE_CONTENTS)<)
-endif
+$(eval $(call assert-equals, $(VARDEP_FILE_CONTENTS), \
+ VARDEP_TEST_VAR3_old:=$(VARDEP_TEST_VAR3), \
+ Wrong contents in vardep file))
TEST_TARGETS += test-vardep