diff --git a/.hgtags b/.hgtags
index 45683c43953..ee8e1c5db34 100644
--- a/.hgtags
+++ b/.hgtags
@@ -166,3 +166,8 @@ c029c972396cea042a0dc67c0f7ccf2fe68007d4 jdk8-b41
5c5a64ec0839df5affe9394b99ff338c363acbca jdk8-b42
69d8a827cdf9236be9694a46d75c710d71dac7d7 jdk8-b43
7e981cb0ad6a194f1fa859f9ad47586db461f269 jdk8-b44
+9b19b2302c28f4da6d4078f66234abecfed5688a jdk8-b45
+600c9a1feb01633cbcf2341a43d1d21e6497ecd0 jdk8-b46
+b820143a6f1ce993c6e6f31db4d64de990f42654 jdk8-b47
+086271e35b0a419b38e8bda9bebd70693811df0a jdk8-b48
+cecd7026f30cbd83b0601925a7a5e059aec98138 jdk8-b49
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 44ad17af265..c47986f8eda 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -166,3 +166,8 @@ a2b2d435f1d275fa8010774c653197c64e326d3a jdk8-b40
1ce5dc16416611c58b7480ca67a2eee5153498a6 jdk8-b42
661c9aae602bbd9766d12590800c90f1edd1d8dd jdk8-b43
e4f81a817447c3a4f6868f083c81c2fb1b15d44c jdk8-b44
+633f2378c904c92bb922a6e19e9f62fe8eac14af jdk8-b45
+27fa766a2298ba8347dc198f0cf85ba6618e17db jdk8-b46
+1dcb4b7b9373e64e135c12fe1f8699f1f80e51e8 jdk8-b47
+3f6c72d1c2a6e5c9e7d81c3dc984886678a128ad jdk8-b48
+c97b99424815c43818e3cc3ffcdd1a60f3198b52 jdk8-b49
diff --git a/THIRD_PARTY_README b/THIRD_PARTY_README
index ee5463a922e..759733bfceb 100644
--- a/THIRD_PARTY_README
+++ b/THIRD_PARTY_README
@@ -3383,3 +3383,397 @@ included with JRE 7, JDK 7, and OpenJDK 7, except where noted:
-------------------------------------------------------------------------------
+%% This notice is provided with respect to Mozilla Network Security
+Services (NSS), which is supplied with the JDK test suite in the OpenJDK
+source code repository. It is licensed under Mozilla Public License (MPL),
+version 2.0.
+
+The NSS libraries are supplied in executable form, built from unmodified
+NSS source code labeled with the "NSS_3.13.1_RTM" release tag.
+
+The NSS source code is available in the OpenJDK source code repository at:
+ jdk/test/sun/security/pkcs11/nss/src
+
+The NSS libraries are available in the OpenJDK source code repository at:
+ jdk/test/sun/security/pkcs11/nss/lib
+
+--- begin of LICENSE ---
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
diff --git a/common/autoconf/autogen.sh b/common/autoconf/autogen.sh
index 5f6937c52f7..ce56d2719d6 100644
--- a/common/autoconf/autogen.sh
+++ b/common/autoconf/autogen.sh
@@ -22,5 +22,19 @@
# questions.
#
-autoconf -W all configure.ac > configure
-rm -rf config.status config.log autom4te.cache
+script_dir=`dirname $0`
+closed_script_dir="$script_dir/../../jdk/make/closed/autoconf"
+
+# Create a timestamp as seconds since epoch
+TIMESTAMP=`date +%s`
+
+cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
+rm -rf autom4te.cache
+
+if test -e $closed_script_dir/closed-hook.m4; then
+ # We have closed sources available; also generate configure script
+ # with closed hooks compiled in.
+ cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
+ sed -e "s|AC_DEFUN_ONCE(\[CLOSED_HOOK\])|m4_include([$closed_script_dir/closed-hook.m4])|" | autoconf -W all -I$script_dir - > $closed_script_dir/generated-configure.sh
+ rm -rf autom4te.cache
+fi
diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4
new file mode 100644
index 00000000000..370854d45fc
--- /dev/null
+++ b/common/autoconf/basics.m4
@@ -0,0 +1,485 @@
+#
+# 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([ADD_JVM_ARG_IF_OK],
+[
+ # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
+ # If so, then append $1 to $2
+ FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ $2="[$]$2 $1"
+ fi
+])
+
+AC_DEFUN([WHICHCMD],
+[
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="[$]$1"
+ car="${tmp%% *}"
+ tmp="[$]$1 EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ WHICHCMD_SPACESAFE(car)
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ $1="$car ${cdr% *}"
+ else
+ $1="$car"
+ fi
+])
+
+AC_DEFUN([SPACESAFE],
+[
+ # Fail with message $2 if var $1 contains a path with no spaces in it.
+ # Unless on Windows, where we can rewrite the path.
+ HAS_SPACE=`echo "[$]$1" | grep " "`
+ if test "x$HAS_SPACE" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ $1=`$CYGPATH -s -m -a "[$]$1"`
+ $1=`$CYGPATH -u "[$]$1"`
+ else
+ AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
+ fi
+ fi
+])
+
+AC_DEFUN([WHICHCMD_SPACESAFE],
+[
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="[$]$1"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "[$]$1"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ $1="$tmp"
+])
+
+AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
+[
+ if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ # Follow a chain of symbolic links. Use readlink
+ # where it exists, else fall back to horribly
+ # complicated shell code.
+ AC_PATH_PROG(READLINK, readlink)
+ if test "x$READLINK_TESTED" != yes; then
+ # On MacOSX there is a readlink tool with a different
+ # purpose than the GNU readlink tool. Check the found readlink.
+ ISGNU=`$READLINK --help 2>&1 | grep GNU`
+ if test "x$ISGNU" = x; then
+ # A readlink that we do not know how to use.
+ # Are there other non-GNU readlinks out there?
+ READLINK_TESTED=yes
+ READLINK=
+ fi
+ fi
+
+ if test "x$READLINK" != x; then
+ $1=`$READLINK -f [$]$1`
+ else
+ STARTDIR=$PWD
+ COUNTER=0
+ DIR=`dirname [$]$1`
+ FIL=`basename [$]$1`
+ while test $COUNTER -lt 20; do
+ ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
+ if test "x$ISLINK" == x; then
+ # This is not a symbolic link! We are done!
+ break
+ fi
+ # The link might be relative! We have to use cd to travel safely.
+ cd $DIR
+ cd `dirname $ISLINK`
+ DIR=`pwd`
+ FIL=`basename $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ $1=$DIR/$FIL
+ fi
+ fi
+])
+
+AC_DEFUN_ONCE([BASIC_INIT],
+[
+# Save the original command line. This is passed to us by the wrapper configure script.
+AC_SUBST(CONFIGURE_COMMAND_LINE)
+DATE_WHEN_CONFIGURED=`LANG=C date`
+AC_SUBST(DATE_WHEN_CONFIGURED)
+
+# Locate the directory of this script.
+SCRIPT="[$]0"
+REMOVE_SYMBOLIC_LINKS(SCRIPT)
+AUTOCONF_DIR=`dirname [$]0`
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
+[
+# Where is the source? It is located two levels above the configure script.
+CURDIR="$PWD"
+cd "$AUTOCONF_DIR/../.."
+SRC_ROOT="`pwd`"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ SRC_ROOT_LENGTH=`pwd|wc -m`
+ if test $SRC_ROOT_LENGTH -gt 100; then
+ AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
+ fi
+fi
+AC_SUBST(SRC_ROOT)
+cd "$CURDIR"
+
+SPACESAFE(SRC_ROOT,[the path to the source root])
+SPACESAFE(CURDIR,[the path to the current directory])
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_SEARCHPATH],
+[
+if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
+ # Add extra search paths on solaris for utilities like ar and as etc...
+ PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
+fi
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_PATH_SEP],
+[
+# For cygwin we need cygpath first, since it is used everywhere.
+AC_PATH_PROG(CYGPATH, cygpath)
+PATH_SEP=":"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$CYGPATH" = x; then
+ AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
+ fi
+ PATH_SEP=";"
+fi
+AC_SUBST(PATH_SEP)
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
+[
+
+AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
+ [use this as the name of the configuration, overriding the generated default])],
+ [ CONF_NAME=${with_conf_name} ])
+
+# Test from where we are running configure, in or outside of src root.
+if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
+ # We are running configure from the src root.
+ # Create a default ./build/target-variant-debuglevel output root.
+ if test "x${CONF_NAME}" = x; then
+ CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
+ fi
+ OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
+ mkdir -p "$OUTPUT_ROOT"
+ if test ! -d "$OUTPUT_ROOT"; then
+ AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
+ fi
+else
+ # We are running configure from outside of the src dir.
+ # Then use the current directory as output dir!
+ # If configuration is situated in normal build directory, just use the build
+ # directory name as configuration name, otherwise use the complete path.
+ if test "x${CONF_NAME}" = x; then
+ CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
+ fi
+ OUTPUT_ROOT="$CURDIR"
+fi
+
+SPACESAFE(OUTPUT_ROOT,[the path to the output root])
+
+AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
+AC_SUBST(CONF_NAME, $CONF_NAME)
+AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
+
+# Most of the probed defines are put into config.h
+AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
+# The spec.gmk file contains all variables for the make system.
+AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
+# The spec.sh file contains variables for compare{images|-objects}.sh scrips.
+AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
+# The generated Makefile knows where the spec.gmk is and where the source is.
+# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
+# which will look for generated configurations
+AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
+
+# Save the arguments given to us
+echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
+[
+# Setup default logging of stdout and stderr to build.log in the output root.
+BUILD_LOG='$(OUTPUT_ROOT)/build.log'
+BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
+BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
+AC_SUBST(BUILD_LOG)
+AC_SUBST(BUILD_LOG_PREVIOUS)
+AC_SUBST(BUILD_LOG_WRAPPER)
+])
+
+
+#%%% Simple tools %%%
+
+AC_DEFUN([BASIC_CHECK_FIND_DELETE],
+[
+ # Test if find supports -delete
+ AC_MSG_CHECKING([if find supports -delete])
+ FIND_DELETE="-delete"
+
+ DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
+
+ echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
+
+ TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
+ if test -f $DELETEDIR/TestIfFindSupportsDelete; then
+ # No, it does not.
+ rm $DELETEDIR/TestIfFindSupportsDelete
+ FIND_DELETE="-exec rm \{\} \+"
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ rmdir $DELETEDIR
+])
+
+AC_DEFUN([CHECK_NONEMPTY],
+[
+ # Test that variable $1 is not empty.
+ if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi
+])
+
+AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
+[
+# 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.
+AC_PROG_AWK
+CHECK_NONEMPTY(AWK)
+AC_PATH_PROG(CAT, cat)
+CHECK_NONEMPTY(CAT)
+AC_PATH_PROG(CHMOD, chmod)
+CHECK_NONEMPTY(CHMOD)
+AC_PATH_PROG(CP, cp)
+CHECK_NONEMPTY(CP)
+AC_PATH_PROG(CPIO, cpio)
+CHECK_NONEMPTY(CPIO)
+AC_PATH_PROG(CUT, cut)
+CHECK_NONEMPTY(CUT)
+AC_PATH_PROG(DATE, date)
+CHECK_NONEMPTY(DATE)
+AC_PATH_PROG(DF, df)
+CHECK_NONEMPTY(DF)
+AC_PATH_PROG(DIFF, diff)
+CHECK_NONEMPTY(DIFF)
+# Warning echo is really, really unportable!!!!! Different
+# behaviour in bash and dash and in a lot of other shells!
+# Use printf for serious work!
+AC_PATH_PROG(ECHO, echo)
+CHECK_NONEMPTY(ECHO)
+AC_PROG_EGREP
+CHECK_NONEMPTY(EGREP)
+AC_PROG_FGREP
+CHECK_NONEMPTY(FGREP)
+
+AC_PATH_PROG(FIND, find)
+CHECK_NONEMPTY(FIND)
+BASIC_CHECK_FIND_DELETE
+AC_SUBST(FIND_DELETE)
+
+AC_PROG_GREP
+CHECK_NONEMPTY(GREP)
+AC_PATH_PROG(HEAD, head)
+CHECK_NONEMPTY(HEAD)
+AC_PATH_PROG(LN, ln)
+CHECK_NONEMPTY(LN)
+AC_PATH_PROG(LS, ls)
+CHECK_NONEMPTY(LS)
+AC_PATH_PROGS(MAKE, [gmake make])
+CHECK_NONEMPTY(MAKE)
+MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'`
+if test "x$MAKE_VERSION" = x; then
+ AC_MSG_ERROR([You must use GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
+fi
+AC_PATH_PROG(MKDIR, mkdir)
+CHECK_NONEMPTY(MKDIR)
+AC_PATH_PROG(MV, mv)
+CHECK_NONEMPTY(MV)
+AC_PATH_PROGS(NAWK, [nawk gawk awk])
+CHECK_NONEMPTY(NAWK)
+AC_PATH_PROG(PRINTF, printf)
+CHECK_NONEMPTY(PRINTF)
+AC_PATH_PROG(THEPWDCMD, pwd)
+AC_PATH_PROG(RM, rm)
+CHECK_NONEMPTY(RM)
+RM="$RM -f"
+AC_PROG_SED
+CHECK_NONEMPTY(SED)
+AC_PATH_PROG(SH, sh)
+CHECK_NONEMPTY(SH)
+AC_PATH_PROG(SORT, sort)
+CHECK_NONEMPTY(SORT)
+AC_PATH_PROG(TAR, tar)
+CHECK_NONEMPTY(TAR)
+AC_PATH_PROG(TAIL, tail)
+CHECK_NONEMPTY(TAIL)
+AC_PATH_PROG(TEE, tee)
+CHECK_NONEMPTY(TEE)
+AC_PATH_PROG(TR, tr)
+CHECK_NONEMPTY(TR)
+AC_PATH_PROG(TOUCH, touch)
+CHECK_NONEMPTY(TOUCH)
+AC_PATH_PROG(WC, wc)
+CHECK_NONEMPTY(WC)
+AC_PATH_PROG(XARGS, xargs)
+CHECK_NONEMPTY(XARGS)
+AC_PATH_PROG(ZIP, zip)
+CHECK_NONEMPTY(ZIP)
+AC_PATH_PROG(UNZIP, unzip)
+CHECK_NONEMPTY(UNZIP)
+AC_PATH_PROG(LDD, ldd)
+if test "x$LDD" = "x"; then
+ # List shared lib dependencies is used for
+ # debug output and checking for forbidden dependencies.
+ # We can build without it.
+ LDD="true"
+fi
+AC_PATH_PROG(OTOOL, otool)
+if test "x$OTOOL" = "x"; then
+ OTOOL="true"
+fi
+AC_PATH_PROG(READELF, readelf)
+AC_PATH_PROG(EXPR, expr)
+CHECK_NONEMPTY(EXPR)
+AC_PATH_PROG(FILE, file)
+CHECK_NONEMPTY(FILE)
+AC_PATH_PROG(HG, hg)
+])
+
+
+
+AC_DEFUN_ONCE([BASIC_COMPILE_UNCYGDRIVE],
+[
+# When using cygwin, we need a wrapper binary that renames
+# /cygdrive/c/ arguments into c:/ arguments and peeks into
+# @files and rewrites these too! This wrapper binary is
+# called uncygdrive.exe.
+UNCYGDRIVE=
+if test "x$OPENJDK_BUILD_OS" = xwindows; then
+ AC_MSG_CHECKING([if uncygdrive can be created])
+ UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
+ rm -f $OUTPUT_ROOT/uncygdrive*
+ UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
+ cd $OUTPUT_ROOT
+ $CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
+ cd $CURDIR
+
+ if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
+ AC_MSG_RESULT([no])
+ cat $OUTPUT_ROOT/uncygdrive1.log
+ AC_MSG_ERROR([Could not create $OUTPUT_ROOT/uncygdrive.exe])
+ fi
+ AC_MSG_RESULT([$UNCYGDRIVE])
+ AC_MSG_CHECKING([if uncygdrive.exe works])
+ cd $OUTPUT_ROOT
+ $UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
+ cd $CURDIR
+ if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
+ AC_MSG_RESULT([no])
+ cat $OUTPUT_ROOT/uncygdrive2.log
+ AC_MSG_ERROR([Uncygdrive did not work!])
+ fi
+ AC_MSG_RESULT([yes])
+ rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
+fi
+
+AC_SUBST(UNCYGDRIVE)
+])
+
+
+# Check if build directory is on local disk.
+# Argument 1: directory to test
+# Argument 2: what to do if it is on local disk
+# Argument 3: what to do otherwise (remote disk or failure)
+AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
+[
+ # df -l lists only local disks; if the given directory is not found then
+ # a non-zero exit code is given
+ if $DF -l $1 > /dev/null 2>&1; then
+ $2
+ else
+ $3
+ fi
+])
+
+AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
+[
+
+AC_MSG_CHECKING([if build directory is on local disk])
+BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
+ [OUTPUT_DIR_IS_LOCAL="yes"],
+ [OUTPUT_DIR_IS_LOCAL="no"])
+AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
+
+# Check if the user has any old-style ALT_ variables set.
+FOUND_ALT_VARIABLES=`env | grep ^ALT_`
+
+# Before generating output files, test if they exist. If they do, this is a reconfigure.
+# Since we can't properly handle the dependencies for this, warn the user about the situation
+if test -e $OUTPUT_ROOT/spec.gmk; then
+ IS_RECONFIGURE=yes
+else
+ IS_RECONFIGURE=no
+fi
+
+if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
+ HIDE_PERFORMANCE_HINTS=yes
+else
+ HIDE_PERFORMANCE_HINTS=no
+ # Hide it the next time around...
+ $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
+fi
+
+])
diff --git a/common/autoconf/boot-jdk.m4 b/common/autoconf/boot-jdk.m4
new file mode 100644
index 00000000000..f8204f9c2d2
--- /dev/null
+++ b/common/autoconf/boot-jdk.m4
@@ -0,0 +1,295 @@
+#
+# 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.
+#
+
+# Fixes paths on windows to be mixed mode short.
+AC_DEFUN([BOOTJDK_WIN_FIX_PATH],
+[
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ AC_PATH_PROG(CYGPATH, cygpath)
+ tmp="[$]$1"
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ $1="$tmp"
+ fi
+])
+
+AC_DEFUN([BOOTJDK_MISSING_ERROR],
+[
+ AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
+ AC_MSG_ERROR([Cannot continue])
+])
+
+###############################################################################
+#
+# We need a Boot JDK to bootstrap the build.
+#
+
+AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
+[
+BOOT_JDK_FOUND=no
+AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
+ [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
+
+if test "x$with_boot_jdk" != x; then
+ BOOT_JDK=$with_boot_jdk
+ BOOT_JDK_FOUND=yes
+fi
+if test "x$BOOT_JDK_FOUND" = xno; then
+ BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no])
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+ if test "x$JAVA_HOME" != x; then
+ if test ! -d "$JAVA_HOME"; then
+ AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
+ BOOTJDK_MISSING_ERROR
+ fi
+ # Aha, the user has set a JAVA_HOME
+ # let us use that as the Boot JDK.
+ BOOT_JDK="$JAVA_HOME"
+ BOOT_JDK_FOUND=yes
+ # To be on the safe side, lets check that it is a JDK.
+ if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
+ JAVAC="$BOOT_JDK/bin/javac"
+ JAVA="$BOOT_JDK/bin/java"
+ BOOT_JDK_FOUND=yes
+ else
+ AC_MSG_NOTICE([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME])
+ BOOTJDK_MISSING_ERROR
+ fi
+ fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+ AC_PATH_PROG(JAVAC_CHECK, javac)
+ AC_PATH_PROG(JAVA_CHECK, java)
+ BINARY="$JAVAC_CHECK"
+ if test "x$JAVAC_CHECK" = x; then
+ BINARY="$JAVA_CHECK"
+ fi
+ if test "x$BINARY" != x; then
+ # So there is a java(c) binary, it might be part of a JDK.
+ # Lets find the JDK/JRE directory by following symbolic links.
+ # Linux/GNU systems often have links from /usr/bin/java to
+ # /etc/alternatives/java to the real JDK binary.
+ WHICHCMD_SPACESAFE(BINARY,[path to javac])
+ REMOVE_SYMBOLIC_LINKS(BINARY)
+ BOOT_JDK=`dirname $BINARY`
+ BOOT_JDK=`cd $BOOT_JDK/..; pwd`
+ if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
+ JAVAC=$BOOT_JDK/bin/javac
+ JAVA=$BOOT_JDK/bin/java
+ BOOT_JDK_FOUND=yes
+ fi
+ fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+ # Try the MacOSX way.
+ if test -x /usr/libexec/java_home; then
+ BOOT_JDK=`/usr/libexec/java_home`
+ if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
+ JAVAC=$BOOT_JDK/bin/javac
+ JAVA=$BOOT_JDK/bin/java
+ BOOT_JDK_FOUND=yes
+ fi
+ fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+ AC_PATH_PROG(JAVA_CHECK, java)
+ if test "x$JAVA_CHECK" != x; then
+ # There is a java in the path. But apparently we have not found a javac
+ # in the path, since that would have been tested earlier.
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # Now if this is a windows platform. The default installation of a JDK
+ # actually puts the JRE in the path and keeps the JDK out of the path!
+ # Go look in the default installation location.
+ BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=yes
+ fi
+ fi
+ if test "x$BOOT_JDK_FOUND" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([openjdk])
+ AC_MSG_NOTICE([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG])
+ BOOTJDK_MISSING_ERROR
+ fi
+ else
+ HELP_MSG_MISSING_DEPENDENCY([openjdk])
+ AC_MSG_NOTICE([Could not find a JDK. $HELP_MSG])
+ BOOTJDK_MISSING_ERROR
+ fi
+fi
+
+BOOTJDK_WIN_FIX_PATH(BOOT_JDK)
+
+# Now see if we can find the rt.jar, or its nearest equivalent.
+BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
+SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)])
+
+BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
+SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)])
+
+if test ! -f $BOOT_RTJAR; then
+ # On MacOSX it is called classes.jar
+ BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
+ if test ! -f $BOOT_RTJAR; then
+ AC_MSG_NOTICE([Cannot find the rt.jar or its equivalent!])
+ AC_MSG_NOTICE([This typically means that configure failed to automatically find a suitable Boot JDK])
+ BOOTJDK_MISSING_ERROR
+ fi
+ # Remove the ..
+ BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
+ # The tools.jar is part of classes.jar
+ BOOT_TOOLSJAR="$BOOT_RTJAR"
+fi
+
+AC_SUBST(BOOT_JDK)
+AC_SUBST(BOOT_RTJAR)
+AC_SUBST(BOOT_TOOLSJAR)
+AC_MSG_CHECKING([for Boot JDK])
+AC_MSG_RESULT([$BOOT_JDK])
+AC_MSG_CHECKING([for Boot rt.jar])
+AC_MSG_RESULT([$BOOT_RTJAR])
+AC_MSG_CHECKING([for Boot tools.jar])
+AC_MSG_RESULT([$BOOT_TOOLSJAR])
+
+# Use the java tool from the Boot JDK.
+AC_MSG_CHECKING([for java in Boot JDK])
+JAVA=$BOOT_JDK/bin/java
+if test ! -x $JAVA; then
+ AC_MSG_NOTICE([Could not find a working java])
+ BOOTJDK_MISSING_ERROR
+fi
+BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
+AC_MSG_RESULT([yes $BOOT_JDK_VERSION])
+AC_SUBST(JAVA)
+
+# Extra M4 quote needed to protect [] in grep expression.
+[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
+if test "x$FOUND_VERSION_78" = x; then
+ HELP_MSG_MISSING_DEPENDENCY([openjdk])
+ AC_MSG_NOTICE([Your boot-jdk must be version 7 or 8. $HELP_MSG])
+ BOOTJDK_MISSING_ERROR
+fi
+
+# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
+BOOT_JDK_SOURCETARGET="-source 7 -target 7"
+AC_SUBST(BOOT_JDK_SOURCETARGET)
+
+# Use the javac tool from the Boot JDK.
+AC_MSG_CHECKING([for javac in Boot JDK])
+JAVAC=$BOOT_JDK/bin/javac
+if test ! -x $JAVAC; then
+ AC_MSG_ERROR([Could not find a working javac])
+fi
+AC_MSG_RESULT(yes)
+AC_SUBST(JAVAC)
+AC_SUBST(JAVAC_FLAGS)
+
+# Use the javah tool from the Boot JDK.
+AC_MSG_CHECKING([for javah in Boot JDK])
+JAVAH=$BOOT_JDK/bin/javah
+if test ! -x $JAVAH; then
+ AC_MSG_NOTICE([Could not find a working javah])
+ BOOTJDK_MISSING_ERROR
+fi
+AC_MSG_RESULT(yes)
+AC_SUBST(JAVAH)
+
+# Use the jar tool from the Boot JDK.
+AC_MSG_CHECKING([for jar in Boot JDK])
+JAR=$BOOT_JDK/bin/jar
+if test ! -x $JAR; then
+ AC_MSG_NOTICE([Could not find a working jar])
+ BOOTJDK_MISSING_ERROR
+fi
+AC_SUBST(JAR)
+AC_MSG_RESULT(yes)
+
+# Use the rmic tool from the Boot JDK.
+AC_MSG_CHECKING([for rmic in Boot JDK])
+RMIC=$BOOT_JDK/bin/rmic
+if test ! -x $RMIC; then
+ AC_MSG_NOTICE([Could not find a working rmic])
+ BOOTJDK_MISSING_ERROR
+fi
+AC_SUBST(RMIC)
+AC_MSG_RESULT(yes)
+
+# Use the native2ascii tool from the Boot JDK.
+AC_MSG_CHECKING([for native2ascii in Boot JDK])
+NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
+if test ! -x $NATIVE2ASCII; then
+ AC_MSG_NOTICE([Could not find a working native2ascii])
+ BOOTJDK_MISSING_ERROR
+fi
+AC_MSG_RESULT(yes)
+AC_SUBST(NATIVE2ASCII)
+])
+
+AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
+[
+##############################################################################
+#
+# Specify options for anything that is run with the Boot JDK.
+#
+AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
+ [specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
+ e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
+
+if test "x$with_boot_jdk_jvmargs" = x; then
+ # Not all JVM:s accept the same arguments on the command line.
+ # OpenJDK specific increase in thread stack for JDK build,
+ # well more specifically, when running javac.
+ if test "x$BUILD_NUM_BITS" = x32; then
+ STACK_SIZE=768
+ else
+ # Running Javac on a JVM on a 64-bit machine, the stack takes more space
+ # since 64-bit pointers are pushed on the stach. Apparently, we need
+ # to increase the stack space when javacing the JDK....
+ STACK_SIZE=1536
+ fi
+
+ # Minimum amount of heap memory.
+ ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
+ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+ # Why does macosx need more heap? Its the huge JDK batch.
+ ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
+ else
+ ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
+ fi
+ # When is adding -client something that speeds up the JVM?
+ # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
+ ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA])
+ ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA])
+ ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
+ # Disable special log output when a debug build is used as Boot JDK...
+ ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
+fi
+
+AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
+])
diff --git a/common/autoconf/build-aux/autoconf-config.guess b/common/autoconf/build-aux/autoconf-config.guess
new file mode 100644
index 00000000000..e69905d5201
--- /dev/null
+++ b/common/autoconf/build-aux/autoconf-config.guess
@@ -0,0 +1,1531 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+
+timestamp='2008-01-23'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner .
+# Please send patches to . Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include
+ #include
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes .
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ echo "int main(){}" > $dummy.c
+ if test "`$CC_FOR_BUILD -o $dummy $dummy.c; file $dummy | grep -c x86_64`" = 1 ; then
+ UNAME_PROCESSOR=x86_64
+ fi
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <
+# include
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 < in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/common/autoconf/build-aux/config.guess b/common/autoconf/build-aux/config.guess
index e69905d5201..389eedfc1d1 100644
--- a/common/autoconf/build-aux/config.guess
+++ b/common/autoconf/build-aux/config.guess
@@ -1,1531 +1,38 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
-
-timestamp='2008-01-23'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+#!/bin/sh
#
-# This program 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 for more details.
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# 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.
#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner .
-# Please send patches to . Submit a context
-# diff and a properly formatted ChangeLog entry.
+# 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).
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# 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.
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-me=`echo "$0" | sed -e 's,.*/,,'`
+# This is a wrapper for the config.guess from autoconf. The latter does not properly
+# detect amd64 systems, since that require isainfo instead of uname. Instead of patching
+# the autoconf system (which might easily get lost in a future update), we wrap it and
+# fix the broken property, if needed.
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to ."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
+DIR=`dirname $0`
+OUT=`. $DIR/autoconf-config.guess`
+echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
+if test $? = 0; then
+ # isainfo -n returns either i386 or amd64 on Intel systems
+ REAL_CPU=`isainfo -n`
+ OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[456])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include
- #include
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes .
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
- echo "int main(){}" > $dummy.c
- if test "`$CC_FOR_BUILD -o $dummy $dummy.c; file $dummy | grep -c x86_64`" = 1 ; then
- UNAME_PROCESSOR=x86_64
- fi
- case $UNAME_PROCESSOR in
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <
-# include
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 < in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
+echo $OUT
diff --git a/common/autoconf/build-performance.m4 b/common/autoconf/build-performance.m4
new file mode 100644
index 00000000000..964f890b792
--- /dev/null
+++ b/common/autoconf/build-performance.m4
@@ -0,0 +1,378 @@
+#
+# 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([BPERF_CHECK_CORES],
+[
+ AC_MSG_CHECKING([for number of cores])
+ NUM_CORES=1
+ FOUND_CORES=no
+
+ if test -f /proc/cpuinfo; then
+ # Looks like a Linux system
+ NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
+ FOUND_CORES=yes
+ fi
+
+ if test -x /usr/sbin/psrinfo; then
+ # Looks like a Solaris system
+ NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
+ FOUND_CORES=yes
+ fi
+
+ if test -x /usr/sbin/system_profiler; then
+ # Looks like a MacOSX system
+ NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
+ FOUND_CORES=yes
+ fi
+
+ if test "x$build_os" = xwindows; then
+ NUM_CORES=4
+ fi
+
+ # For c/c++ code we run twice as many concurrent build
+ # jobs than we have cores, otherwise we will stall on io.
+ CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
+
+ if test "x$FOUND_CORES" = xyes; then
+ AC_MSG_RESULT([$NUM_CORES])
+ else
+ AC_MSG_RESULT([could not detect number of cores, defaulting to 1!])
+ fi
+
+])
+
+AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
+[
+ AC_MSG_CHECKING([for memory size])
+ # Default to 1024MB
+ MEMORY_SIZE=1024
+ FOUND_MEM=no
+
+ if test -f /proc/cpuinfo; then
+ # Looks like a Linux system
+ MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
+ MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
+ FOUND_MEM=yes
+ fi
+
+ if test -x /usr/sbin/prtconf; then
+ # Looks like a Solaris system
+ MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
+ FOUND_MEM=yes
+ fi
+
+ if test -x /usr/sbin/system_profiler; then
+ # Looks like a MacOSX system
+ MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
+ MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
+ FOUND_MEM=yes
+ fi
+
+ if test "x$build_os" = xwindows; then
+ MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
+ FOUND_MEM=yes
+ fi
+
+ if test "x$FOUND_MEM" = xyes; then
+ AC_MSG_RESULT([$MEMORY_SIZE MB])
+ else
+ AC_MSG_RESULT([could not detect memory size defaulting to 1024MB!])
+ fi
+])
+
+AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES],
+[
+# How many cores do we have on this build system?
+AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
+ [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
+if test "x$with_num_cores" = x; then
+ # The number of cores were not specified, try to probe them.
+ BPERF_CHECK_CORES
+else
+ NUM_CORES=$with_num_cores
+ CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
+fi
+AC_SUBST(NUM_CORES)
+AC_SUBST(CONCURRENT_BUILD_JOBS)
+])
+
+AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
+[
+# How much memory do we have on this build system?
+AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
+ [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
+if test "x$with_memory_size" = x; then
+ # The memory size was not specified, try to probe it.
+ BPERF_CHECK_MEMORY_SIZE
+else
+ MEMORY_SIZE=$with_memory_size
+fi
+AC_SUBST(MEMORY_SIZE)
+])
+
+AC_DEFUN([BPERF_SETUP_CCACHE],
+[
+ AC_ARG_ENABLE([ccache],
+ [AS_HELP_STRING([--disable-ccache],
+ [use ccache to speed up recompilations @<:@enabled@:>@])],
+ [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
+ if test "x$ENABLE_CCACHE" = xyes; then
+ AC_PATH_PROG(CCACHE, ccache)
+ else
+ AC_MSG_CHECKING([for ccache])
+ AC_MSG_RESULT([explicitly disabled])
+ CCACHE=
+ fi
+ AC_SUBST(CCACHE)
+
+ AC_ARG_WITH([ccache-dir],
+ [AS_HELP_STRING([--with-ccache-dir],
+ [where to store ccache files @<:@~/.ccache@:>@])])
+
+ if test "x$with_ccache_dir" != x; then
+ # When using a non home ccache directory, assume the use is to share ccache files
+ # with other users. Thus change the umask.
+ SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
+ fi
+ CCACHE_FOUND=""
+ if test "x$CCACHE" != x; then
+ BPERF_SETUP_CCACHE_USAGE
+ fi
+])
+
+AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
+[
+ if test "x$CCACHE" != x; then
+ CCACHE_FOUND="true"
+ # Only use ccache if it is 3.1.4 or later, which supports
+ # precompiled headers.
+ AC_MSG_CHECKING([if ccache supports precompiled headers])
+ HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
+ if test "x$HAS_GOOD_CCACHE" = x; then
+ AC_MSG_RESULT([no, disabling ccache])
+ CCACHE=
+ else
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
+ PUSHED_FLAGS="$CXXFLAGS"
+ CXXFLAGS="-fpch-preprocess $CXXFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
+ CXXFLAGS="$PUSHED_FLAGS"
+ if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
+ CCACHE=
+ fi
+ fi
+ fi
+
+ if test "x$CCACHE" != x; then
+ CCACHE_SLOPPINESS=time_macros
+ CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
+ CCACHE_FLAGS=-fpch-preprocess
+
+ if test "x$SET_CCACHE_DIR" != x; then
+ mkdir -p $CCACHE_DIR > /dev/null 2>&1
+ chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
+ fi
+ fi
+])
+
+AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
+[
+
+###############################################################################
+#
+# Can the C/C++ compiler use precompiled headers?
+#
+AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
+ [use precompiled headers when compiling C++ @<:@enabled@:>@])],
+ [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
+
+USE_PRECOMPILED_HEADER=1
+if test "x$ENABLE_PRECOMPH" = xno; then
+ USE_PRECOMPILED_HEADER=0
+fi
+
+if test "x$ENABLE_PRECOMPH" = xyes; then
+ # Check that the compiler actually supports precomp headers.
+ if test "x$GCC" = xyes; then
+ AC_MSG_CHECKING([that precompiled headers work])
+ echo "int alfa();" > conftest.h
+ $CXX -x c++-header conftest.h -o conftest.hpp.gch
+ if test ! -f conftest.hpp.gch; then
+ echo Precompiled header is not working!
+ USE_PRECOMPILED_HEADER=0
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ rm -f conftest.h
+ fi
+fi
+
+AC_SUBST(USE_PRECOMPILED_HEADER)
+])
+
+
+AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
+[
+AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java],
+ [use this java binary for running the javac background server and other long running java tasks in the build process,
+ e.g. ---with-server-java="/opt/jrockit/bin/java -server"])])
+
+if test "x$with_server_java" != x; then
+ SERVER_JAVA="$with_server_java"
+ FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" = x; then
+ AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA])
+ fi
+else
+ SERVER_JAVA=""
+ # Hotspot specific options.
+ ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA])
+ ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA])
+ # JRockit specific options.
+ ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA])
+ SERVER_JAVA="$JAVA $SERVER_JAVA"
+fi
+AC_SUBST(SERVER_JAVA)
+
+AC_MSG_CHECKING([whether to use shared server for javac])
+AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server],
+ [enable the shared javac server during the build process @<:@disabled@:>@])],
+ [ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no'])
+AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
+if test "x$ENABLE_JAVAC_SERVER" = xyes; then
+ JAVAC_USE_REMOTE=true
+ JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
+else
+ JAVAC_USE_REMOTE=false
+ JAVAC_SERVERS=
+fi
+AC_SUBST(JAVAC_USE_REMOTE)
+AC_SUBST(JAVAC_SERVERS)
+
+AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores],
+ [use at most this number of concurrent threads on the javac server @<:@probed@:>@])])
+if test "x$with_javac_server_cores" != x; then
+ JAVAC_SERVER_CORES="$with_javac_server_cores"
+else
+ if test "$NUM_CORES" -gt 16; then
+ # We set this arbitrary limit because we want to limit the heap
+ # size of the javac server.
+ # In the future we will make the javac compilers in the server
+ # share more and more state, thus enabling us to use more and
+ # more concurrent threads in the server.
+ JAVAC_SERVER_CORES="16"
+ else
+ JAVAC_SERVER_CORES="$NUM_CORES"
+ fi
+
+ if test "$MEMORY_SIZE" -gt "17000"; then
+ MAX_HEAP_MEM=10000
+ ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA])
+ elif test "$MEMORY_SIZE" -gt "10000"; then
+ MAX_HEAP_MEM=6000
+ ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA])
+ elif test "$MEMORY_SIZE" -gt "5000"; then
+ MAX_HEAP_MEM=3000
+ ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
+ elif test "$MEMORY_SIZE" -gt "3800"; then
+ MAX_HEAP_MEM=2500
+ ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
+ elif test "$MEMORY_SIZE" -gt "1900"; then
+ MAX_HEAP_MEM=1200
+ ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
+ elif test "$MEMORY_SIZE" -gt "1000"; then
+ MAX_HEAP_MEM=900
+ ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
+ else
+ MAX_HEAP_MEM=512
+ ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA])
+ ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
+ fi
+
+ MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
+ if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
+ AC_MSG_CHECKING([if number of server cores must be reduced])
+ JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
+ AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
+ fi
+fi
+AC_SUBST(JAVAC_SERVER_CORES)
+
+AC_MSG_CHECKING([whether to track dependencies between Java packages])
+AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps],
+ [enable the dependency tracking between Java packages @<:@disabled@:>@])],
+ [ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no'])
+AC_MSG_RESULT([$ENABLE_JAVAC_DEPS])
+if test "x$ENABLE_JAVAC_DEPS" = xyes; then
+ JAVAC_USE_DEPS=true
+else
+ JAVAC_USE_DEPS=false
+fi
+AC_SUBST(JAVAC_USE_DEPS)
+
+AC_MSG_CHECKING([whether to use multiple cores for javac compilation])
+AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core],
+ [compile Java packages concurrently @<:@disabled@:>@])],
+ [ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no'])
+AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE])
+if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
+ JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
+else
+ JAVAC_USE_MODE=SINGLE_THREADED_BATCH
+ if test "x$ENABLE_JAVAC_DEPS" = xyes; then
+ AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.])
+ AC_MSG_WARN([Disabling dependency tracking for you now.])
+ JAVAC_USE_DEPS=false
+ fi
+ if test "x$ENABLE_JAVAC_SERVER" = xyes; then
+ AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.])
+ AC_MSG_WARN([Disabling javac server for you now.])
+ JAVAC_USE_REMOTE=false
+ fi
+fi
+AC_SUBST(JAVAC_USE_MODE)
+
+AC_MSG_CHECKING([whether to use sjavac])
+AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
+ [use sjavac to do fast incremental compiles @<:@disabled@:>@])],
+ [ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
+AC_MSG_RESULT([$ENABLE_SJAVAC])
+AC_SUBST(ENABLE_SJAVAC)
+
+])
diff --git a/common/autoconf/builddeps.conf.example b/common/autoconf/builddeps.conf.example
index f285ffb4a29..d97033611f7 100644
--- a/common/autoconf/builddeps.conf.example
+++ b/common/autoconf/builddeps.conf.example
@@ -31,11 +31,11 @@
# Translate a configuration triplet/quadruplet into something
# known by this configuration file.
-# If no rewrite was found, then rewritten_host=${host}
+# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_SYSTEM}
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
-# The needed cups builddeps are host independent header files.
+# 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}
@@ -44,10 +44,10 @@ builddep_cups_CFLAGS=-I${depdir}
# for the build platform.
builddep_devkit=sdk/sdk-${rewritten_build}-20110921.tar.gz
-# The freetype dependency is partyl host dependent.
+# 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_host}/sys-root/usr/include/freetype2
+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
diff --git a/common/autoconf/builddeps.m4 b/common/autoconf/builddeps.m4
index 1be92ecf870..31797070da1 100644
--- a/common/autoconf/builddeps.m4
+++ b/common/autoconf/builddeps.m4
@@ -23,7 +23,7 @@
# questions.
#
-AC_DEFUN([BDEPS_SCAN_FOR_BUILDDEPS],
+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
@@ -50,27 +50,27 @@ AC_DEFUN([BDEPS_SCAN_FOR_BUILDDEPS],
AC_MSG_ERROR([Could not find any builddeps.conf at all!])
fi
fi
- # Create build and host names that use _ instead of "-" and ".".
+ # Create build and target names that use _ instead of "-" and ".".
# This is necessary to use them in variable names.
- build_var=`echo ${build} | tr '-' '_' | tr '.' '_'`
- host_var=`echo ${host} | tr '-' '_' | tr '.' '_'`
- # Extract rewrite information for build and host
+ build_var=`echo ${OPENJDK_BUILD_SYSTEM} | tr '-' '_' | tr '.' '_'`
+ target_var=`echo ${OPENJDK_TARGET_SYSTEM} | tr '-' '_' | tr '.' '_'`
+ # Extract rewrite information for build and target
eval rewritten_build=\${REWRITE_${build_var}}
if test "x$rewritten_build" = x; then
- rewritten_build=${build}
+ rewritten_build=${OPENJDK_BUILD_SYSTEM}
echo Build stays the same $rewritten_build
else
echo Rewriting build for builddeps into $rewritten_build
fi
- eval rewritten_host=\${REWRITE_${host_var}}
- if test "x$rewritten_host" = x; then
- rewritten_host=${host}
- echo Host stays the same $rewritten_host
+ eval rewritten_target=\${REWRITE_${target_var}}
+ if test "x$rewritten_target" = x; then
+ rewritten_target=${OPENJDK_TARGET_SYSTEM}
+ echo Target stays the same $rewritten_target
else
- echo Rewriting host for builddeps into $rewritten_host
+ echo Rewriting target for builddeps into $rewritten_target
fi
rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
- rewritten_host_var=`echo ${rewritten_host} | 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
@@ -127,11 +127,11 @@ AC_DEFUN([BDEPS_CHECK_MODULE],
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 host and build machine specific resource!
- eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
+ # 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 host specific resource
- eval resource=\${builddep_$2_HOST_${rewritten_host_var}}
+ # 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
@@ -228,3 +228,33 @@ AC_DEFUN([BDEPS_FETCH],
$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, e.g. --with-builddeps-server=ftp://example.com/dir])])
+
+AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
+ [store downloaded build dependencies here @<:@d/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])])
+
+AC_ARG_ENABLE([list-builddeps], [AS_HELP_STRING([--enable-list-builddeps],
+ [list all build dependencies known to the configure script])],
+ [LIST_BUILDDEPS="${enableval}"], [LIST_BUILDDEPS='no'])
+
+if test "x$LIST_BUILDDEPS" = xyes; then
+ echo
+ echo List of build dependencies known to the configure script,
+ echo that can be used in builddeps.conf files:
+ cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODUL[E]\( | cut -f 2 -d ',' | tr -d ' ' | sort
+ echo
+ exit 1
+fi
+])
diff --git a/common/autoconf/configure b/common/autoconf/configure
index 68f93765ea6..85861c9ce1b 100644
--- a/common/autoconf/configure
+++ b/common/autoconf/configure
@@ -1,16781 +1,121 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for openjdk version-0.1.
-#
-# Report bugs to .
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
+#!/bin/sh
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '\${1+\"\$@\"}'='\"\$@\"'
- setopt NO_GLOB_SUBST
-else
- case \`(set -o) 2>/dev/null\` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-"
- as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
- else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: build-infra-dev@openjdk.java.net about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
- fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-test -n "$DJDIR" || exec 7<&0 &1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='openjdk'
-PACKAGE_TARNAME='openjdk'
-PACKAGE_VERSION='version-0.1'
-PACKAGE_STRING='openjdk version-0.1'
-PACKAGE_BUGREPORT='build-infra-dev@openjdk.java.net'
-PACKAGE_URL=''
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include
-#ifdef HAVE_SYS_TYPES_H
-# include
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include
-#endif
-#ifdef STDC_HEADERS
-# include
-# include
-#else
-# ifdef HAVE_STDLIB_H
-# include
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include
-# endif
-# include
-#endif
-#ifdef HAVE_STRINGS_H
-# include
-#endif
-#ifdef HAVE_INTTYPES_H
-# include
-#endif
-#ifdef HAVE_STDINT_H
-# include
-#endif
-#ifdef HAVE_UNISTD_H
-# include
-#endif"
-
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-CACERTS_FILE
-TEST_IN_BUILD
-SALIB_NAME
-OS_VERSION_MICRO
-OS_VERSION_MINOR
-OS_VERSION_MAJOR
-LIBCXX
-LDFLAGS_JDKEXE_SUFFIX
-LDFLAGS_JDKLIB_SUFFIX
-LDFLAGS_JDKEXE
-LDFLAGS_JDKLIB
-CXXFLAGS_JDKEXE
-CXXFLAGS_JDKLIB
-CFLAGS_JDKEXE
-CFLAGS_JDKLIB
-PACKAGE_PATH
-IMAGES_MAKE_ARGS
-IMAGES_OUTPUTDIR
-JDK_MAKE_ARGS
-JDK_OUTPUTDIR
-HOTSPOT_MAKE_ARGS
-HOTSPOT_DIST
-HOTSPOT_OUTPUTDIR
-JAXWS_MAKE_ARGS
-JAXWS_DIST
-JAXWS_OUTPUTDIR
-JAXP_MAKE_ARGS
-JAXP_DIST
-JAXP_OUTPUTDIR
-CORBA_MAKE_ARGS
-CORBA_DIST
-CORBA_OUTPUTDIR
-LANGTOOLS_MAKE_ARGS
-LANGTOOLS_DIST
-LANGTOOLS_OUTPUTDIR
-CXX_FLAG_DEPS
-C_FLAG_DEPS
-CXX_O_FLAG_NONE
-CXX_O_FLAG_NORM
-CXX_O_FLAG_HI
-CXX_O_FLAG_HIGHEST
-C_O_FLAG_NONE
-C_O_FLAG_NORM
-C_O_FLAG_HI
-C_O_FLAG_HIGHEST
-DISABLE_NIMBUS
-GENERATE_DOCS
-ENABLE_DOCS
-LIBDL
-LIBM
-USE_EXTERNAL_LIBZ
-USE_EXTERNAL_LIBGIF
-USE_EXTERNAL_LIBJPEG
-PULSE_LIBS
-PULSE_CFLAGS
-LIBPULSE_LIBS
-LIBPULSE_CFLAGS
-ALSA_LIBS
-ALSA_CFLAGS
-FREETYPE2_LIB_PATH
-USING_SYSTEM_FT_LIB
-FREETYPE2_LIBS
-FREETYPE2_CFLAGS
-CUPS_LIBS
-CUPS_CFLAGS
-OPENWIN_HOME
-X_EXTRA_LIBS
-X_LIBS
-X_PRE_LIBS
-X_CFLAGS
-XMKMF
-JAVAC_USE_MODE
-JAVAC_USE_DEPS
-JAVAC_SERVER_CORES
-JAVAC_SERVERS
-JAVAC_USE_REMOTE
-SERVER_JAVA
-BOOT_JDK_JVMARGS
-OVERRIDE_SRC_ROOT
-ADD_SRC_ROOT
-NATIVE2ASCII
-RMIC
-JAR
-JAVAH
-JAVAC_FLAGS
-JAVAC
-BOOT_JDK_SOURCETARGET
-JAVA
-BOOT_TOOLSJAR
-BOOT_RTJAR
-BOOT_JDK
-JAVA_CHECK
-JAVAC_CHECK
-ENDIAN
-POST_MCS_CMD
-POST_STRIP_CMD
-SET_SHARED_LIBRARY_ORIGIN
-CXX_FLAG_REORDER
-C_FLAG_REORDER
-SET_SHARED_LIBRARY_MAPFILE
-SET_SHARED_LIBRARY_NAME
-SHARED_LIBRARY_FLAGS
-EXE_SUFFIX
-STATIC_LIBRARY_SUFFIX
-SHARED_LIBRARY_SUFFIX
-LIBRARY_PREFIX
-STATIC_LIBRARY
-SHARED_LIBRARY
-OBJ_SUFFIX
-USE_PRECOMPILED_HEADER
-ARCH_DATA_MODEL
-LP64
-BUILD_LOG_WRAPPER
-BUILD_LOG
-CCACHE
-UNCYGDRIVE
-MCS
-STRIP
-NM
-ASFLAGS
-AS
-CXXCPP
-CPP
-COMPILER_TYPE
-RC_FLAGS
-DUMPBIN
-WINAR
-RC
-MT
-WINLD
-ARFLAGS
-AR
-LDEXECXX
-LDCXX
-LDEXE
-LD
-ac_ct_OBJC
-OBJCFLAGS
-OBJC
-ac_ct_CXX
-CXXFLAGS
-CXX
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-HOSTCXX
-HOSTCC
-HOST_CXX
-HOST_CC
-DEFINE_CROSS_COMPILE_ARCH
-AR_OUT_OPTION
-LD_OUT_OPTION
-EXE_OUT_OPTION
-CC_OUT_OPTION
-SYS_ROOT
-BDEPS_FTP
-BDEPS_UNZIP
-PKG_CONFIG
-JDK_TOPDIR
-HOTSPOT_TOPDIR
-JAXWS_TOPDIR
-JAXP_TOPDIR
-CORBA_TOPDIR
-LANGTOOLS_TOPDIR
-OUTPUT_ROOT
-CONF_NAME
-SPEC
-MSVCR100DLL
-CHECK_FOR_VCINSTALLDIR
-SETUPDEVENV
-COOKED_BUILD_NUMBER
-FULL_VERSION
-RELEASE
-JDK_VERSION
-RUNTIME_NAME
-COPYRIGHT_YEAR
-COMPANY_NAME
-JDK_RC_PLATFORM_NAME
-PRODUCT_SUFFIX
-PRODUCT_NAME
-LAUNCHER_NAME
-MILESTONE
-JDK_BUILD_NUMBER
-JDK_UPDATE_VERSION
-JDK_MICRO_VERSION
-JDK_MINOR_VERSION
-JDK_MAJOR_VERSION
-BUILD_VARIANT_RELEASE
-DEBUG_CLASSFILES
-FASTDEBUG
-VARIANT
-DEBUG_LEVEL
-JVM_VARIANT_ZEROSHARK
-JVM_VARIANT_ZERO
-JVM_VARIANT_KERNEL
-JVM_VARIANT_CLIENT
-JVM_VARIANT_SERVER
-JVM_VARIANTS
-BUILD_HEADLESS_ONLY
-BUILD_HEADLESS
-SUPPORT_HEADFUL
-SUPPORT_HEADLESS
-JDK_VARIANT
-MINIMIZE_RAM_USAGE
-JAVASE_EMBEDDED
-JIGSAW
-SET_OPENJDK
-PATH_SEP
-CYGPATH
-SRC_ROOT
-MEMORY_SIZE
-CONCURRENT_BUILD_JOBS
-NUM_CORES
-DATE_WHEN_CONFIGURED
-REQUIRED_OS_VERSION
-REQUIRED_OS_NAME
-LEGACY_BUILD_CPU3
-LEGACY_BUILD_CPU2
-LEGACY_BUILD_CPU1
-BUILD_CPU_ENDIAN
-BUILD_CPU_BITS
-BUILD_CPU_ARCH
-BUILD_CPU
-LEGACY_BUILD_OS_API
-BUILD_OS_API
-BUILD_OS_FAMILY
-BUILD_OS
-LEGACY_HOST_CPU3
-LEGACY_HOST_CPU2
-LEGACY_HOST_CPU1
-HOST_CPU_ENDIAN
-HOST_CPU_BITS
-HOST_CPU_ARCH
-HOST_CPU
-LEGACY_HOST_OS_API
-HOST_OS_API
-HOST_OS_FAMILY
-HOST_OS
-BUILD
-HOST
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-HG
-FILE
-EXPR
-READELF
-OTOOL
-LDD
-UNZIP
-ZIP
-XARGS
-WC
-TOUCH
-TR
-TEE
-TAIL
-TAR
-SORT
-SH
-SED
-RM
-THEPWDCMD
-PRINTF
-NAWK
-MV
-MKDIR
-MAKE
-LS
-LN
-HEAD
-FIND_DELETE
-FIND
-FGREP
-EGREP
-GREP
-ECHO
-DIFF
-DF
-DATE
-CUT
-CPIO
-CP
-CHMOD
-CAT
-AWK
-READLINK
-CONFIGURE_COMMAND_LINE
-PKGHANDLER
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-with_data_model
-with_num_cores
-with_memory_size
-enable_openjdk_only
-enable_jigsaw
-with_jdk_variant
-enable_headful
-with_jvm_variants
-enable_debug
-with_debug_level
-with_msvcr100dll
-with_builddeps_conf
-with_builddeps_server
-with_builddeps_dir
-with_builddeps_group
-enable_list_builddeps
-with_sys_root
-enable_ccache
-with_ccache_dir
-enable_precompiled_headers
-with_boot_jdk
-with_add_source_root
-with_override_source_root
-with_adds_and_overrides
-with_override_langtools
-with_override_corba
-with_override_jaxp
-with_override_jaxws
-with_override_hotspot
-with_override_jdk
-with_boot_jdk_jvmargs
-with_server_java
-enable_javac_server
-with_javac_server_cores
-enable_javac_deps
-enable_javac_multi_core
-enable_macosx_runtime_support
-with_x
-with_cups
-with_cups_include
-with_cups_lib
-with_freetype
-with_alsa
-with_alsa_include
-with_alsa_lib
-with_pulse
-with_pulse_include
-with_pulse_lib
-enable_docs
-enable_nimbus
-enable_static_link_stdc__
-enable_hotspot_test_in_build
-with_cacerts_file
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-PKG_CONFIG
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC
-OBJC
-OBJCFLAGS
-CPP
-CXXCPP
-XMKMF
-FREETYPE2_CFLAGS
-FREETYPE2_LIBS
-ALSA_CFLAGS
-ALSA_LIBS
-LIBPULSE_CFLAGS
-LIBPULSE_LIBS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *=) ac_optarg= ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: $ac_useropt"
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
- esac
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures openjdk version-0.1 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-X features:
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of openjdk version-0.1:";;
- esac
- cat <<\_ACEOF
-
-Optional Features:
- --disable-option-checking ignore unrecognized --enable/--with options
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-openjdk-only build OpenJDK regardless of the presence of closed
- repositories [disabled]
- --enable-jigsaw build Jigsaw images (not yet available) [disabled]
- --disable-headful build headful support (graphical UI support)
- [enabled]
- --enable-debug set the debug level to fastdebug (shorthand for
- --with-debug-level=fastdebug) [disabled]
- --enable-list-builddeps list all build dependencies known to the configure
- script
- --disable-ccache use ccache to speed up recompilations [enabled]
- --disable-precompiled-headers
- use precompiled headers when compiling C++ [enabled]
- --enable-javac-server enable the shared javac server during the build
- process [disabled]
- --enable-javac-deps enable the dependency tracking between Java packages
- [disabled]
- --enable-javac-multi-core
- compile Java packages concurrently [disabled]
- --disable-macosx-runtime-support
- disable the use of MacOSX Java runtime support
- framework [enabled]
- --enable-docs enable generation of Javadoc documentation
- [disabled]
- --disable-nimbus disable Nimbus L&F [enabled]
- --disable-static-link-stdc++
- disable static linking of the C++ runtime on Linux
- [enabled]
- --enable-hotspot-test-in-build
- enable running of Queens test after Hotspot build
- (not yet available) [disabled]
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-data-model build 32-bit or 64-bit binaries (for platforms that
- support it), e.g. --with-data-model=32 [guessed]
- --with-num-cores number of cores in the build system, e.g.
- --with-num-cores=8 [probed]
- --with-memory-size memory (in MB) available in the build system, e.g.
- --with-memory-size=1024 [probed]
- --with-jdk-variant JDK variant to build (normal, embedded) [normal]
- --with-jvm-variants JVM variants (separated by commas) to build (server,
- client, kernel, zero, zeroshark) [server]
- --with-debug-level set the debug level (release, fastdebug, slowdebug)
- [release]
- --with-msvcr100dll copy this msvcr100.dll into the built JDK
- --with-builddeps-conf use this configuration file for the builddeps
- --with-builddeps-server download and use build dependencies from this server
- url, e.g.
- --with-builddeps-server=ftp://example.com/dir
- --with-builddeps-dir store downloaded build dependencies here
- [d/localhome/builddeps]
- --with-builddeps-group chgrp the downloaded build dependencies to this
- group
- --with-sys-root pass this sys-root to the compilers and linker
- (useful if the sys-root encoded in the cross
- compiler tools is incorrect)
- --with-ccache-dir where to store ccache files [~/.ccache]
- --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
- --with-add-source-root for each and every source directory, look in this
- additional source root for the same directory; if it
- exists and have files in it, include it in the build
- --with-override-source-root
- for each and every source directory, look in this
- override source root for the same directory; if it
- exists, use that directory instead and ignore the
- directory in the original source root
- --with-adds-and-overrides
- use the subdirs 'adds' and 'overrides' in the
- specified directory as add-source-root and
- override-source-root
- --with-override-langtools
- use this langtools dir for the build
- --with-override-corba use this corba dir for the build
- --with-override-jaxp use this jaxp dir for the build
- --with-override-jaxws use this jaxws dir for the build
- --with-override-hotspot use this hotspot dir for the build
- --with-override-jdk use this jdk dir for the build
- --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
- invocations of the Boot JDK, overriding the default
- values, e.g --with-boot-jdk-jvmargs="-Xmx8G
- -enableassertions"
- --with-server-java use this java binary for running the javac
- background server and other long running java tasks
- in the build process, e.g.
- ---with-server-java="/opt/jrockit/bin/java -server"
- --with-javac-server-cores
- use at most this number of concurrent threads on the
- javac server [probed]
- --with-x use the X Window System
- --with-cups specify prefix directory for the cups package
- (expecting the libraries under PATH/lib and the
- headers under PATH/include)
- --with-cups-include specify directory for the cups include files
- --with-cups-lib specify directory for the cups library
- --with-freetype specify prefix directory for the freetype2 package
- (expecting the libraries under PATH/lib and the
- headers under PATH/include)
- --with-alsa specify prefix directory for the alsa package
- (expecting the libraries under PATH/lib and the
- headers under PATH/include)
- --with-alsa-include specify directory for the alsa include files
- --with-alsa-lib specify directory for the alsa library
- --with-pulse specify prefix directory for the pulseaudio package
- (expecting the libraries under PATH/lib and the
- headers under PATH/include)
- --with-pulse-include specify directory for the pulseaudio include files
- --with-pulse-lib specify directory for the pulseaudio library
- --with-cacerts-file specify alternative cacerts file
-
-Some influential environment variables:
- PKG_CONFIG path to pkg-config utility
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L if you have libraries in a
- nonstandard directory
- LIBS libraries to pass to the linker, e.g. -l
- CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if
- you have headers in a nonstandard directory
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
- OBJC Objective C compiler command
- OBJCFLAGS Objective C compiler flags
- CPP C preprocessor
- CXXCPP C++ preprocessor
- XMKMF Path to xmkmf, Makefile generator for X Window System
- FREETYPE2_CFLAGS
- C compiler flags for FREETYPE2, overriding pkg-config
- FREETYPE2_LIBS
- linker flags for FREETYPE2, overriding pkg-config
- ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
- ALSA_LIBS linker flags for ALSA, overriding pkg-config
- LIBPULSE_CFLAGS
- C compiler flags for LIBPULSE, overriding pkg-config
- LIBPULSE_LIBS
- linker flags for LIBPULSE, overriding pkg-config
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to .
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-openjdk configure version-0.1
-generated by GNU Autoconf 2.67
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_cxx_try_compile LINENO
-# ----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_compile
-
-# ac_fn_objc_try_compile LINENO
-# -----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_objc_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_objc_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_objc_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
-
-# ac_fn_cxx_try_link LINENO
-# -------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_link
-
-# ac_fn_cxx_try_run LINENO
-# ------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_cxx_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_run
-
-# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
-# ----------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_cxx_compute_int ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_lo=0 ac_mid=0
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_hi=$ac_mid; break
-else
- as_fn_arith $ac_mid + 1 && ac_lo=$as_val
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_hi=-1 ac_mid=-1
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_lo=$ac_mid; break
-else
- as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_hi=$ac_mid
-else
- as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include
-#include
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- return 1;
- if (($2) < 0)
- {
- long int i = longval ();
- if (i != ($2))
- return 1;
- fprintf (f, "%ld", i);
- }
- else
- {
- unsigned long int i = ulongval ();
- if (i != ($2))
- return 1;
- fprintf (f, "%lu", i);
- }
- /* Do not output a trailing newline, as this causes \r\n confusion
- on some platforms. */
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_run "$LINENO"; then :
- echo >>conftest.val; read $3 &5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_cxx_check_header_compile
-
-# ac_fn_cxx_check_func LINENO FUNC VAR
-# ------------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_cxx_check_func ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Define $2 to an innocuous variant, in case declares $2.
- For example, HP-UX 11i declares gettimeofday. */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below.
- Prefer to if __STDC__ is defined, since
- exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_cxx_check_func
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ----------------------------------------------- ##
-## Report this to build-infra-dev@openjdk.java.net ##
-## ----------------------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
-# ---------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_cxx_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ----------------------------------------------- ##
-## Report this to build-infra-dev@openjdk.java.net ##
-## ----------------------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_cxx_check_header_mongrel
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by openjdk $as_me version-0.1, which was
-generated by GNU Autoconf 2.67. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
- done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
- 2)
- as_fn_append ac_configure_args1 " '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- as_fn_append ac_configure_args " '$ac_arg'"
- ;;
- esac
- done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- # We do not want a PATH search for config.site.
- case $CONFIG_SITE in #((
- -*) ac_site_file1=./$CONFIG_SITE;;
- */*) ac_site_file1=$CONFIG_SITE;;
- *) ac_site_file1=./$CONFIG_SITE;;
- esac
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file" \
- || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special files
- # actually), so we avoid doing that. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-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
-
-
-
-ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant .
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program 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 for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-# PKG_CHECK_MODULES
-
-#
-# 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.
-#
-
-
-
-
-
-
-
-
-
-#
-# 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.
-#
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Fixes paths on windows hosts to be mixed mode short.
-
-
-
-
-#
-# 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.
-#
-
-
-
-
-
-#
-# 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.
-#
-
-function prepare_help_system {
- for ac_prog in apt-get yum port pkgutil pkgadd
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PKGHANDLER"; then
- ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_PKGHANDLER="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PKGHANDLER=$ac_cv_prog_PKGHANDLER
-if test -n "$PKGHANDLER"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
-$as_echo "$PKGHANDLER" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PKGHANDLER" && break
-done
-
-}
-
-function help_on_build_dependency {
- # Print a helpful message on how to acquire the necessary build dependency.
- # $1 is the help tag: freetyp2, cups, pulse, alsa etc
- MISSING_DEPENDENCY=$1
- PKGHANDLER_COMMAND=
-
- case $PKGHANDLER in
- apt-get)
- apt_help $MISSING_DEPENDENCY ;;
- yum)
- yum_help $MISSING_DEPENDENCY ;;
- port)
- port_help $MISSING_DEPENDENCY ;;
- pkgutil)
- pkgutil_help $MISSING_DEPENDENCY ;;
- pkgadd)
- pkgadd_help $MISSING_DEPENDENCY ;;
- * )
- break ;;
- esac
-
- if test "x$PKGHANDLER_COMMAND" != x; then
- HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
- fi
-}
-
-function apt_help {
- case $1 in
- devkit)
- PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
- openjdk)
- PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
- alsa)
- PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
- cups)
- PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
- freetype2)
- PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
- pulse)
- PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
- x11)
- PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
- ccache)
- PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
- * )
- break ;;
- esac
-}
-
-function yum_help {
- case $1 in
- devkit)
- PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
- openjdk)
- PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
- alsa)
- PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
- cups)
- PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
- freetype2)
- PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
- pulse)
- PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
- x11)
- PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
- ccache)
- PKGHANDLER_COMMAND="sudo yum install ccache" ;;
- * )
- break ;;
- esac
-}
-
-function port_help {
- PKGHANDLER_COMMAND=""
-}
-
-function pkgutil_help {
- PKGHANDLER_COMMAND=""
-}
-
-function pkgadd_help {
- PKGHANDLER_COMMAND=""
-}
-
-
-# Save the command line. Do this very early, before it is lost by calling autoconf macros.
CONFIGURE_COMMAND_LINE="$@"
+conf_script_dir=`dirname $0`
+conf_closed_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
+###
+### Test that the generated configure is up-to-date
+###
-# Locate the directory of this script.
-SCRIPT="$0"
+# On Solaris /bin/sh doesn't support test -nt but /usr/bin/test does.
+TEST=`which test`
- if test "x$BUILD_OS" != xwindows; then
- # Follow a chain of symbolic links. Use readlink
- # where it exists, else fall back to horribly
- # complicated shell code.
- # Extract the first word of "readlink", so it can be a program name with args.
-set dummy readlink; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READLINK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $READLINK in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+print_error_not_up_to_date() {
+ echo "Error: The configure source files is newer than the generated files."
+ echo "Please run 'sh autogen.sh' to update the generated files."
+}
- ;;
-esac
-fi
-READLINK=$ac_cv_path_READLINK
-if test -n "$READLINK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
-$as_echo "$READLINK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test "x$READLINK_TESTED" != yes; then
- # On MacOSX there is a readlink tool with a different
- # purpose than the GNU readlink tool. Check the found readlink.
- ISGNU=`$READLINK --help 2>&1 | grep GNU`
- if test "x$ISGNU" = x; then
- # A readlink that we do not know how to use.
- # Are there other non-GNU readlinks out there?
- READLINK_TESTED=yes
- READLINK=
- fi
- fi
-
- if test "x$READLINK" != x; then
- SCRIPT=`$READLINK -f $SCRIPT`
- else
- STARTDIR=$PWD
- COUNTER=0
- DIR=`dirname $SCRIPT`
- FIL=`basename $SCRIPT`
- while test $COUNTER -lt 20; do
- ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
- if test "x$ISLINK" == x; then
- # This is not a symbolic link! We are done!
- break
- fi
- # The link might be relative! We have to use cd to travel safely.
- cd $DIR
- cd `dirname $ISLINK`
- DIR=`pwd`
- FIL=`basename $ISLINK`
- let COUNTER=COUNTER+1
- done
- cd $STARTDIR
- SCRIPT=$DIR/$FIL
- fi
- fi
-
-AUTOCONF_DIR=`dirname $0`
-
-# 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.
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$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
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
-
-
- # Test that variable AWK is not empty.
- if test "" = "$AWK"; then as_fn_error $? "Could not find awk !" "$LINENO" 5 ; fi
-
-# Extract the first word of "cat", so it can be a program name with args.
-set dummy cat; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CAT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CAT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CAT="$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
-CAT=$ac_cv_path_CAT
-if test -n "$CAT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
-$as_echo "$CAT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable CAT is not empty.
- if test "" = "$CAT"; then as_fn_error $? "Could not find cat !" "$LINENO" 5 ; fi
-
-# Extract the first word of "chmod", so it can be a program name with args.
-set dummy chmod; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CHMOD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CHMOD in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CHMOD="$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
-CHMOD=$ac_cv_path_CHMOD
-if test -n "$CHMOD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
-$as_echo "$CHMOD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable CHMOD is not empty.
- if test "" = "$CHMOD"; then as_fn_error $? "Could not find chmod !" "$LINENO" 5 ; fi
-
-# Extract the first word of "cp", so it can be a program name with args.
-set dummy cp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CP="$CP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CP="$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
-CP=$ac_cv_path_CP
-if test -n "$CP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
-$as_echo "$CP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable CP is not empty.
- if test "" = "$CP"; then as_fn_error $? "Could not find cp !" "$LINENO" 5 ; fi
-
-# Extract the first word of "cpio", so it can be a program name with args.
-set dummy cpio; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CPIO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CPIO in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CPIO=$ac_cv_path_CPIO
-if test -n "$CPIO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
-$as_echo "$CPIO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable CPIO is not empty.
- if test "" = "$CPIO"; then as_fn_error $? "Could not find cpio !" "$LINENO" 5 ; fi
-
-# Extract the first word of "cut", so it can be a program name with args.
-set dummy cut; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CUT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CUT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CUT="$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
-CUT=$ac_cv_path_CUT
-if test -n "$CUT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
-$as_echo "$CUT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable CUT is not empty.
- if test "" = "$CUT"; then as_fn_error $? "Could not find cut !" "$LINENO" 5 ; fi
-
-# Extract the first word of "date", so it can be a program name with args.
-set dummy date; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DATE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $DATE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_DATE="$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
-DATE=$ac_cv_path_DATE
-if test -n "$DATE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
-$as_echo "$DATE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable DATE is not empty.
- if test "" = "$DATE"; then as_fn_error $? "Could not find date !" "$LINENO" 5 ; fi
-
-# Extract the first word of "df", so it can be a program name with args.
-set dummy df; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DF+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $DF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_DF="$DF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-DF=$ac_cv_path_DF
-if test -n "$DF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
-$as_echo "$DF" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable DF is not empty.
- if test "" = "$DF"; then as_fn_error $? "Could not find df !" "$LINENO" 5 ; fi
-
-# Extract the first word of "diff", so it can be a program name with args.
-set dummy diff; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DIFF+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $DIFF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_DIFF="$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
-DIFF=$ac_cv_path_DIFF
-if test -n "$DIFF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
-$as_echo "$DIFF" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable DIFF is not empty.
- if test "" = "$DIFF"; then as_fn_error $? "Could not find diff !" "$LINENO" 5 ; fi
-
-# Warning echo is really, really unportable!!!!! Different
-# behaviour in bash and dash and in a lot of other shells!
-# Use printf for serious work!
-# Extract the first word of "echo", so it can be a program name with args.
-set dummy echo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ECHO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ECHO in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ECHO="$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
-ECHO=$ac_cv_path_ECHO
-if test -n "$ECHO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
-$as_echo "$ECHO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable ECHO is not empty.
- if test "" = "$ECHO"; then as_fn_error $? "Could not find echo !" "$LINENO" 5 ; fi
-
-{ $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; }
-if test "${ac_cv_path_GREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-
- # Test that variable EGREP is not empty.
- if test "" = "$EGREP"; then as_fn_error $? "Could not find egrep !" "$LINENO" 5 ; fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
- then ac_cv_path_FGREP="$GREP -F"
- else
- if test -z "$FGREP"; then
- ac_path_FGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
- # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_FGREP="$ac_path_FGREP"
- ac_path_FGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_FGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_FGREP"; then
- as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_FGREP=$FGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
-
-
- # Test that variable FGREP is not empty.
- if test "" = "$FGREP"; then as_fn_error $? "Could not find fgrep !" "$LINENO" 5 ; fi
-
-
-# Extract the first word of "find", so it can be a program name with args.
-set dummy find; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_FIND+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $FIND in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_FIND="$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
-FIND=$ac_cv_path_FIND
-if test -n "$FIND"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
-$as_echo "$FIND" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable FIND is not empty.
- if test "" = "$FIND"; then as_fn_error $? "Could not find find !" "$LINENO" 5 ; fi
-
-
- # Test if find supports -delete
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
-$as_echo_n "checking if find supports -delete... " >&6; }
- FIND_DELETE="-delete"
-
- DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
-
- echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
-
- TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
- if test -f $DELETEDIR/TestIfFindSupportsDelete; then
- # No, it does not.
- rm $DELETEDIR/TestIfFindSupportsDelete
- FIND_DELETE="-exec rm \{\} \+"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- rmdir $DELETEDIR
-
-
-
-{ $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; }
-if test "${ac_cv_path_GREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-
- # Test that variable GREP is not empty.
- if test "" = "$GREP"; then as_fn_error $? "Could not find grep !" "$LINENO" 5 ; fi
-
-# Extract the first word of "head", so it can be a program name with args.
-set dummy head; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HEAD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $HEAD in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_HEAD="$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
-HEAD=$ac_cv_path_HEAD
-if test -n "$HEAD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
-$as_echo "$HEAD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable HEAD is not empty.
- if test "" = "$HEAD"; then as_fn_error $? "Could not find head !" "$LINENO" 5 ; fi
-
-# Extract the first word of "ln", so it can be a program name with args.
-set dummy ln; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $LN in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_LN="$LN" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_LN="$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
-LN=$ac_cv_path_LN
-if test -n "$LN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
-$as_echo "$LN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable LN is not empty.
- if test "" = "$LN"; then as_fn_error $? "Could not find ln !" "$LINENO" 5 ; fi
-
-# Extract the first word of "ls", so it can be a program name with args.
-set dummy ls; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $LS in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_LS="$LS" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_LS="$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
-LS=$ac_cv_path_LS
-if test -n "$LS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
-$as_echo "$LS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable LS is not empty.
- if test "" = "$LS"; then as_fn_error $? "Could not find ls !" "$LINENO" 5 ; fi
-
-for ac_prog in gmake make
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MAKE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAKE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-MAKE=$ac_cv_path_MAKE
-if test -n "$MAKE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
-$as_echo "$MAKE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$MAKE" && break
-done
-
-
- # Test that variable MAKE is not empty.
- if test "" = "$MAKE"; then as_fn_error $? "Could not find make !" "$LINENO" 5 ; fi
-
-MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[12346789]'`
-if test "x$MAKE_VERSION" = x; then
- as_fn_error $? "You must use GNU make 3.81 or newer! Please put it in the path." "$LINENO" 5
-fi
-# Extract the first word of "mkdir", so it can be a program name with args.
-set dummy mkdir; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MKDIR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MKDIR in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_MKDIR="$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
-MKDIR=$ac_cv_path_MKDIR
-if test -n "$MKDIR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
-$as_echo "$MKDIR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable MKDIR is not empty.
- if test "" = "$MKDIR"; then as_fn_error $? "Could not find mkdir !" "$LINENO" 5 ; fi
-
-# Extract the first word of "mv", so it can be a program name with args.
-set dummy mv; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MV+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MV in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_MV="$MV" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_MV="$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
-MV=$ac_cv_path_MV
-if test -n "$MV"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
-$as_echo "$MV" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable MV is not empty.
- if test "" = "$MV"; then as_fn_error $? "Could not find mv !" "$LINENO" 5 ; fi
-
-for ac_prog in nawk gawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_NAWK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $NAWK in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_NAWK="$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
-NAWK=$ac_cv_path_NAWK
-if test -n "$NAWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
-$as_echo "$NAWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$NAWK" && break
-done
-
-
- # Test that variable NAWK is not empty.
- if test "" = "$NAWK"; then as_fn_error $? "Could not find nawk !" "$LINENO" 5 ; fi
-
-# Extract the first word of "printf", so it can be a program name with args.
-set dummy printf; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PRINTF+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PRINTF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PRINTF="$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
-PRINTF=$ac_cv_path_PRINTF
-if test -n "$PRINTF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
-$as_echo "$PRINTF" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable PRINTF is not empty.
- if test "" = "$PRINTF"; then as_fn_error $? "Could not find printf !" "$LINENO" 5 ; fi
-
-# Extract the first word of "pwd", so it can be a program name with args.
-set dummy pwd; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $THEPWDCMD in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-THEPWDCMD=$ac_cv_path_THEPWDCMD
-if test -n "$THEPWDCMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
-$as_echo "$THEPWDCMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "rm", so it can be a program name with args.
-set dummy rm; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_RM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $RM in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_RM="$RM" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-RM=$ac_cv_path_RM
-if test -n "$RM"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
-$as_echo "$RM" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable RM is not empty.
- if test "" = "$RM"; then as_fn_error $? "Could not find rm !" "$LINENO" 5 ; fi
-
-RM="$RM -f"
-{ $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; }
-if test "${ac_cv_path_SED+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- 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_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
-else
- ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
-
-
- # Test that variable SED is not empty.
- if test "" = "$SED"; then as_fn_error $? "Could not find sed !" "$LINENO" 5 ; fi
-
-# Extract the first word of "sh", so it can be a program name with args.
-set dummy sh; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SH+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $SH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_SH="$SH" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_SH="$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
-SH=$ac_cv_path_SH
-if test -n "$SH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
-$as_echo "$SH" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable SH is not empty.
- if test "" = "$SH"; then as_fn_error $? "Could not find sh !" "$LINENO" 5 ; fi
-
-# Extract the first word of "sort", so it can be a program name with args.
-set dummy sort; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SORT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $SORT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_SORT="$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
-SORT=$ac_cv_path_SORT
-if test -n "$SORT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
-$as_echo "$SORT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable SORT is not empty.
- if test "" = "$SORT"; then as_fn_error $? "Could not find sort !" "$LINENO" 5 ; fi
-
-# Extract the first word of "tar", so it can be a program name with args.
-set dummy tar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TAR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $TAR in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_TAR="$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
-TAR=$ac_cv_path_TAR
-if test -n "$TAR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
-$as_echo "$TAR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable TAR is not empty.
- if test "" = "$TAR"; then as_fn_error $? "Could not find tar !" "$LINENO" 5 ; fi
-
-# Extract the first word of "tail", so it can be a program name with args.
-set dummy tail; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TAIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $TAIL in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_TAIL="$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
-TAIL=$ac_cv_path_TAIL
-if test -n "$TAIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
-$as_echo "$TAIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable TAIL is not empty.
- if test "" = "$TAIL"; then as_fn_error $? "Could not find tail !" "$LINENO" 5 ; fi
-
-# Extract the first word of "tee", so it can be a program name with args.
-set dummy tee; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TEE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $TEE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_TEE="$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
-TEE=$ac_cv_path_TEE
-if test -n "$TEE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
-$as_echo "$TEE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable TEE is not empty.
- if test "" = "$TEE"; then as_fn_error $? "Could not find tee !" "$LINENO" 5 ; fi
-
-# Extract the first word of "tr", so it can be a program name with args.
-set dummy tr; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $TR in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TR="$TR" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_TR="$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
-TR=$ac_cv_path_TR
-if test -n "$TR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
-$as_echo "$TR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable TR is not empty.
- if test "" = "$TR"; then as_fn_error $? "Could not find tr !" "$LINENO" 5 ; fi
-
-# Extract the first word of "touch", so it can be a program name with args.
-set dummy touch; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_TOUCH+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $TOUCH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_TOUCH="$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
-TOUCH=$ac_cv_path_TOUCH
-if test -n "$TOUCH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
-$as_echo "$TOUCH" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable TOUCH is not empty.
- if test "" = "$TOUCH"; then as_fn_error $? "Could not find touch !" "$LINENO" 5 ; fi
-
-# Extract the first word of "wc", so it can be a program name with args.
-set dummy wc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_WC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $WC in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_WC="$WC" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_WC="$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
-WC=$ac_cv_path_WC
-if test -n "$WC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
-$as_echo "$WC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable WC is not empty.
- if test "" = "$WC"; then as_fn_error $? "Could not find wc !" "$LINENO" 5 ; fi
-
-# Extract the first word of "xargs", so it can be a program name with args.
-set dummy xargs; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XARGS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $XARGS in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_XARGS="$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
-XARGS=$ac_cv_path_XARGS
-if test -n "$XARGS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
-$as_echo "$XARGS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable XARGS is not empty.
- if test "" = "$XARGS"; then as_fn_error $? "Could not find xargs !" "$LINENO" 5 ; fi
-
-# Extract the first word of "zip", so it can be a program name with args.
-set dummy zip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ZIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ZIP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ZIP=$ac_cv_path_ZIP
-if test -n "$ZIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
-$as_echo "$ZIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable ZIP is not empty.
- if test "" = "$ZIP"; then as_fn_error $? "Could not find zip !" "$LINENO" 5 ; fi
-
-# Extract the first word of "unzip", so it can be a program name with args.
-set dummy unzip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_UNZIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $UNZIP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-UNZIP=$ac_cv_path_UNZIP
-if test -n "$UNZIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
-$as_echo "$UNZIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable UNZIP is not empty.
- if test "" = "$UNZIP"; then as_fn_error $? "Could not find unzip !" "$LINENO" 5 ; fi
-
-# Extract the first word of "ldd", so it can be a program name with args.
-set dummy ldd; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LDD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $LDD in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-LDD=$ac_cv_path_LDD
-if test -n "$LDD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
-$as_echo "$LDD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "x$LDD" = "x"; then
- # List shared lib dependencies is used for
- # debug output and checking for forbidden dependencies.
- # We can build without it.
- LDD="true"
-fi
-# Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $OTOOL in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-OTOOL=$ac_cv_path_OTOOL
-if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test "x$OTOOL" = "x"; then
- OTOOL="true"
-fi
-# Extract the first word of "readelf", so it can be a program name with args.
-set dummy readelf; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READELF+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $READELF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-READELF=$ac_cv_path_READELF
-if test -n "$READELF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
-$as_echo "$READELF" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "expr", so it can be a program name with args.
-set dummy expr; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_EXPR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $EXPR in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_EXPR="$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
-EXPR=$ac_cv_path_EXPR
-if test -n "$EXPR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
-$as_echo "$EXPR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable EXPR is not empty.
- if test "" = "$EXPR"; then as_fn_error $? "Could not find expr !" "$LINENO" 5 ; fi
-
-# Extract the first word of "file", so it can be a program name with args.
-set dummy file; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_FILE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $FILE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_FILE="$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
-FILE=$ac_cv_path_FILE
-if test -n "$FILE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
-$as_echo "$FILE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Test that variable FILE is not empty.
- if test "" = "$FILE"; then as_fn_error $? "Could not find file !" "$LINENO" 5 ; fi
-
-# Extract the first word of "hg", so it can be a program name with args.
-set dummy hg; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $HG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_HG="$HG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-HG=$ac_cv_path_HG
-if test -n "$HG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
-$as_echo "$HG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-# Figure out the build and host system.
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-# Check whether --with-data-model was given.
-if test "${with_data_model+set}" = set; then :
- withval=$with_data_model;
-fi
-
-
-if test "x$with_data_model" != x && \
- test "x$with_data_model" != x32 && \
- test "x$with_data_model" != x64 ; then
- as_fn_error $? "The data model can only be 32 or 64!" "$LINENO" 5
-fi
-# Translate the standard cpu-vendor-kernel-os quadruplets into
-# the new HOST_.... and BUILD_... and the legacy names used by
-# the openjdk build.
-# It uses $host_os $host_cpu $build_os $build_cpu and $with_data_model
-
- # Expects $host_os $host_cpu $build_os and $build_cpu
- # and $with_data_model to have been setup!
- #
- # Translate the standard triplet(quadruplet) definition
- # of the host/build system into
- # HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
- # HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
- # HOST_OS_API=posix,winapi
- #
- # HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
- # HOST_CPU_ARCH=x86,sparc,pcc,arm
- # HOST_CPU_BITS=32,64
- # HOST_CPU_ENDIAN=big,little
- #
- # The same values are setup for BUILD_...
- #
- # And the legacy variables, for controlling the old makefiles.
- # LEGACY_HOST_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
- # LEGACY_HOST_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
- # LEGACY_HOST_CPU3=sparcv9,amd64 (but only on solaris)
- # LEGACY_HOST_OS_API=solaris,windows
- #
- # We also copy the autoconf trip/quadruplet
- # verbatim to HOST and BUILD
- HOST=${host}
-
- BUILD=${build}
-
-
-
-
- case "$host_os" in
- *linux*)
- VAR_OS=linux
- VAR_OS_API=posix
- VAR_OS_FAMILY=gnu
- ;;
- *solaris*)
- VAR_OS=solaris
- VAR_OS_API=posix
- VAR_OS_FAMILY=sysv
- ;;
- *darwin*)
- VAR_OS=macosx
- VAR_OS_API=posix
- VAR_OS_FAMILY=bsd
- ;;
- *bsd*)
- VAR_OS=bsd
- VAR_OS_API=posix
- VAR_OS_FAMILY=bsd
- ;;
- *cygwin*|*windows*)
- VAR_OS=windows
- VAR_OS_API=winapi
- VAR_OS_FAMILY=windows
- ;;
- *)
- as_fn_error $? "unsupported host operating system $host_os" "$LINENO" 5
- ;;
- esac
-
- HOST_OS="$VAR_OS"
- HOST_OS_FAMILY="$VAR_OS_FAMILY"
- HOST_OS_API="$VAR_OS_API"
-
-
-
-
-
- if test "x$HOST_OS_API" = xposix; then
- LEGACY_HOST_OS_API="solaris"
- fi
- if test "x$HOST_OS_API" = xwinapi; then
- LEGACY_HOST_OS_API="windows"
- fi
-
-
-
-
- # First argument is the cpu name from the trip/quad
- case "$host_cpu" in
- x86_64)
- VAR_CPU=x64
- VAR_CPU_ARCH=x86
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=little
- VAR_LEGACY_CPU=amd64
- ;;
- i?86)
- VAR_CPU=ia32
- VAR_CPU_ARCH=x86
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=little
- VAR_LEGACY_CPU=i586
- ;;
- alpha*)
- VAR_CPU=alpha
- VAR_CPU_ARCH=alpha
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=alpha
- ;;
- arm*)
- VAR_CPU=arm
- VAR_CPU_ARCH=arm
- VAR_CPU_BITS=3264
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=arm
- ;;
- mips)
- VAR_CPU=mips
- VAR_CPU_ARCH=mips
- VAR_CPU_BITS=woot
- VAR_CPU_ENDIAN=woot
- VAR_LEGACY_CPU=mips
- ;;
- mipsel)
- VAR_CPU=mipsel
- VAR_CPU_ARCH=mips
- VAR_CPU_BITS=woot
- VAR_CPU_ENDIAN=woot
- VAR_LEGACY_CPU=mipsel
- ;;
- powerpc)
- VAR_CPU=ppc
- VAR_CPU_ARCH=ppc
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=ppc
- ;;
- powerpc64)
- VAR_CPU=ppc64
- VAR_CPU_ARCH=ppc
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=32
- VAR_LEGACY_CPU=ppc64
- ;;
- sparc)
- VAR_CPU=sparc
- VAR_CPU_ARCH=sparc
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=sparc
- ;;
- sparc64)
- VAR_CPU=sparcv9
- VAR_CPU_ARCH=sparc
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=sparc_sparcv9
- ;;
- s390)
- VAR_CPU=s390
- VAR_CPU_ARCH=s390
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=woot
- VAR_LEGACY_CPU=s390
- VAR_LEGACY_CPU=s390
- ;;
- s390x)
- VAR_CPU=s390x
- VAR_CPU_ARCH=s390
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=woot
- VAR_LEGACY_CPU=s390x
- ;;
- *)
- as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
- ;;
- esac
-
- # Workaround cygwin not knowing about 64 bit.
- if test "x$VAR_OS" = "xwindows"; then
- if test "x$PROCESSOR_IDENTIFIER" != "x"; then
- PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
- case "$PROC_ARCH" in
- intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
- VAR_CPU=x64
- VAR_CPU_BITS=64
- VAR_LEGACY_CPU=amd64
- ;;
- esac
- fi
- fi
-
- if test "x$VAR_CPU_ARCH" = "xx86"; then
- if test "x$with_data_model" = "x64"; then
- VAR_CPU=x64
- VAR_CPU_BITS=64
- VAR_LEGACY_CPU=amd64
- fi
- if test "x$with_data_model" = "x32"; then
- VAR_CPU=ia32
- VAR_CPU_BITS=32
- VAR_LEGACY_CPU=i586
- fi
- fi
-
- HOST_CPU="$VAR_CPU"
- HOST_CPU_ARCH="$VAR_CPU_ARCH"
- HOST_CPU_BITS="$VAR_CPU_BITS"
- HOST_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-
-
-
-
-
-
- # Also store the legacy naming of the cpu.
- # Ie i586 and amd64 instead of ia32 and x64
- LEGACY_HOST_CPU1="$VAR_LEGACY_CPU"
-
-
- # And the second legacy naming of the cpu.
- # Ie i386 and amd64 instead of ia32 and x64.
- LEGACY_HOST_CPU2="$LEGACY_HOST_CPU1"
- if test "x$LEGACY_HOST_CPU1" = xi586; then
- LEGACY_HOST_CPU2=i386
- fi
-
-
- # And the third legacy naming of the cpu.
- # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
- LEGACY_HOST_CPU3=""
- if test "x$HOST_CPU" = xx64; then
- LEGACY_HOST_CPU3=amd64
- fi
- if test "x$HOST_CPU" = xsparcv9; then
- LEGACY_HOST_CPU3=sparvc9
- fi
-
-
-
-
-
- case "$build_os" in
- *linux*)
- VAR_OS=linux
- VAR_OS_API=posix
- VAR_OS_FAMILY=gnu
- ;;
- *solaris*)
- VAR_OS=solaris
- VAR_OS_API=posix
- VAR_OS_FAMILY=sysv
- ;;
- *darwin*)
- VAR_OS=macosx
- VAR_OS_API=posix
- VAR_OS_FAMILY=bsd
- ;;
- *bsd*)
- VAR_OS=bsd
- VAR_OS_API=posix
- VAR_OS_FAMILY=bsd
- ;;
- *cygwin*|*windows*)
- VAR_OS=windows
- VAR_OS_API=winapi
- VAR_OS_FAMILY=windows
- ;;
- *)
- as_fn_error $? "unsupported host operating system $build_os" "$LINENO" 5
- ;;
- esac
-
- BUILD_OS="$VAR_OS"
- BUILD_OS_FAMILY="$VAR_OS_FAMILY"
- BUILD_OS_API="$VAR_OS_API"
-
-
-
-
-
- if test "x$BUILD_OS_API" = xposix; then
- LEGACY_BUILD_OS_API="solaris"
- fi
- if test "x$BUILD_OS_API" = xwinapi; then
- LEGACY_BUILD_OS_API="windows"
- fi
-
-
-
-
- # First argument is the cpu name from the trip/quad
- case "$build_cpu" in
- x86_64)
- VAR_CPU=x64
- VAR_CPU_ARCH=x86
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=little
- VAR_LEGACY_CPU=amd64
- ;;
- i?86)
- VAR_CPU=ia32
- VAR_CPU_ARCH=x86
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=little
- VAR_LEGACY_CPU=i586
- ;;
- alpha*)
- VAR_CPU=alpha
- VAR_CPU_ARCH=alpha
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=alpha
- ;;
- arm*)
- VAR_CPU=arm
- VAR_CPU_ARCH=arm
- VAR_CPU_BITS=3264
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=arm
- ;;
- mips)
- VAR_CPU=mips
- VAR_CPU_ARCH=mips
- VAR_CPU_BITS=woot
- VAR_CPU_ENDIAN=woot
- VAR_LEGACY_CPU=mips
- ;;
- mipsel)
- VAR_CPU=mipsel
- VAR_CPU_ARCH=mips
- VAR_CPU_BITS=woot
- VAR_CPU_ENDIAN=woot
- VAR_LEGACY_CPU=mipsel
- ;;
- powerpc)
- VAR_CPU=ppc
- VAR_CPU_ARCH=ppc
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=ppc
- ;;
- powerpc64)
- VAR_CPU=ppc64
- VAR_CPU_ARCH=ppc
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=32
- VAR_LEGACY_CPU=ppc64
- ;;
- sparc)
- VAR_CPU=sparc
- VAR_CPU_ARCH=sparc
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=sparc
- ;;
- sparc64)
- VAR_CPU=sparcv9
- VAR_CPU_ARCH=sparc
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=sparc_sparcv9
- ;;
- s390)
- VAR_CPU=s390
- VAR_CPU_ARCH=s390
- VAR_CPU_BITS=32
- VAR_CPU_ENDIAN=woot
- VAR_LEGACY_CPU=s390
- VAR_LEGACY_CPU=s390
- ;;
- s390x)
- VAR_CPU=s390x
- VAR_CPU_ARCH=s390
- VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=woot
- VAR_LEGACY_CPU=s390x
- ;;
- *)
- as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
- ;;
- esac
-
- # Workaround cygwin not knowing about 64 bit.
- if test "x$VAR_OS" = "xwindows"; then
- if test "x$PROCESSOR_IDENTIFIER" != "x"; then
- PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
- case "$PROC_ARCH" in
- intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
- VAR_CPU=x64
- VAR_CPU_BITS=64
- VAR_LEGACY_CPU=amd64
- ;;
- esac
- fi
- fi
-
- if test "x$VAR_CPU_ARCH" = "xx86"; then
- if test "x$with_data_model" = "x64"; then
- VAR_CPU=x64
- VAR_CPU_BITS=64
- VAR_LEGACY_CPU=amd64
- fi
- if test "x$with_data_model" = "x32"; then
- VAR_CPU=ia32
- VAR_CPU_BITS=32
- VAR_LEGACY_CPU=i586
- fi
- fi
-
- BUILD_CPU="$VAR_CPU"
- BUILD_CPU_ARCH="$VAR_CPU_ARCH"
- BUILD_CPU_BITS="$VAR_CPU_BITS"
- BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
-
-
-
-
-
-
- # Also store the legacy naming of the cpu.
- # Ie i586 and amd64 instead of ia32 and x64
- LEGACY_BUILD_CPU1="$VAR_LEGACY_CPU"
-
-
- # And the second legacy naming of the cpu.
- # Ie i386 and amd64 instead of ia32 and x64.
- LEGACY_BUILD_CPU2="$LEGACY_BUILD_CPU1"
- if test "x$LEGACY_BUILD_CPU1" = xi586; then
- LEGACY_BUILD_CPU2=i386
- fi
-
-
- # And the third legacy naming of the cpu.
- # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
- LEGACY_BUILD_CPU3=""
- if test "x$BUILD_CPU" = xx64; then
- LEGACY_BUILD_CPU3=amd64
- fi
- if test "x$BUILD_CPU" = xsparcv9; then
- LEGACY_BUILD_CPU3=sparvc9
- fi
-
-
-
- if test "x$HOST_OS" != xsolaris; then
- LEGACY_HOST_CPU3=""
- LEGACY_BUILD_CPU3=""
- fi
-
- # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_HOST_CPU1) ...
- if test "x$HOST_OS" = xmacosx && test "x$HOST_CPU" = xx64; then
- LEGACY_HOST_CPU1="x86_64"
- fi
-
-
- if test "x$HOST_OS" = "xsolaris"; then
- REQUIRED_OS_NAME=SunOS
- REQUIRED_OS_VERSION=5.10
- fi
- if test "x$HOST_OS" = "xlinux"; then
- REQUIRED_OS_NAME=Linux
- REQUIRED_OS_VERSION=2.6
- fi
- if test "x$HOST_OS" = "xwindows"; then
- REQUIRED_OS_NAME=Windows
- REQUIRED_OS_VERSION=5.1
- fi
- if test "x$HOST_OS" = "xmacosx"; then
- REQUIRED_OS_NAME=Darwin
- REQUIRED_OS_VERSION=11.2
- fi
-
-
-
-
-
-# Now the following vars are defined.
-# HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
-# HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
-# HOST_OS_API=posix,winapi
-#
-# HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
-# HOST_CPU_ARCH=x86,sparc,pcc,arm
-# HOST_CPU_BITS=32,64
-# HOST_CPU_ENDIAN=big,little
-#
-# There is also a:
-# LEGACY_HOST_CPU1=i586,amd64,.... # used to set the old var ARCH
-# LEGACY_HOST_CPU2=i386,amd64,.... # used to set the old var LIBARCH
-# LEGACY_HOST_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
-# There was also a BUILDARCH that had i486,amd64,... but we do not use that
-# in the new build.
-# LEGACY_HOST_OS_API=solaris,windows # used to select source roots
-
-DATE_WHEN_CONFIGURED=`LANG=C date`
-
-
-# How many cores do we have on this build system?
-
-# Check whether --with-num-cores was given.
-if test "${with_num_cores+set}" = set; then :
- withval=$with_num_cores;
-fi
-
-if test "x$with_num_cores" = x; then
- # The number of cores were not specified, try to probe them.
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
-$as_echo_n "checking for number of cores... " >&6; }
- NUM_CORES=1
- FOUND_CORES=no
-
- if test -f /proc/cpuinfo; then
- # Looks like a Linux system
- NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
- FOUND_CORES=yes
- fi
-
- if test -x /usr/sbin/psrinfo; then
- # Looks like a Solaris system
- NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
- FOUND_CORES=yes
- fi
-
- if test -x /usr/sbin/system_profiler; then
- # Looks like a MacOSX system
- NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
- FOUND_CORES=yes
- fi
-
- if test "x$build_os" = xwindows; then
- NUM_CORES=4
- fi
-
- # For c/c++ code we run twice as many concurrent build
- # jobs than we have cores, otherwise we will stall on io.
- CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
-
- if test "x$FOUND_CORES" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
-$as_echo "$NUM_CORES" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1!" >&5
-$as_echo "could not detect number of cores, defaulting to 1!" >&6; }
- fi
-
-
-else
- NUM_CORES=$with_num_cores
- CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
-fi
-
-
-
-# How many cores do we have on this build system?
-
-# Check whether --with-memory-size was given.
-if test "${with_memory_size+set}" = set; then :
- withval=$with_memory_size;
-fi
-
-if test "x$with_memory_size" = x; then
- # The memory size was not specified, try to probe it.
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
-$as_echo_n "checking for memory size... " >&6; }
- # Default to 1024MB
- MEMORY_SIZE=1024
- FOUND_MEM=no
-
- if test -f /proc/cpuinfo; then
- # Looks like a Linux system
- MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
- MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
- FOUND_MEM=yes
- fi
-
- if test -x /usr/sbin/prtconf; then
- # Looks like a Solaris system
- MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
- FOUND_MEM=yes
- fi
-
- if test -x /usr/sbin/system_profiler; then
- # Looks like a MacOSX system
- MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'`
- MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
- FOUND_MEM=yes
- fi
-
- if test "x$build_os" = xwindows; then
- MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print $4 }' | sed 's/,//'`
- FOUND_MEM=yes
- fi
-
- if test "x$FOUND_MEM" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
-$as_echo "$MEMORY_SIZE MB" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size defaulting to 1024MB!" >&5
-$as_echo "could not detect memory size defaulting to 1024MB!" >&6; }
- fi
-
-else
- MEMORY_SIZE=$with_memory_size
-fi
-
-
-# Where is the source? It is located two levels above the configure script.
-CURDIR="$PWD"
-cd "$AUTOCONF_DIR/../.."
-SRC_ROOT="`pwd`"
-
-cd "$CURDIR"
-
-# For cygwin we need cygpath first, since it is used everywhere.
-# Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CYGPATH+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CYGPATH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CYGPATH=$ac_cv_path_CYGPATH
-if test -n "$CYGPATH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
-$as_echo "$CYGPATH" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-PATH_SEP=":"
-if test "x$BUILD_OS" = "xwindows"; then
- if test "x$CYGPATH" = x; then
- as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
- fi
- PATH_SEP=";"
-fi
-
-
-
- # Fail with message the path to the source root if var SRC_ROOT contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$SRC_ROOT" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$BUILD_OS" = "xwindows"; then
- SRC_ROOT=`$CYGPATH -s -m -a "$SRC_ROOT"`
- SRC_ROOT=`$CYGPATH -u "$SRC_ROOT"`
- else
- as_fn_error $? "You cannot have spaces in the path to the source root! \"$SRC_ROOT\"" "$LINENO" 5
- fi
- fi
-
-
- # Fail with message the path to the current directory if var CURDIR contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$CURDIR" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$BUILD_OS" = "xwindows"; then
- CURDIR=`$CYGPATH -s -m -a "$CURDIR"`
- CURDIR=`$CYGPATH -u "$CURDIR"`
- else
- as_fn_error $? "You cannot have spaces in the path to the current directory! \"$CURDIR\"" "$LINENO" 5
- fi
- fi
-
-
-if test "x$BUILD_OS" = "xsolaris"; then
- # Also search in /usr/ccs/bin for utilities like ar and as.
- PATH="/usr/ccs/bin:$PATH"
-fi
-
-###############################################################################
-#
-# OpenJDK or closed
-#
-# Check whether --enable-openjdk-only was given.
-if test "${enable_openjdk_only+set}" = set; then :
- enableval=$enable_openjdk_only;
-fi
-
-
-if test "x$enable_openjdk_only" = "xyes"; then
- OPENJDK=true
-elif test "x$enable_openjdk_only" = "xno"; then
- OPENJDK=false
-elif test -d "$SRC_ROOT/jdk/src/closed"; then
- OPENJDK=false
-else
- OPENJDK=true
-fi
-
-if test "x$OPENJDK" = "xtrue"; then
- SET_OPENJDK=OPENJDK=true
-fi
-
-
-
-###############################################################################
-#
-# JIGSAW or not. The JIGSAW variable is used during the intermediate
-# stage when we are building both the old style JDK and the new style modularized JDK.
-# When the modularized JDK is finalized, this option will go away.
-#
-# Check whether --enable-jigsaw was given.
-if test "${enable_jigsaw+set}" = set; then :
- enableval=$enable_jigsaw;
-fi
-
-
-if test "x$enable_jigsaw" = "xyes"; then
- JIGSAW=true
-else
- JIGSAW=false
-fi
-
-
-###############################################################################
-#
-# Check which variant of the JDK that we want to build.
-# Currently we have:
-# normal: standard edition
-# embedded: cut down to a smaller footprint
-#
-# Effectively the JDK variant gives a name to a specific set of
-# modules to compile into the JDK. In the future, these modules
-# might even be Jigsaw modules.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
-$as_echo_n "checking which variant of the JDK to build... " >&6; }
-
-# Check whether --with-jdk-variant was given.
-if test "${with_jdk_variant+set}" = set; then :
- withval=$with_jdk_variant;
-fi
-
-
-if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
- JAVASE_EMBEDDED=""
- MINIMIZE_RAM_USAGE=""
- JDK_VARIANT="normal"
-elif test "x$with_jdk_variant" = xembedded; then
- JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
- MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
- JDK_VARIANT="embedded"
-else
- as_fn_error $? "The available JDK variants are: normal, embedded" "$LINENO" 5
-fi
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
-$as_echo "$JDK_VARIANT" >&6; }
-
-###############################################################################
-#
-# Should we build a JDK/JVM with head support (ie a graphical ui)?
-# We always build headless support.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
-$as_echo_n "checking headful support... " >&6; }
-# Check whether --enable-headful was given.
-if test "${enable_headful+set}" = set; then :
- enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
-else
- SUPPORT_HEADFUL=yes
-fi
-
-
-SUPPORT_HEADLESS=yes
-BUILD_HEADLESS="BUILD_HEADLESS:=true"
-
-if test "x$SUPPORT_HEADFUL" = xyes; then
- # We are building both headful and headless.
- BUILD_HEADLESS_ONLY=""
- headful_msg="inlude support for both headful and headless"
-fi
-
-if test "x$SUPPORT_HEADFUL" = xno; then
- # Thus we are building headless only.
- BUILD_HEADLESS="BUILD_HEADLESS:=true"
- BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
- headful_msg="headless only"
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
-$as_echo "$headful_msg" >&6; }
-
-
-
-
-
-
-###############################################################################
-#
-# Check which variants of the JVM that we want to build.
-# Currently we have:
-# server: normal interpreter and a tiered C1/C2 compiler
-# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
-# kernel: kernel footprint JVM that passes the TCK without major performance problems,
-# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
-# zero: no machine code interpreter, no compiler
-# zeroshark: zero interpreter and shark/llvm compiler backend
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM that should be built" >&5
-$as_echo_n "checking which variants of the JVM that should be built... " >&6; }
-
-# Check whether --with-jvm-variants was given.
-if test "${with_jvm_variants+set}" = set; then :
- withval=$with_jvm_variants;
-fi
-
-
-if test "x$with_jvm_variants" = x; then
- if test "x$JDK_VARIANT" = xembedded; then
- with_jvm_variants="kernel"
- elif test "x$HOST_CPU_BITS" = x64; then
- with_jvm_variants="server"
- else
- # Yes, on 32-bit machines, the same source (almost) is compiled twice
- # to generate two libjvm.so files. Fun, fun.
- with_jvm_variants="client,server"
- fi
-fi
-
-JVM_VARIANTS=",$with_jvm_variants,"
-TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
-
-if test "x$TEST_VARIANTS" != "x,"; then
- as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
-$as_echo "$with_jvm_variants" >&6; }
-
-JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
-JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
-JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
-JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
-JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
-
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
- if test "x$HOST_CPU_BITS" = x64; then
- as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
- fi
-fi
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
- if test "x$HOST_CPU_BITS" = x64; then
- as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
- fi
-fi
-
-COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
-# Replace the commas with AND for use in the build directory name.
-ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
-if test "x$COUNT_VARIANTS" != "x,1"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: NOTE! Longer build time since we are building more than one version of the libjvm! $with_jvm_variants" >&5
-$as_echo "$as_me: NOTE! Longer build time since we are building more than one version of the libjvm! $with_jvm_variants" >&6;}
-fi
-
-
-
-
-
-
-
-
-###############################################################################
-#
-# Set the debug level
-# release: no debug information, all optimizations, no asserts.
-# fastdebug: debug information (-g), all optimizations, all asserts
-# slowdebug: debug information (-g), no optimizations, all asserts
-#
-DEBUG_LEVEL="release"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
-$as_echo_n "checking which debug level to use... " >&6; }
-# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
- enableval=$enable_debug;
- ENABLE_DEBUG="${enableval}"
- DEBUG_LEVEL="fastdebug"
-
-else
- ENABLE_DEBUG="no"
-fi
-
-
-
-# Check whether --with-debug-level was given.
-if test "${with_debug_level+set}" = set; then :
- withval=$with_debug_level;
- DEBUG_LEVEL="${withval}"
- if test "x$ENABLE_DEBUG" = xyes; then
- as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
- fi
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
-$as_echo "$DEBUG_LEVEL" >&6; }
-
-if test "x$DEBUG_LEVEL" != xrelease && \
- test "x$DEBUG_LEVEL" != xfastdebug && \
- test "x$DEBUG_LEVEL" != xslowdebug; then
- as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
-fi
-
-case $DEBUG_LEVEL in
- release )
- VARIANT="OPT"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="false"
- BUILD_VARIANT_RELEASE=""
- ;;
- fastdebug )
- VARIANT="DBG"
- FASTDEBUG="true"
- DEBUG_CLASSFILES="true"
- BUILD_VARIANT_RELEASE="-fastdebug"
- ;;
- slowdebug )
- VARIANT="DBG"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="true"
- BUILD_VARIANT_RELEASE="-debug"
- ;;
-esac
-
-
-
-
-
-
-
-# Source the version numbers
-. $AUTOCONF_DIR/version.numbers
-if test "x$OPENJDK" = "xfalse"; then
- . $AUTOCONF_DIR/closed.version.numbers
-fi
-# Now set the JDK version, milestone, build number etc.
-
-
-
-
-
-
-
-
-
-
-
-
-COPYRIGHT_YEAR=`date +'%Y'`
-
-
-RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
-
-
-if test "x$JDK_UPDATE_VERSION" != x; then
- JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-else
- JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-fi
-
-
-if test "x$MILESTONE" != x; then
- RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
-else
- RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
-fi
-
-
-if test "x$JDK_BUILD_NUMBER" != x; then
- FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
-else
- JDK_BUILD_NUMBER=b00
- BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
- # Avoid [:alnum:] since it depends on the locale.
- CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
- USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
-fi
-
-COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
-
-
-# Test from where we are running configure, in or outside of src root.
-if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
- # We are running configure from the src root.
- # Create a default ./build/host-variant-debuglevel output root.
- CONF_NAME="${HOST_OS}-${HOST_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
- OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
- mkdir -p "$OUTPUT_ROOT"
- if test ! -d "$OUTPUT_ROOT"; then
- as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
- fi
-else
- # We are running configure from outside of the src dir.
- # Then use the current directory as output dir!
- # If configuration is situated in normal build directory, just use the build
- # directory name as configuration name, otherwise use the complete path.
- CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
- OUTPUT_ROOT="$CURDIR"
-fi
-
-
- # Fail with message the path to the output root if var OUTPUT_ROOT contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$OUTPUT_ROOT" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$BUILD_OS" = "xwindows"; then
- OUTPUT_ROOT=`$CYGPATH -s -m -a "$OUTPUT_ROOT"`
- OUTPUT_ROOT=`$CYGPATH -u "$OUTPUT_ROOT"`
- else
- as_fn_error $? "You cannot have spaces in the path to the output root! \"$OUTPUT_ROOT\"" "$LINENO" 5
- fi
- fi
-
-
-# Save the arguments given to us
-echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
-
-# Check if the VS env variables were setup prior to running configure.
-# If not, then find vcvarsall.bat and run it automatically, and integrate
-# the set env variables into the spec file.
-SETUPDEVENV="# No special vars"
-if test "x$BUILD_OS" = "xwindows"; then
- # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
- if test "x$VCINSTALLDIR" != x; then
- # No further setup is needed. The build will happen from this kind
- # of shell.
- SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
- # Make sure to remind you, if you forget to run make from a cygwin bash shell
- # that is spawned "bash -l" from a VS command prompt.
- CHECK_FOR_VCINSTALLDIR=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are running from within a VS command prompt" >&5
-$as_echo_n "checking if you are running from within a VS command prompt... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
- if test "x$VS100COMNTOOLS" != x; then
- VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
- SEARCH_ROOT="$VS100COMNTOOLS"
- else
- VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
- SEARCH_ROOT="$PROGRAMFILES"
- fi
- VCPATH=`dirname "$VARSBAT"`
- VCPATH=`cygpath -w "$VCPATH"`
- if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
-$as_echo_n "checking if we can find the VS installation... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
- fi
- case "$LEGACY_HOST_CPU1" in
- i?86)
- VARSBAT_ARCH=x86
- ;;
- *)
- VARSBAT_ARCH=$LEGACY_HOST_CPU1
- ;;
- esac
- # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
- cd $OUTPUT_ROOT
- bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
- cd $CURDIR
- if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can extract the needed env variables" >&5
-$as_echo_n "checking if we can extract the needed env variables... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not succesfully extract the env variables needed for the VS setup. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
- fi
- # Now set all paths and other env variables. This will allow the rest of
- # the configure script to find and run the compiler in the proper way.
- . $OUTPUT_ROOT/localdevenv.sh
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
-$as_echo_n "checking if we can find the VS installation... " >&6; }
- if test "x$VCINSTALLDIR" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VCINSTALLDIR" >&5
-$as_echo "$VCINSTALLDIR" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not find VS installation. Please install. If you are sure you have installed VS, then please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
- fi
- CHECK_FOR_VCINSTALLDIR=no
- SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
-$as_echo_n "checking for msvcr100.dll... " >&6; }
-
-# Check whether --with-msvcr100dll was given.
-if test "${with_msvcr100dll+set}" = set; then :
- withval=$with_msvcr100dll;
-fi
-
- if test "x$with_msvcr100dll" != x; then
- MSVCR100DLL="$with_msvcr100dll"
- else
- if test "x$HOST_CPU_BITS" = x64; then
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
- else
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
- if test "x$MSVCR100DLL" = x; then
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
- fi
- fi
- fi
- if test "x$MSVCR100DLL" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR100DLL" >&5
-$as_echo "$MSVCR100DLL" >&6; }
-
- # Fail with message the path to msvcr100.dll if var MSVCR100DLL contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$MSVCR100DLL" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$BUILD_OS" = "xwindows"; then
- MSVCR100DLL=`$CYGPATH -s -m -a "$MSVCR100DLL"`
- MSVCR100DLL=`$CYGPATH -u "$MSVCR100DLL"`
- else
- as_fn_error $? "You cannot have spaces in the path to msvcr100.dll! \"$MSVCR100DLL\"" "$LINENO" 5
- fi
- fi
-
- fi
-fi
-
-
-
-
-# Most of the probed defines are put into config.h
-ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
-
-# The spec.gmk file contains all variables for the make system.
-ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
-
-# The generated Makefile knows where the spec.gmk is and where the source is.
-# You can run make from the OUTPUT_ROOT. If you have only
-# one configured host, then you can also run make from the SRC_ROOT,
-# since it will go look for a single spec.gmk file. Or perhaps it
-# should instead make all configured hosts it can find?
-ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
-
-
-SPEC=$OUTPUT_ROOT/spec.gmk
-
-CONF_NAME=$CONF_NAME
-
-OUTPUT_ROOT=$OUTPUT_ROOT
-
-
-# Where are the sources. Any of these can be overridden
-# using --with-override-corba and the likes.
-LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
-CORBA_TOPDIR="$SRC_ROOT/corba"
-JAXP_TOPDIR="$SRC_ROOT/jaxp"
-JAXWS_TOPDIR="$SRC_ROOT/jaxws"
-HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
-JDK_TOPDIR="$SRC_ROOT/jdk"
-
-
-
-
-
-
-
-# Check if pkg-config is available.
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
- ac_pt_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_pt_PKG_CONFIG" = x; then
- PKG_CONFIG=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- PKG_CONFIG=$ac_pt_PKG_CONFIG
- fi
-else
- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=0.9.0
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- PKG_CONFIG=""
- fi
-
-fi
-
-
-# Check whether --with-builddeps-conf was given.
-if test "${with_builddeps_conf+set}" = set; then :
- withval=$with_builddeps_conf;
-fi
-
-
-
-# Check whether --with-builddeps-server was given.
-if test "${with_builddeps_server+set}" = set; then :
- withval=$with_builddeps_server;
-fi
-
-
-
-# Check whether --with-builddeps-dir was given.
-if test "${with_builddeps_dir+set}" = set; then :
- withval=$with_builddeps_dir;
-else
- with_builddeps_dir=/localhome/builddeps
-fi
-
-
-
-# Check whether --with-builddeps-group was given.
-if test "${with_builddeps_group+set}" = set; then :
- withval=$with_builddeps_group;
-fi
-
-
-# Check whether --enable-list-builddeps was given.
-if test "${enable_list_builddeps+set}" = set; then :
- enableval=$enable_list_builddeps; LIST_BUILDDEPS="${enableval}"
-else
- LIST_BUILDDEPS='no'
-fi
-
-
-if test "x$LIST_BUILDDEPS" = xyes; then
- echo
- echo List of build dependencies known to the configure script,
- echo that can be used in builddeps.conf files:
- cat $SRC_ROOT/configure.ac | grep BDEPS_CHECK_MODUL | grep -v configure.ac | cut -f 2 -d ',' | tr -d ' ' | sort
- echo
+for file in configure.ac *.m4 ; do
+ if $TEST $file -nt generated-configure.sh; then
+ print_error_not_up_to_date
exit 1
-fi
-
-# If builddeps server or conf file is given. Setup buildeps usage.
-
-
- 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 host names that use _ instead of "-" and ".".
- # This is necessary to use them in variable names.
- build_var=`echo ${build} | tr '-' '_' | tr '.' '_'`
- host_var=`echo ${host} | tr '-' '_' | tr '.' '_'`
- # Extract rewrite information for build and host
- eval rewritten_build=\${REWRITE_${build_var}}
- if test "x$rewritten_build" = x; then
- rewritten_build=${build}
- echo Build stays the same $rewritten_build
- else
- echo Rewriting build for builddeps into $rewritten_build
- fi
- eval rewritten_host=\${REWRITE_${host_var}}
- if test "x$rewritten_host" = x; then
- rewritten_host=${host}
- echo Host stays the same $rewritten_host
- else
- echo Rewriting host for builddeps into $rewritten_host
- fi
- rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
- rewritten_host_var=`echo ${rewritten_host} | tr '-' '_' | tr '.' '_'`
- fi
- for ac_prog in 7z unzip
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$BDEPS_UNZIP"; then
- ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_BDEPS_UNZIP="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
fi
done
- done
-IFS=$as_save_IFS
-fi
-fi
-BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
-if test -n "$BDEPS_UNZIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
-$as_echo "$BDEPS_UNZIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$BDEPS_UNZIP" && break
-done
-
- if test "x$BDEPS_UNZIP" = x7z; then
- BDEPS_UNZIP="7z x"
+if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
+ # If closed source configure is available, make sure it is up-to-date as well.
+ for file in configure.ac *.m4 $conf_closed_script_dir/*.m4; do
+ if $TEST $file -nt $conf_closed_script_dir/generated-configure.sh; then
+ print_error_not_up_to_date
+ exit 1
fi
-
- for ac_prog in wget lftp ftp
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$BDEPS_FTP"; then
- ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_BDEPS_FTP="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
done
-IFS=$as_save_IFS
-fi
-fi
-BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
-if test -n "$BDEPS_FTP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
-$as_echo "$BDEPS_FTP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ # Test if open configure is newer than closed configure, if so, closed needs to
+ # be regenerated.
+ conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_script_dir/generated-configure.sh | cut -d" " -f 3`
+ conf_closed_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_closed_script_dir/generated-configure.sh | cut -d" " -f 3`
+ if $TEST $conf_open_configure_timestamp -gt $conf_closed_configure_timestamp; then
+ print_error_not_up_to_date
+ exit 1
+ fi
+
fi
+###
+### Process command-line arguments
+###
+conf_processed_arguments=
+conf_openjdk_target=
+conf_extra_cflags=
+conf_extra_cxxflags=
- test -n "$BDEPS_FTP" && break
-done
-
-
-
-###############################################################################
-#
-# Configure the development tool paths and potential sysroot.
-#
-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
-
-DEVKIT=
-SYS_ROOT=/
-
-
-# The option used to specify the target .o,.a or .so file.
-# When compiling, how to specify the to be created object file.
-CC_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created executable.
-EXE_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created dynamically linkable library.
-LD_OUT_OPTION='-o$(SPACE)'
-# When archiving, how to specify the to be create static archive for object files.
-AR_OUT_OPTION='rcs$(SPACE)'
-
-
-
-
-
-# If --build AND --host is set, then the configure script will find any
-# cross compilation tools in the PATH. Cross compilation tools
-# follows the cross compilation standard where they are prefixed with ${host}.
-# For example the binary i686-sun-solaris2.10-gcc
-# will cross compile for i686-sun-solaris2.10
-# If neither of build and host is not set, then build=host and the
-# default compiler found in the path will be used.
-# Setting only --host, does not seem to be really supported.
-# Please set both --build and --host if you want to cross compile.
-
-DEFINE_CROSS_COMPILE_ARCH=""
-HOSTCC=""
-HOSTCXX=""
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if this is a cross compile" >&5
-$as_echo_n "checking if this is a cross compile... " >&6; }
-if test "x$build_var" != "x$host_var"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, from $build_var to $host_var" >&5
-$as_echo "yes, from $build_var to $host_var" >&6; }
- # We have detected a cross compile!
- DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_HOST_CPU1"
- # Now we to find a C/C++ compiler that can build executables for the build
- # platform. We can't use the AC_PROG_CC macro, since it can only be used
- # once.
- for ac_prog in cl cc gcc
+for conf_option
do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HOSTCC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $HOSTCC in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_HOSTCC="$HOSTCC" # Let the user override the test with a path.
- ;;
+ case $conf_option in
+ --openjdk-target=*)
+ conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
+ continue ;;
+ --with-extra-cflags=*)
+ conf_extra_cflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
+ continue ;;
+ --with-extra-cxxflags=*)
+ conf_extra_cxxflags=`expr "X$conf_option" : '[^=]*=\(.*\)'`
+ continue ;;
*)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_HOSTCC="$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
-HOSTCC=$ac_cv_path_HOSTCC
-if test -n "$HOSTCC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTCC" >&5
-$as_echo "$HOSTCC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$HOSTCC" && break
-done
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$HOSTCC"
- car="${tmp%% *}"
- tmp="$HOSTCC EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- HOSTCC="$car ${cdr% *}"
- else
- HOSTCC="$car"
- fi
-
- for ac_prog in cl CC g++
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_HOSTCXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $HOSTCXX in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_HOSTCXX="$HOSTCXX" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_HOSTCXX="$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
-HOSTCXX=$ac_cv_path_HOSTCXX
-if test -n "$HOSTCXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTCXX" >&5
-$as_echo "$HOSTCXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$HOSTCXX" && break
-done
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$HOSTCXX"
- car="${tmp%% *}"
- tmp="$HOSTCXX EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- HOSTCXX="$car ${cdr% *}"
- else
- HOSTCXX="$car"
- fi
-
- # Building for the build platform should be easy. Therefore
- # we do not need any linkers or assemblers etc.
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-# You can force the sys-root if the sys-root encoded into the cross compiler tools
-# is not correct.
-
-# Check whether --with-sys-root was given.
-if test "${with_sys_root+set}" = set; then :
- withval=$with_sys_root;
-fi
-
-
-if test "x$with_sys_root" != x; then
- SYS_ROOT=$with_sys_root
-fi
-
-# If a devkit is found on the builddeps server, then prepend its path to the
-# PATH variable. If there are cross compilers available in the devkit, these
-# will be found by AC_PROG_CC et al.
-
-
- 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 host and build machine specific resource!
- eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a host specific resource
- eval resource=\${builddep_devkit_HOST_${rewritten_host_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The devkit comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_devkit}
- fi
- if test "x$resource" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
-$as_echo "$as_me: Using builddeps $resource for devkit" >&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
-
-# devkit 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 devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency devkit 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/devkit.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_devkit_ROOT}
- thecflags=${builddep_devkit_CFLAGS}
- thelibs=${builddep_devkit_LIBS}
- if test "x$depdir" = x; then
- as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
- fi
- DEVKIT=$depdir
- if test "x$theroot" != x; then
- DEVKIT="$theroot"
- fi
- if test "x$thecflags" != x; then
- DEVKIT_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- DEVKIT_LIBS="$thelibs"
- fi
- # Found devkit
- PATH="$DEVKIT/bin:$PATH"
- SYS_ROOT="$DEVKIT/${rewritten_host}/sys-root"
- if test "x$x_includes" = "xNONE"; then
- x_includes="$SYS_ROOT/usr/include/X11"
- fi
- if test "x$x_libraries" = "xNONE"; then
- x_libraries="$SYS_ROOT/usr/lib"
- fi
-
-
- fi
-
- fi
-
-
-if test "x$SYS_ROOT" != "x/" ; then
- CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
- CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
- OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
- OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
- CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
- LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
-fi
-
-# Store the CFLAGS etal passed to the configure script.
-ORG_CFLAGS="$CFLAGS"
-ORG_CXXFLAGS="$CXXFLAGS"
-ORG_OBJCFLAGS="$OBJCFLAGS"
-
-prepare_help_system
-
-# gcc is almost always present, but on Windows we
-# prefer cl.exe and on Solaris we prefer CC.
-# Thus test for them in this order.
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- for ac_prog in cl cc gcc
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl cc gcc
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then :
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-#include
-#include
-#include
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-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
-
-if test "x$CC" = x; then
- help_on_build_dependency devkit
- as_fn_error $? "Could not find a compiler. $HELP_MSG" "$LINENO" 5
-fi
-if test "x$CC" = xcc && test "x$BUILD_OS" = xmacosx; then
- # Do not use cc on MacOSX use gcc instead.
- CC="gcc"
-fi
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$CC"
- car="${tmp%% *}"
- tmp="$CC EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- CC="$car ${cdr% *}"
- else
- CC="$car"
- fi
-
-
-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
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl CC g++
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in cl CC g++
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CXX" && break
-done
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-fi
-
- fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GXX=yes
-else
- GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-else
- CXXFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-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
-
-if test "x$CXX" = xCC && test "x$BUILD_OS" = xmacosx; then
- # The found CC, even though it seems to be a g++ derivate, cannot compile
- # c++ code. Override.
- CXX="g++"
-fi
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$CXX"
- car="${tmp%% *}"
- tmp="$CXX EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- CXX="$car ${cdr% *}"
- else
- CXX="$car"
- fi
-
-
-if test "x$CXX" = x || test "x$CC" = x; then
- help_on_build_dependency devkit
- as_fn_error $? "Could not find the needed compilers! $HELP_MSG " "$LINENO" 5
-fi
-
-if test "x$BUILD_OS" != xwindows; then
- ac_ext=m
-ac_cpp='$OBJCPP $CPPFLAGS'
-ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_objc_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- for ac_prog in gcc objcc objc cc CC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJC"; then
- ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJC=$ac_cv_prog_OBJC
-if test -n "$OBJC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
-$as_echo "$OBJC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$OBJC" && break
- done
-fi
-if test -z "$OBJC"; then
- ac_ct_OBJC=$OBJC
- for ac_prog in gcc objcc objc cc CC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJC"; then
- ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
-if test -n "$ac_ct_OBJC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
-$as_echo "$ac_ct_OBJC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_OBJC" && break
-done
-
- if test "x$ac_ct_OBJC" = x; then
- OBJC="gcc"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJC=$ac_ct_OBJC
- fi
-fi
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
-$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
-if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_objc_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_objc_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
-$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GOBJC=yes
-else
- GOBJC=
-fi
-ac_test_OBJCFLAGS=${OBJCFLAGS+set}
-ac_save_OBJCFLAGS=$OBJCFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
-$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
-if test "${ac_cv_prog_objc_g+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_save_objc_werror_flag=$ac_objc_werror_flag
- ac_objc_werror_flag=yes
- ac_cv_prog_objc_g=no
- OBJCFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_objc_try_compile "$LINENO"; then :
- ac_cv_prog_objc_g=yes
-else
- OBJCFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_objc_try_compile "$LINENO"; then :
-
-else
- ac_objc_werror_flag=$ac_save_objc_werror_flag
- OBJCFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_objc_try_compile "$LINENO"; then :
- ac_cv_prog_objc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_objc_werror_flag=$ac_save_objc_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
-$as_echo "$ac_cv_prog_objc_g" >&6; }
-if test "$ac_test_OBJCFLAGS" = set; then
- OBJCFLAGS=$ac_save_OBJCFLAGS
-elif test $ac_cv_prog_objc_g = yes; then
- if test "$GOBJC" = yes; then
- OBJCFLAGS="-g -O2"
- else
- OBJCFLAGS="-g"
- fi
-else
- if test "$GOBJC" = yes; then
- OBJCFLAGS="-O2"
- else
- OBJCFLAGS=
- fi
-fi
-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
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$OBJC"
- car="${tmp%% *}"
- tmp="$OBJC EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- OBJC="$car ${cdr% *}"
- else
- OBJC="$car"
- fi
-
-else
- OBJC=
-fi
-
-# Restore the flags to the user specified values.
-# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
-CFLAGS="$ORG_CFLAGS"
-CXXFLAGS="$ORG_CXXFLAGS"
-OBJCFLAGS="$ORG_OBJCFLAGS"
-
-# If we are not cross compiling, use the same compilers for
-# building the build platform executables.
-if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
- HOSTCC="$CC"
- HOSTCXX="$CXX"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ld; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- $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
-LD=$ac_cv_prog_LD
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LD"; then
- ac_ct_LD=$LD
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_LD"; then
- ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_LD="ld"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LD=$ac_cv_prog_ac_ct_LD
-if test -n "$ac_ct_LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
-$as_echo "$ac_ct_LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_LD" = x; then
- LD=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- LD=$ac_ct_LD
- fi
-else
- LD="$ac_cv_prog_LD"
-fi
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$LD"
- car="${tmp%% *}"
- tmp="$LD EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- LD="$car ${cdr% *}"
- else
- LD="$car"
- fi
-
-LD="$CC"
-LDEXE="$CC"
-LDCXX="$CXX"
-LDEXECXX="$CXX"
-# LDEXE is the linker to use, when creating executables.
-
-# Linking C++ libraries.
-
-# Linking C++ executables.
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- $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
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AR" = x; then
- AR=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-else
- AR="$ac_cv_prog_AR"
-fi
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$AR"
- car="${tmp%% *}"
- tmp="$AR EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- AR="$car ${cdr% *}"
- else
- AR="$car"
- fi
-
-if test "x$BUILD_OS" = xmacosx; then
- ARFLAGS="-r"
-else
- ARFLAGS=""
-fi
-
-
-COMPILER_NAME=gcc
-COMPILER_TYPE=CC
-if test "x$BUILD_OS" = xwindows; then :
-
- # For now, assume that we are always compiling using cl.exe.
- CC_OUT_OPTION=-Fo
- EXE_OUT_OPTION=-out:
- LD_OUT_OPTION=-out:
- AR_OUT_OPTION=-out:
- # On Windows, reject /usr/bin/link, which is a cygwin
- # program for something completely different.
- # Extract the first word of "link", so it can be a program name with args.
-set dummy link; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_WINLD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$WINLD"; then
- ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/link"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_WINLD="link"
- $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
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_WINLD
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set WINLD to just the basename; use the full file name.
- shift
- ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-WINLD=$ac_cv_prog_WINLD
-if test -n "$WINLD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
-$as_echo "$WINLD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- # Since we must ignore the first found link, WINLD will contain
- # the full path to the link.exe program.
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$WINLD"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$WINLD"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- WINLD="$tmp"
-
- LD="$WINLD"
- LDEXE="$WINLD"
- LDCXX="$WINLD"
- LDEXECXX="$WINLD"
-
- # Extract the first word of "mt", so it can be a program name with args.
-set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_MT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$MT"; then
- ac_cv_prog_MT="$MT" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_MT="mt"
- $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
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_MT
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set MT to just the basename; use the full file name.
- shift
- ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-MT=$ac_cv_prog_MT
-if test -n "$MT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
-$as_echo "$MT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$MT"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$MT"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- MT="$tmp"
-
- # The resource compiler
- # Extract the first word of "rc", so it can be a program name with args.
-set dummy rc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RC+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RC"; then
- ac_cv_prog_RC="$RC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_RC="rc"
- $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
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_RC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set RC to just the basename; use the full file name.
- shift
- ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-RC=$ac_cv_prog_RC
-if test -n "$RC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
-$as_echo "$RC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$RC"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$RC"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- RC="$tmp"
-
-
- RC_FLAGS="-nologo /l 0x409 /r"
- if test "x$VARIANT" = xOPT; then :
-
- RC_FLAGS="$RC_FLAGS -d NDEBUG"
-
-fi
- JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
- if test "x$JDK_UPDATE_VERSION" = x; then :
-
- JDK_UPDATE_VERSION_NOTNULL=0
-
-fi
- RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
-
- # lib.exe is used to create static libraries.
- # Extract the first word of "lib", so it can be a program name with args.
-set dummy lib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_WINAR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$WINAR"; then
- ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_WINAR="lib"
- $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
-WINAR=$ac_cv_prog_WINAR
-if test -n "$WINAR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
-$as_echo "$WINAR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$WINAR"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$WINAR"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- WINAR="$tmp"
-
- AR="$WINAR"
- ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
-
- # Extract the first word of "dumpbin", so it can be a program name with args.
-set dummy dumpbin; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DUMPBIN="dumpbin"
- $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
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$DUMPBIN"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$DUMPBIN"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- DUMPBIN="$tmp"
-
-
- COMPILER_TYPE=CL
- CCXXFLAGS="$CCXXFLAGS -nologo"
- LDFLAGS="$LDFLAGS -nologo -opt:ref -incremental:no"
- if test "x$LEGACY_HOST_CPU1" = xi586; then
- LDFLAGS="$LDFLAGS -safeseh"
- fi
- # TODO: make -debug optional "--disable-full-debug-symbols"
- LDFLAGS="$LDFLAGS -debug"
-
-fi
-
-
-
-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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-
-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
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$CPP"
- car="${tmp%% *}"
- tmp="$CPP EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- CPP="$car ${cdr% *}"
- else
- CPP="$car"
- fi
-
-
-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}: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CXXCPP needs to be expanded
- for CXXCPP in "$CXX -E" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
- Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
- CXXCPP=$ac_cv_prog_CXXCPP
-else
- ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer to if __STDC__ is defined, since
- # exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include
-#else
-# include
-#endif
- Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
-fi
-
-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
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$CXXCPP"
- car="${tmp%% *}"
- tmp="$CXXCPP EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- CXXCPP="$car ${cdr% *}"
- else
- CXXCPP="$car"
- fi
-
-
-# Find the right assembler.
-if test "x$BUILD_OS" = xsolaris; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_AS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $AS in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_AS="$AS" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_AS="$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
-AS=$ac_cv_path_AS
-if test -n "$AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
-$as_echo "$AS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$AS"
- car="${tmp%% *}"
- tmp="$AS EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- AS="$car ${cdr% *}"
- else
- AS="$car"
- fi
-
- ASFLAGS=" "
-else
- AS="$CC -c"
- ASFLAGS=" "
-fi
-
-
-
-if test "x$HOST_CPU_BITS" = x32 && test "x$HOST_OS" = xmacosx; then
- # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
- # While waiting for a better solution, the current workaround is to use -mstackrealign.
- CFLAGS="$CFLAGS -mstackrealign"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
-$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int main() { return 0; }
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
-if test "x$BUILD_OS" = xsolaris; then
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $NM in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_NM="$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
-NM=$ac_cv_path_NM
-if test -n "$NM"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
-$as_echo "$NM" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$NM"
- car="${tmp%% *}"
- tmp="$NM EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- NM="$car ${cdr% *}"
- else
- NM="$car"
- fi
-
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $STRIP in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_STRIP="$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
-STRIP=$ac_cv_path_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$STRIP"
- car="${tmp%% *}"
- tmp="$STRIP EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- STRIP="$car ${cdr% *}"
- else
- STRIP="$car"
- fi
-
- # Extract the first word of "mcs", so it can be a program name with args.
-set dummy mcs; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MCS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MCS in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_MCS="$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
-MCS=$ac_cv_path_MCS
-if test -n "$MCS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
-$as_echo "$MCS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$MCS"
- car="${tmp%% *}"
- tmp="$MCS EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- MCS="$car ${cdr% *}"
- else
- MCS="$car"
- fi
-
-else
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nm; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NM"; then
- ac_cv_prog_NM="$NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_NM="${ac_tool_prefix}nm"
- $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
-NM=$ac_cv_prog_NM
-if test -n "$NM"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
-$as_echo "$NM" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NM"; then
- ac_ct_NM=$NM
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_NM"; then
- ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_NM="nm"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NM=$ac_cv_prog_ac_ct_NM
-if test -n "$ac_ct_NM"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
-$as_echo "$ac_ct_NM" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_NM" = x; then
- NM=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- NM=$ac_ct_NM
- fi
-else
- NM="$ac_cv_prog_NM"
-fi
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$NM"
- car="${tmp%% *}"
- tmp="$NM EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- NM="$car ${cdr% *}"
- else
- NM="$car"
- fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- $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
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="$STRIP"
- car="${tmp%% *}"
- tmp="$STRIP EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$car"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$car"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- car="$tmp"
-
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- STRIP="$car ${cdr% *}"
- else
- STRIP="$car"
- fi
-
-fi
-
-# When using cygwin, we need a wrapper binary that renames
-# /cygdrive/c/ arguments into c:/ arguments and peeks into
-# @files and rewrites these too! This wrapper binary is
-# called uncygdrive.exe.
-UNCYGDRIVE=
-if test "x$BUILD_OS" = xwindows; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive can be created" >&5
-$as_echo_n "checking if uncygdrive can be created... " >&6; }
- UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
- rm -f $OUTPUT_ROOT/uncygdrive*
- UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
- cd $OUTPUT_ROOT
- $CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
- cd $CURDIR
-
- if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- cat $OUTPUT_ROOT/uncygdrive1.log
- as_fn_error $? "Could not create $OUTPUT_ROOT/uncygdrive.exe" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNCYGDRIVE" >&5
-$as_echo "$UNCYGDRIVE" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive.exe works" >&5
-$as_echo_n "checking if uncygdrive.exe works... " >&6; }
- cd $OUTPUT_ROOT
- $UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
- cd $CURDIR
- if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- cat $OUTPUT_ROOT/uncygdrive2.log
- as_fn_error $? "Uncygdrive did not work!" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
-fi
-
-
-
-
- # Check whether --enable-ccache was given.
-if test "${enable_ccache+set}" = set; then :
- enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
-else
- ENABLE_CCACHE=yes
-fi
-
- if test "x$ENABLE_CCACHE" = xyes; then
- # Extract the first word of "ccache", so it can be a program name with args.
-set dummy ccache; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CCACHE+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CCACHE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CCACHE="$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
-CCACHE=$ac_cv_path_CCACHE
-if test -n "$CCACHE"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
-$as_echo "$CCACHE" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- else
- { $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: explicitly disabled" >&5
-$as_echo "explicitly disabled" >&6; }
- CCACHE=
- fi
-
-
-
-# Check whether --with-ccache-dir was given.
-if test "${with_ccache_dir+set}" = set; then :
- withval=$with_ccache_dir;
-fi
-
-
- if test "x$with_ccache_dir" != x; then
- # When using a non home ccache directory, assume the use is to share ccache files
- # with other users. Thus change the umask.
- SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
- fi
- CCACHE_FOUND=""
- if test "x$CCACHE" != x; then
-
- if test "x$CCACHE" != x; then
- CCACHE_FOUND="true"
- # Only use ccache if it is 3.1.4 or later, which supports
- # precompiled headers.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
-$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
- HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
- if test "x$HAS_GOOD_CCACHE" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
-$as_echo "no, disabling ccache" >&6; }
- CCACHE=
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
-$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
- PUSHED_FLAGS="$CXXFLAGS"
- CXXFLAGS="-fpch-preprocess $CXXFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- CC_KNOWS_CCACHE_TRICK=yes
-else
- CC_KNOWS_CCACHE_TRICK=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CXXFLAGS="$PUSHED_FLAGS"
- if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
-$as_echo "no, disabling ccaching of precompiled headers" >&6; }
- CCACHE=
- fi
- fi
- fi
-
- if test "x$CCACHE" != x; then
- CCACHE_SLOPPINESS=time_macros
- CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
- CCACHE_FLAGS=-fpch-preprocess
-
- if test "x$SET_CCACHE_DIR" != x; then
- mkdir -p $CCACHE_DIR > /dev/null 2>&1
- chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
- fi
- fi
-
- fi
-
-
-# Used on GNU/Linux systems, can be empty...
-#AC_PATH_PROG(ELFDUMP, elfdump)
-
-# Setup default logging of stdout and stderr to build.log in the output root.
-BUILD_LOG='$(OUTPUT_ROOT)/build.log'
-BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
-
-
-
-###############################################################################
-#
-# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
-# (The JVM can use 32 or 64 bit Java pointers but that decision
-# is made at runtime.)
-#
-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"
-if test "x$HOST_OS" = xsolaris && test "x$with_data_model" != x; then
- CXXFLAGS="-m{$with_data_model} $CXXFLAGS"
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-#include
-#include
-#include
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-#include
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
-$as_echo_n "checking size of int *... " >&6; }
-if test "${ac_cv_sizeof_int_p+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_int_p" = yes; 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 77 "cannot compute sizeof (int *)
-See \`config.log' for more details" "$LINENO" 5 ; }
- else
- ac_cv_sizeof_int_p=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
-$as_echo "$ac_cv_sizeof_int_p" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT_P $ac_cv_sizeof_int_p
-_ACEOF
-
-
-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
-
-
-if test "x$ac_cv_sizeof_int_p" = x0; then
- # The test failed, lets pick the assumed value.
- ARCH_DATA_MODEL=$HOST_CPU_BITS
-else
- ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
-fi
-
-if test "x$ARCH_DATA_MODEL" = x64; then
- A_LP64="LP64:="
- ADD_LP64="-D_LP64=1"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for host address size" >&5
-$as_echo_n "checking for host address size... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH_DATA_MODEL bits" >&5
-$as_echo "$ARCH_DATA_MODEL bits" >&6; }
-LP64=$A_LP64
-
-
-
-if test "x$ARCH_DATA_MODEL" != "x$HOST_CPU_BITS"; then
- as_fn_error $? "The tested number of bits in the host ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the host ($HOST_CPU_BITS)" "$LINENO" 5
-fi
-
-###############################################################################
-#
-# Can the C/C++ compiler use precompiled headers?
-#
-# Check whether --enable-precompiled-headers was given.
-if test "${enable_precompiled_headers+set}" = set; then :
- enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
-else
- ENABLE_PRECOMPH=yes
-fi
-
-
-USE_PRECOMPILED_HEADER=1
-if test "x$ENABLE_PRECOMPH" = xno; then
- USE_PRECOMPILED_HEADER=0
-fi
-
-if test "x$ENABLE_PRECOMPH" = xyes; then
- # Check that the compiler actually supports precomp headers.
- if test "x$GCC" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
-$as_echo_n "checking that precompiled headers work... " >&6; }
- echo "int alfa();" > conftest.h
- $CXX -x c++-header conftest.h -o conftest.hpp.gch
- if test ! -f conftest.hpp.gch; then
- echo Precompiled header is not working!
- USE_PRECOMPILED_HEADER=0
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- rm -f conftest.h
- fi
-fi
-
-
-
-###############################################################################
-#
-# How to compile shared libraries.
-#
-
-if test "x$GCC" = xyes; then
- COMPILER_NAME=gcc
- PICFLAG="-fPIC"
- LIBRARY_PREFIX=lib
- SHARED_LIBRARY='lib$1.so'
- STATIC_LIBRARY='lib$1.a'
- SHARED_LIBRARY_FLAGS="-shared"
- SHARED_LIBRARY_SUFFIX='.so'
- STATIC_LIBRARY_SUFFIX='.a'
- OBJ_SUFFIX='.o'
- EXE_SUFFIX=''
- SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
- SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
- SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/$1'
- LD="$CC"
- LDEXE="$CC"
- LDCXX="$CXX"
- LDEXECXX="$CXX"
- # TODO: for embedded set --strip-unneeded
- POST_STRIP_CMD="$STRIP -g"
-
- # Linking is different on MacOSX
- if test "x$BUILD_OS" = xmacosx; then
- # Might change in the future to clang.
- COMPILER_NAME=gcc
- SHARED_LIBRARY='lib$1.dylib'
- SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
- SHARED_LIBRARY_SUFFIX='.dylib'
- EXE_SUFFIX=''
- SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
- SET_SHARED_LIBRARY_MAPFILE=''
- SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
- POST_STRIP_CMD="$STRIP -S"
- fi
-else
- if test "x$BUILD_OS" = xsolaris; then
- # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
- COMPILER_NAME=ossc
- PICFLAG="-KPIC"
- LIBRARY_PREFIX=lib
- SHARED_LIBRARY='lib$1.so'
- STATIC_LIBRARY='lib$1.a'
- SHARED_LIBRARY_FLAGS="-G"
- SHARED_LIBRARY_SUFFIX='.so'
- STATIC_LIBRARY_SUFFIX='.a'
- OBJ_SUFFIX='.o'
- EXE_SUFFIX=''
- SET_SHARED_LIBRARY_NAME=''
- SET_SHARED_LIBRARY_MAPFILE='-M $1'
- C_FLAG_REORDER='-xF'
- CXX_FLAG_REORDER='-xF'
- SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/$1'
- CFLAGS_JDKLIB_EXTRA='-xstrconst -D__solaris__'
- POST_STRIP_CMD="$STRIP -x"
- POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
- fi
- if test "x$BUILD_OS" = xwindows; then
- # If it is not gcc, then assume it is the MS Visual Studio compiler
- COMPILER_NAME=cl
- PICFLAG=""
- LIBRARY_PREFIX=
- SHARED_LIBRARY='$1.dll'
- STATIC_LIBRARY='$1.lib'
- SHARED_LIBRARY_FLAGS="-LD"
- SHARED_LIBRARY_SUFFIX='.dll'
- STATIC_LIBRARY_SUFFIX='.lib'
- OBJ_SUFFIX='.obj'
- EXE_SUFFIX='.exe'
- SET_SHARED_LIBRARY_NAME=''
- SET_SHARED_LIBRARY_MAPFILE=''
- SET_SHARED_LIBRARY_ORIGIN=''
- fi
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# The (cross) compiler is now configured, we can now test capabilities
-# of the host platform.
-
-###############################################################################
-#
-# Is the host little of big endian?
-#
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_c_bigendian=unknown
- # See if we're dealing with a universal compiler.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifndef __APPLE_CC__
- not a universal capable compiler
- #endif
- typedef int dummy;
-
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
- # Check for potential -arch flags. It is not universal unless
- # there are at least two -arch flags with different values.
- ac_arch=
- ac_prev=
- for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
- if test -n "$ac_prev"; then
- case $ac_word in
- i?86 | x86_64 | ppc | ppc64)
- if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
- ac_arch=$ac_word
- else
- ac_cv_c_bigendian=universal
- break
- fi
- ;;
- esac
- ac_prev=
- elif test "x$ac_word" = "x-arch"; then
- ac_prev=arch
- fi
- done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test $ac_cv_c_bigendian = unknown; then
- # See if sys/param.h defines the BYTE_ORDER macro.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
- #include
-
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
- && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
- && LITTLE_ENDIAN)
- bogus endian macros
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- # It does; now see whether it defined to BIG_ENDIAN or not.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
- #include
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_c_bigendian=yes
-else
- ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test $ac_cv_c_bigendian = unknown; then
- # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
- bogus endian macros
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- # It does; now see whether it defined to _BIG_ENDIAN or not.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-int
-main ()
-{
-#ifndef _BIG_ENDIAN
- not big endian
- #endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- ac_cv_c_bigendian=yes
-else
- ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- if test $ac_cv_c_bigendian = unknown; then
- # Compile a test program.
- if test "$cross_compiling" = yes; then :
- # Try to guess by grepping values from an object file.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-short int ascii_mm[] =
- { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
- short int ascii_ii[] =
- { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
- int use_ascii (int i) {
- return ascii_mm[i] + ascii_ii[i];
- }
- short int ebcdic_ii[] =
- { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
- short int ebcdic_mm[] =
- { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
- int use_ebcdic (int i) {
- return ebcdic_mm[i] + ebcdic_ii[i];
- }
- extern int foo;
-
-int
-main ()
-{
-return use_ascii (foo) == use_ebcdic (foo);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
- ac_cv_c_bigendian=yes
- fi
- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
- fi
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
- u.l = 1;
- return u.c[sizeof (long int) - 1] == 1;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_run "$LINENO"; then :
- ac_cv_c_bigendian=no
-else
- ac_cv_c_bigendian=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
- yes)
- ENDIAN="big";; #(
- no)
- ENDIAN="little" ;; #(
- universal)
- ENDIAN="universal"
- ;; #(
- *)
- ENDIAN="unknown" ;;
- esac
-
-
-if test "x$ENDIAN" = xuniversal; then
- as_fn_error $? "It seems like someone needs to decide how we are to deal with universal binaries on the MacOSX?" "$LINENO" 5
-fi
-if test "x$ENDIAN" = xunknown; then
- ENDIAN="$HOST_CPU_ENDIAN"
-fi
-if test "x$ENDIAN" != "x$HOST_CPU_ENDIAN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The tested endian in the host ($ENDIAN) differs from the endian expected to be found in the host ($HOST_CPU_ENDIAN)" >&5
-$as_echo "$as_me: WARNING: The tested endian in the host ($ENDIAN) differs from the endian expected to be found in the host ($HOST_CPU_ENDIAN)" >&2;}
- ENDIAN="$HOST_CPU_ENDIAN"
-fi
-
-
-###############################################################################
-#
-# We need a Boot JDK to bootstrap the build.
-#
-BOOT_JDK_FOUND=no
-
-# Check whether --with-boot-jdk was given.
-if test "${with_boot_jdk+set}" = set; then :
- withval=$with_boot_jdk;
-fi
-
-
-if test "x$with_boot_jdk" != x; then
- BOOT_JDK=$with_boot_jdk
- BOOT_JDK_FOUND=yes
-fi
-if test "x$BOOT_JDK_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 host and build machine specific resource!
- eval resource=\${builddep_boot-jdk_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a host specific resource
- eval resource=\${builddep_boot-jdk_HOST_${rewritten_host_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_boot-jdk_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The boot-jdk comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_boot-jdk}
- fi
- if test "x$resource" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for boot-jdk" >&5
-$as_echo "$as_me: Using builddeps $resource for boot-jdk" >&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
-
-# boot-jdk 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 boot-jdk from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency boot-jdk 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/boot-jdk.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_boot-jdk_ROOT}
- thecflags=${builddep_boot-jdk_CFLAGS}
- thelibs=${builddep_boot-jdk_LIBS}
- if test "x$depdir" = x; then
- as_fn_error $? "Could not download build dependency boot-jdk" "$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=yes
- else BOOT_JDK_FOUND=no
-
- fi
- else BOOT_JDK_FOUND=no
-
- fi
-
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
- if test "x$JAVA_HOME" != x; then
- if test ! -d "$JAVA_HOME"; then
- as_fn_error $? "Your JAVA_HOME points to a non-existing directory!" "$LINENO" 5
- fi
- # Aha, the user has set a JAVA_HOME
- # let us use that as the Boot JDK.
- BOOT_JDK="$JAVA_HOME"
- BOOT_JDK_FOUND=yes
- # To be on the safe side, lets check that it is a JDK.
- if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
- JAVAC="$BOOT_JDK/bin/javac"
- JAVA="$BOOT_JDK/bin/java"
- BOOT_JDK_FOUND=yes
- else
- as_fn_error $? "Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=$JAVA_HOME" "$LINENO" 5
- fi
- fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
- # Extract the first word of "javac", so it can be a program name with args.
-set dummy javac; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $JAVAC_CHECK in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_JAVAC_CHECK="$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
-JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
-if test -n "$JAVAC_CHECK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
-$as_echo "$JAVAC_CHECK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- # Extract the first word of "java", so it can be a program name with args.
-set dummy java; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $JAVA_CHECK in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_JAVA_CHECK="$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
-JAVA_CHECK=$ac_cv_path_JAVA_CHECK
-if test -n "$JAVA_CHECK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
-$as_echo "$JAVA_CHECK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- BINARY="$JAVAC_CHECK"
- if test "x$JAVAC_CHECK" = x; then
- BINARY="$JAVA_CHECK"
- fi
- if test "x$BINARY" != x; then
- # So there is a java(c) binary, it might be part of a JDK.
- # Lets find the JDK/JRE directory by following symbolic links.
- # Linux/GNU systems often have links from /usr/bin/java to
- # /etc/alternatives/java to the real JDK binary.
-
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="$BINARY"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "$BINARY"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- BINARY="$tmp"
-
-
- if test "x$BUILD_OS" != xwindows; then
- # Follow a chain of symbolic links. Use readlink
- # where it exists, else fall back to horribly
- # complicated shell code.
- # Extract the first word of "readlink", so it can be a program name with args.
-set dummy readlink; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_READLINK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $READLINK in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-READLINK=$ac_cv_path_READLINK
-if test -n "$READLINK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
-$as_echo "$READLINK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test "x$READLINK_TESTED" != yes; then
- # On MacOSX there is a readlink tool with a different
- # purpose than the GNU readlink tool. Check the found readlink.
- ISGNU=`$READLINK --help 2>&1 | grep GNU`
- if test "x$ISGNU" = x; then
- # A readlink that we do not know how to use.
- # Are there other non-GNU readlinks out there?
- READLINK_TESTED=yes
- READLINK=
- fi
- fi
-
- if test "x$READLINK" != x; then
- BINARY=`$READLINK -f $BINARY`
- else
- STARTDIR=$PWD
- COUNTER=0
- DIR=`dirname $BINARY`
- FIL=`basename $BINARY`
- while test $COUNTER -lt 20; do
- ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
- if test "x$ISLINK" == x; then
- # This is not a symbolic link! We are done!
- break
- fi
- # The link might be relative! We have to use cd to travel safely.
- cd $DIR
- cd `dirname $ISLINK`
- DIR=`pwd`
- FIL=`basename $ISLINK`
- let COUNTER=COUNTER+1
- done
- cd $STARTDIR
- BINARY=$DIR/$FIL
- fi
- fi
-
- BOOT_JDK=`dirname $BINARY`
- BOOT_JDK=`cd $BOOT_JDK/..; pwd`
- if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
- JAVAC=$BOOT_JDK/bin/javac
- JAVA=$BOOT_JDK/bin/java
- BOOT_JDK_FOUND=yes
- fi
- fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
- # Try the MacOSX way.
- if test -x /usr/libexec/java_home; then
- BOOT_JDK=`/usr/libexec/java_home`
- if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
- JAVAC=$BOOT_JDK/bin/javac
- JAVA=$BOOT_JDK/bin/java
- BOOT_JDK_FOUND=yes
- fi
- fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
- # Extract the first word of "java", so it can be a program name with args.
-set dummy java; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $JAVA_CHECK in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_JAVA_CHECK="$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
-JAVA_CHECK=$ac_cv_path_JAVA_CHECK
-if test -n "$JAVA_CHECK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
-$as_echo "$JAVA_CHECK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test "x$JAVA_CHECK" != x; then
- # There is a java in the path. But apparently we have not found a javac
- # in the path, since that would have been tested earlier.
- if test "x$HOST_OS" = xwindows; then
- # Now if this is a windows platform. The default installation of a JDK
- # actually puts the JRE in the path and keeps the JDK out of the path!
- # Go look in the default installation location.
- BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=yes
- fi
- fi
- if test "x$BOOT_JDK_FOUND" = xno; then
- help_on_build_dependency openjdk
- as_fn_error $? "Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG" "$LINENO" 5
- fi
- else
- help_on_build_dependency openjdk
- as_fn_error $? "Could not find a JDK. $HELP_MSG" "$LINENO" 5
- fi
-fi
-
-
- if test "x$BUILD_OS" = "xwindows"; then
- # Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CYGPATH+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $CYGPATH in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-CYGPATH=$ac_cv_path_CYGPATH
-if test -n "$CYGPATH"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
-$as_echo "$CYGPATH" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- tmp="$BOOT_JDK"
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- BOOT_JDK="$tmp"
- fi
-
-
-# Now see if we can find the rt.jar, or its nearest equivalent.
-BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
-
- # Fail with message the path to the Boot JDK rt.jar (or nearest equivalent) if var BOOT_RTJAR contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_RTJAR" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$BUILD_OS" = "xwindows"; then
- BOOT_RTJAR=`$CYGPATH -s -m -a "$BOOT_RTJAR"`
- BOOT_RTJAR=`$CYGPATH -u "$BOOT_RTJAR"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK rt.jar (or nearest equivalent)! \"$BOOT_RTJAR\"" "$LINENO" 5
- fi
- fi
-
-
-BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
-
- # Fail with message the path to the Boot JDK tools.jar (or nearest equivalent) if var BOOT_TOOLSJAR contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$BOOT_TOOLSJAR" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$BUILD_OS" = "xwindows"; then
- BOOT_TOOLSJAR=`$CYGPATH -s -m -a "$BOOT_TOOLSJAR"`
- BOOT_TOOLSJAR=`$CYGPATH -u "$BOOT_TOOLSJAR"`
- else
- as_fn_error $? "You cannot have spaces in the path to the Boot JDK tools.jar (or nearest equivalent)! \"$BOOT_TOOLSJAR\"" "$LINENO" 5
- fi
- fi
-
-
-if test ! -f $BOOT_RTJAR; then
- # On MacOSX it is called classes.jar
- BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
- if test ! -f $BOOT_RTJAR; then
- as_fn_error $? "Cannot find the rt.jar or its equivalent!" "$LINENO" 5
- fi
- # Remove the ..
- BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
- # The tools.jar is part of classes.jar
- BOOT_TOOLSJAR="$BOOT_RTJAR"
-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 for Boot rt.jar" >&5
-$as_echo_n "checking for Boot rt.jar... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_RTJAR" >&5
-$as_echo "$BOOT_RTJAR" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot tools.jar" >&5
-$as_echo_n "checking for Boot tools.jar... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_TOOLSJAR" >&5
-$as_echo "$BOOT_TOOLSJAR" >&6; }
-
-# Use the java tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
-$as_echo_n "checking for java in Boot JDK... " >&6; }
-JAVA=$BOOT_JDK/bin/java
-if test ! -x $JAVA; then
- as_fn_error $? "Could not find a working java" "$LINENO" 5
-fi
-BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes $BOOT_JDK_VERSION" >&5
-$as_echo "yes $BOOT_JDK_VERSION" >&6; }
-
-
-# Extra M4 quote needed to protect [] in grep expression.
-FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
-if test "x$FOUND_VERSION_78" = x; then
- help_on_build_dependency openjdk
- as_fn_error $? "Your boot-jdk must be version 7 or 8. $HELP_MSG" "$LINENO" 5
-fi
-
-# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
-BOOT_JDK_SOURCETARGET="-source 7 -target 7"
-
-
-# Use the javac tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
-$as_echo_n "checking for javac in Boot JDK... " >&6; }
-JAVAC=$BOOT_JDK/bin/javac
-if test ! -x $JAVAC; then
- as_fn_error $? "Could not find a working javac" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-
-# Use the javah tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
-$as_echo_n "checking for javah in Boot JDK... " >&6; }
-JAVAH=$BOOT_JDK/bin/javah
-if test ! -x $JAVAH; then
- as_fn_error $? "Could not find a working javah" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-# Use the jar tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
-$as_echo_n "checking for jar in Boot JDK... " >&6; }
-JAR=$BOOT_JDK/bin/jar
-if test ! -x $JAR; then
- as_fn_error $? "Could not find a working jar" "$LINENO" 5
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-# Use the rmic tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
-$as_echo_n "checking for rmic in Boot JDK... " >&6; }
-RMIC=$BOOT_JDK/bin/rmic
-if test ! -x $RMIC; then
- as_fn_error $? "Could not find a working rmic" "$LINENO" 5
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-# Use the native2ascii tool from the Boot JDK.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
-$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
-NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
-if test ! -x $NATIVE2ASCII; then
- as_fn_error $? "Could not find a working native2ascii" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-
-###############################################################################
-#
-# Pickup additional source for a component from outside of the source root
-# or override source for a component.
-#
-
-# Check whether --with-add-source-root was given.
-if test "${with_add_source_root+set}" = set; then :
- withval=$with_add_source_root;
-fi
-
-
-
-# Check whether --with-override-source-root was given.
-if test "${with_override_source_root+set}" = set; then :
- withval=$with_override_source_root;
-fi
-
-
-
-# Check whether --with-adds-and-overrides was given.
-if test "${with_adds_and_overrides+set}" = set; then :
- withval=$with_adds_and_overrides;
-fi
-
-
-if test "x$with_adds_and_overrides" != x; then
- with_add_source_root="$with_adds_and_overrides/adds"
- with_override_source_root="$with_adds_and_overrides/overrides"
-fi
-
-if test "x$with_add_source_root" != x; then
- if ! test -d $with_add_source_root; then
- as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
- fi
- CURDIR="$PWD"
- cd "$with_add_source_root"
- ADD_SRC_ROOT="`pwd`"
- cd "$CURDIR"
- # Verify that the addon source root does not have any root makefiles.
- # If it does, then it is usually an error, prevent this.
- if test -f $with_add_source_root/langtools/makefiles/Makefile || \
- test -f $with_add_source_root/langtools/make/Makefile; then
- as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
- fi
- if test -f $with_add_source_root/corba/makefiles/Makefile || \
- test -f $with_add_source_root/corba/make/Makefile; then
- as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
- fi
- if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
- test -f $with_add_source_root/jaxp/make/Makefile; then
- as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
- fi
- if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
- test -f $with_add_source_root/jaxws/make/Makefile; then
- as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
- fi
- if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
- test -f $with_add_source_root/hotspot/make/Makefile; then
- as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
- fi
- if test -f $with_add_source_root/jdk/makefiles/Makefile || \
- test -f $with_add_source_root/jdk/make/Makefile; then
- as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
- fi
-fi
-
-
-if test "x$with_override_source_root" != x; then
- if ! test -d $with_override_source_root; then
- as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
- fi
- CURDIR="$PWD"
- cd "$with_override_source_root"
- OVERRIDE_SRC_ROOT="`pwd`"
- cd "$CURDIR"
- if test -f $with_override_source_root/langtools/makefiles/Makefile || \
- test -f $with_override_source_root/langtools/make/Makefile; then
- as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
- fi
- if test -f $with_override_source_root/corba/makefiles/Makefile || \
- test -f $with_override_source_root/corba/make/Makefile; then
- as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
- fi
- if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
- test -f $with_override_source_root/jaxp/make/Makefile; then
- as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
- fi
- if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
- test -f $with_override_source_root/jaxws/make/Makefile; then
- as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
- fi
- if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
- test -f $with_override_source_root/hotspot/make/Makefile; then
- as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
- fi
- if test -f $with_override_source_root/jdk/makefiles/Makefile || \
- test -f $with_override_source_root/jdk/make/Makefile; then
- as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
- fi
-fi
-
-
-###############################################################################
-#
-# Override a repo completely, this is used for example when you have 3 small
-# development sandboxes of the langtools sources and want to avoid having 3 full
-# OpenJDK sources checked out on disk.
-#
-# Assuming that the 3 langtools sandboxes are located here:
-# /home/fredrik/sandbox1/langtools
-# /home/fredrik/sandbox2/langtools
-# /home/fredrik/sandbox3/langtools
-#
-# From the source root you create build subdirs manually:
-# mkdir -p build1 build2 build3
-# in each build directory run:
-# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
-# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
-# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
-#
-
-
-# Check whether --with-override-langtools was given.
-if test "${with_override_langtools+set}" = set; then :
- withval=$with_override_langtools;
-fi
-
-
-
-# Check whether --with-override-corba was given.
-if test "${with_override_corba+set}" = set; then :
- withval=$with_override_corba;
-fi
-
-
-
-# Check whether --with-override-jaxp was given.
-if test "${with_override_jaxp+set}" = set; then :
- withval=$with_override_jaxp;
-fi
-
-
-
-# Check whether --with-override-jaxws was given.
-if test "${with_override_jaxws+set}" = set; then :
- withval=$with_override_jaxws;
-fi
-
-
-
-# Check whether --with-override-hotspot was given.
-if test "${with_override_hotspot+set}" = set; then :
- withval=$with_override_hotspot;
-fi
-
-
-
-# Check whether --with-override-jdk was given.
-if test "${with_override_jdk+set}" = set; then :
- withval=$with_override_jdk;
-fi
-
-
-if test "x$with_override_langtools" != x; then
- CURDIR="$PWD"
- cd "$with_override_langtools"
- LANGTOOLS_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
- as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
-$as_echo_n "checking if langtools should be overridden... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
-$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
-fi
-if test "x$with_override_corba" != x; then
- CURDIR="$PWD"
- cd "$with_override_corba"
- CORBA_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
- as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
-$as_echo_n "checking if corba should be overridden... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
-$as_echo "yes with $CORBA_TOPDIR" >&6; }
-fi
-if test "x$with_override_jaxp" != x; then
- CURDIR="$PWD"
- cd "$with_override_jaxp"
- JAXP_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
- as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
-$as_echo_n "checking if jaxp should be overridden... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
-$as_echo "yes with $JAXP_TOPDIR" >&6; }
-fi
-if test "x$with_override_jaxws" != x; then
- CURDIR="$PWD"
- cd "$with_override_jaxws"
- JAXWS_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
- as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
-$as_echo_n "checking if jaxws should be overridden... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
-$as_echo "yes with $JAXWS_TOPDIR" >&6; }
-fi
-if test "x$with_override_hotspot" != x; then
- CURDIR="$PWD"
- cd "$with_override_hotspot"
- HOTSPOT_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
- ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
- as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
-$as_echo_n "checking if hotspot should be overridden... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
-$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
-fi
-if test "x$with_override_jdk" != x; then
- CURDIR="$PWD"
- cd "$with_override_jdk"
- JDK_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
- as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
-$as_echo_n "checking if JDK should be overridden... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
-$as_echo "yes with $JDK_TOPDIR" >&6; }
-fi
-
-###############################################################################
-#
-# Specify options for anything that is run with the Boot JDK.
-#
-
-# Check whether --with-boot-jdk-jvmargs was given.
-if test "${with_boot_jdk_jvmargs+set}" = set; then :
- withval=$with_boot_jdk_jvmargs;
-fi
-
-
-if test "x$with_boot_jdk_jvmargs" = x; then
- # Not all JVM:s accept the same arguments on the command line.
- # OpenJDK specific increase in thread stack for JDK build,
- # well more specifically, when running javac.
- if test "x$BUILD_NUM_BITS" = x32; then
- STACK_SIZE=768
- else
- # Running Javac on a JVM on a 64-bit machine, the stack takes more space
- # since 64-bit pointers are pushed on the stach. Apparently, we need
- # to increase the stack space when javacing the JDK....
- STACK_SIZE=1536
- fi
-
- # Minimum amount of heap memory.
-
- # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -Xms64M to boot_jdk_jvmargs
- FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
- fi
-
- if test "x$HOST_OS" = "xmacosx"; then
- # Why does macosx need more heap? Its the huge JDK batch.
-
- # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -Xmx1600M to boot_jdk_jvmargs
- FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
- fi
-
- else
-
- # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -Xmx1100M to boot_jdk_jvmargs
- FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
- fi
-
- fi
- # When is adding -client something that speeds up the JVM?
- # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
-
- # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
- FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
- fi
-
-
- # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
- FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
- fi
-
-
- # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
- FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
- fi
-
- # Disable special log output when a debug build is used as Boot JDK...
-
- # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
- FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
- fi
-
-fi
-
-BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
-
-
-
-# Check whether --with-server-java was given.
-if test "${with_server_java+set}" = set; then :
- withval=$with_server_java;
-fi
-
-
-if test "x$with_server_java" != x; then
- SERVER_JAVA="$with_server_java"
- FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" = x; then
- as_fn_error $? "Could not execute server java: $SERVER_JAVA" "$LINENO" 5
- fi
-else
- SERVER_JAVA=""
- # Hotspot specific options.
-
- # Test if -XX:+UseParallelOldGC is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -XX:+UseParallelOldGC to SERVER_JAVA
- FOUND_WARN=`$JAVA -XX:+UseParallelOldGC -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -XX:+UseParallelOldGC -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -XX:+UseParallelOldGC"
- fi
-
-
- # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -verbosegc to SERVER_JAVA
- FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -verbosegc"
- fi
-
- # JRockit specific options.
-
- # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
- # If so, then append -Xverbose:gc to SERVER_JAVA
- FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xverbose:gc"
- fi
-
- SERVER_JAVA="$JAVA $SERVER_JAVA"
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use shared server for javac" >&5
-$as_echo_n "checking whether to use shared server for javac... " >&6; }
-# Check whether --enable-javac-server was given.
-if test "${enable_javac_server+set}" = set; then :
- enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
-else
- ENABLE_JAVAC_SERVER='no'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
-$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
-if test "x$ENABLE_JAVAC_SERVER" = xyes; then
- JAVAC_USE_REMOTE=true
- JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
-else
- JAVAC_USE_REMOTE=false
- JAVAC_SERVERS=
-fi
-
-
-
-
-# Check whether --with-javac-server-cores was given.
-if test "${with_javac_server_cores+set}" = set; then :
- withval=$with_javac_server_cores;
-fi
-
-if test "x$with_javac_server_cores" != x; then
- JAVAC_SERVER_CORES="$with_javac_server_cores"
-else
- if test "$NUM_CORES" -gt 16; then
- # We set this arbitrary limit because we want to limit the heap
- # size of the javac server.
- # In the future we will make the javac compilers in the server
- # share more and more state, thus enabling us to use more and
- # more concurrent threads in the server.
- JAVAC_SERVER_CORES="16"
- else
- JAVAC_SERVER_CORES="$NUM_CORES"
- fi
-
- if test "$MEMORY_SIZE" -gt "17000"; then
- MAX_HEAP_MEM=10000
-
- # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -d64 to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -d64"
- fi
-
-
- # Test if -Xms10G -Xmx10G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xms10G -Xmx10G to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xms10G -Xmx10G"
- fi
-
-
- # Test if -Xmn2G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xmn2G to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xmn2G -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xmn2G -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xmn2G"
- fi
-
- elif test "$MEMORY_SIZE" -gt "10000"; then
- MAX_HEAP_MEM=6000
-
- # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -d64 to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -d64"
- fi
-
-
- # Test if -Xms6G -Xmx6G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xms6G -Xmx6G to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xms6G -Xmx6G"
- fi
-
-
- # Test if -Xmn1G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xmn1G to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xmn1G -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xmn1G -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xmn1G"
- fi
-
- elif test "$MEMORY_SIZE" -gt "5000"; then
- MAX_HEAP_MEM=3000
-
- # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -d64 to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -d64"
- fi
-
-
- # Test if -Xms1G -Xmx3G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xms1G -Xmx3G to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xms1G -Xmx3G"
- fi
-
-
- # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xmn256M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xmn256M"
- fi
-
- elif test "$MEMORY_SIZE" -gt "3800"; then
- MAX_HEAP_MEM=2500
-
- # Test if -Xms1G -Xmx2500M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xms1G -Xmx2500M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xms1G -Xmx2500M"
- fi
-
-
- # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xmn256M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xmn256M"
- fi
-
- elif test "$MEMORY_SIZE" -gt "1900"; then
- MAX_HEAP_MEM=1200
-
- # Test if -Xms700M -Xmx1200M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xms700M -Xmx1200M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xms700M -Xmx1200M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xms700M -Xmx1200M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xms700M -Xmx1200M"
- fi
-
-
- # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xmn256M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xmn256M"
- fi
-
- elif test "$MEMORY_SIZE" -gt "1000"; then
- MAX_HEAP_MEM=900
-
- # Test if -Xms400M -Xmx900M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xms400M -Xmx900M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xms400M -Xmx900M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xms400M -Xmx900M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xms400M -Xmx900M"
- fi
-
-
- # Test if -Xmn128M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xmn128M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xmn128M"
- fi
-
- else
- MAX_HEAP_MEM=512
-
- # Test if -Xms256M -Xmx512M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xms256M -Xmx512M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xms256M -Xmx512M"
- fi
-
-
- # Test if -Xmn128M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
- # If so, then append -Xmn128M to SERVER_JAVA
- FOUND_WARN=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- SERVER_JAVA="$SERVER_JAVA -Xmn128M"
- fi
-
- fi
-
- MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
- if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
-$as_echo_n "checking if number of server cores must be reduced... " >&6; }
- JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
-$as_echo "yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
- fi
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to track dependencies between Java packages" >&5
-$as_echo_n "checking whether to track dependencies between Java packages... " >&6; }
-# Check whether --enable-javac-deps was given.
-if test "${enable_javac_deps+set}" = set; then :
- enableval=$enable_javac_deps; ENABLE_JAVAC_DEPS="${enableval}"
-else
- ENABLE_JAVAC_DEPS='no'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_DEPS" >&5
-$as_echo "$ENABLE_JAVAC_DEPS" >&6; }
-if test "x$ENABLE_JAVAC_DEPS" = xyes; then
- JAVAC_USE_DEPS=true
-else
- JAVAC_USE_DEPS=false
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use multiple cores for javac compilation" >&5
-$as_echo_n "checking whether to use multiple cores for javac compilation... " >&6; }
-# Check whether --enable-javac-multi-core was given.
-if test "${enable_javac_multi_core+set}" = set; then :
- enableval=$enable_javac_multi_core; ENABLE_JAVAC_MULTICORE="${enableval}"
-else
- ENABLE_JAVAC_MULTICORE='no'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_MULTICORE" >&5
-$as_echo "$ENABLE_JAVAC_MULTICORE" >&6; }
-if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
- JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
-else
- JAVAC_USE_MODE=SINGLE_THREADED_BATCH
- if test "x$ENABLE_JAVAC_DEPS" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options." >&5
-$as_echo "$as_me: WARNING: Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling dependency tracking for you now." >&5
-$as_echo "$as_me: WARNING: Disabling dependency tracking for you now." >&2;}
- JAVAC_USE_DEPS=false
- fi
- if test "x$ENABLE_JAVAC_SERVER" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options." >&5
-$as_echo "$as_me: WARNING: The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options." >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling javac server for you now." >&5
-$as_echo "$as_me: WARNING: Disabling javac server for you now." >&2;}
- JAVAC_USE_REMOTE=false
- fi
-fi
-
-
-###############################################################################
-#
-# OS specific settings that we never will need to probe.
-#
-if test "x$HOST_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$HOST_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$HOST_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$HOST_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
- FREETYPE2_NOT_NEEDED=yes
- # If the java runtime framework is disabled, then we need X11.
- # This will be adjusted below.
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
-$as_echo "alsa pulse x11" >&6; }
-fi
-
-if test "x$HOST_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
-
-###############################################################################
-#
-# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
-# that uses this API.
-#
-# Check whether --enable-macosx-runtime-support was given.
-if test "${enable_macosx_runtime_support+set}" = set; then :
- enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
-else
- MACOSX_RUNTIME_SUPPORT="no"
-fi
-
-
-USE_MACOSX_RUNTIME_SUPPORT=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
-$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
-if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
- if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
- MACOSX_RUNTIME_SUPPORT=yes
- USE_MACOSX_RUNTIME_SUPPORT=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
-$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
-$as_echo "yes, but explicitly disabled." >&6; }
- fi
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-if test "x$HOST_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
-$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
- X11_NOT_NEEDED=
- FREETYPE2_NOT_NEEDED=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
-$as_echo "alsa pulse" >&6; }
-fi
-
-###############################################################################
-#
-# Check for X Windows
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
-$as_echo_n "checking for X... " >&6; }
-
-
-# Check whether --with-x was given.
-if test "${with_x+set}" = set; then :
- withval=$with_x;
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
- # The user explicitly disabled X.
- have_x=disabled
-else
- case $x_includes,$x_libraries in #(
- *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
- *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=no ac_x_libraries=no
-rm -f -r conftest.dir
-if mkdir conftest.dir; then
- cd conftest.dir
- cat >Imakefile <<'_ACEOF'
-incroot:
- @echo incroot='${INCROOT}'
-usrlibdir:
- @echo usrlibdir='${USRLIBDIR}'
-libdir:
- @echo libdir='${LIBDIR}'
-_ACEOF
- if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
- for ac_var in incroot usrlibdir libdir; do
- eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
- done
- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl dylib la dll; do
- if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
- test -f "$ac_im_libdir/libX11.$ac_extension"; then
- ac_im_usrlibdir=$ac_im_libdir; break
- fi
- done
- # Screen out bogus values from the imake configuration. They are
- # bogus both because they are the default anyway, and because
- # using them would break gcc on systems where it needs fixed includes.
- case $ac_im_incroot in
- /usr/include) ac_x_includes= ;;
- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
- esac
- case $ac_im_usrlibdir in
- /usr/lib | /usr/lib64 | /lib | /lib64) ;;
- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
- esac
- fi
- cd ..
- rm -f -r conftest.dir
-fi
-
-# Standard set of common directories for X headers.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-ac_x_header_dirs='
-/usr/X11/include
-/usr/X11R7/include
-/usr/X11R6/include
-/usr/X11R5/include
-/usr/X11R4/include
-
-/usr/include/X11
-/usr/include/X11R7
-/usr/include/X11R6
-/usr/include/X11R5
-/usr/include/X11R4
-
-/usr/local/X11/include
-/usr/local/X11R7/include
-/usr/local/X11R6/include
-/usr/local/X11R5/include
-/usr/local/X11R4/include
-
-/usr/local/include/X11
-/usr/local/include/X11R7
-/usr/local/include/X11R6
-/usr/local/include/X11R5
-/usr/local/include/X11R4
-
-/usr/X386/include
-/usr/x386/include
-/usr/XFree86/include/X11
-
-/usr/include
-/usr/local/include
-/usr/unsupported/include
-/usr/athena/include
-/usr/local/x11r5/include
-/usr/lpp/Xamples/include
-
-/usr/openwin/include
-/usr/openwin/share/include'
-
-if test "$ac_x_includes" = no; then
- # Guess where to find include files, by looking for Xlib.h.
- # First, try using that file with no special directory specified.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
- # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
- for ac_dir in $ac_x_header_dirs; do
- if test -r "$ac_dir/X11/Xlib.h"; then
- ac_x_includes=$ac_dir
- break
- fi
-done
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-fi # $ac_x_includes = no
-
-if test "$ac_x_libraries" = no; then
- # Check for the libraries.
- # See if we find them without any special options.
- # Don't add to $LIBS permanently.
- ac_save_LIBS=$LIBS
- LIBS="-lX11 $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-XrmInitialize ()
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- LIBS=$ac_save_LIBS
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
- LIBS=$ac_save_LIBS
-for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
-do
- # Don't even attempt the hair of trying to link an X program!
- for ac_extension in a so sl dylib la dll; do
- if test -r "$ac_dir/libX11.$ac_extension"; then
- ac_x_libraries=$ac_dir
- break 2
- fi
- done
-done
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi # $ac_x_libraries = no
-
-case $ac_x_includes,$ac_x_libraries in #(
- no,* | *,no | *\'*)
- # Didn't find X, or a directory has "'" in its name.
- ac_cv_have_x="have_x=no";; #(
- *)
- # Record where we found X for the cache.
- ac_cv_have_x="have_x=yes\
- ac_x_includes='$ac_x_includes'\
- ac_x_libraries='$ac_x_libraries'"
-esac
-fi
-;; #(
- *) have_x=yes;;
- esac
- eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
-$as_echo "$have_x" >&6; }
- no_x=yes
-else
- # If each of the values was on the command line, it overrides each guess.
- test "x$x_includes" = xNONE && x_includes=$ac_x_includes
- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
- # Update the cache value to reflect the command line values.
- ac_cv_have_x="have_x=yes\
- ac_x_includes='$x_includes'\
- ac_x_libraries='$x_libraries'"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
-$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
-fi
-
-if test "$no_x" = yes; then
- # Not all programs may use this symbol, but it does not hurt to define it.
-
-$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
-
- X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
-else
- if test -n "$x_includes"; then
- X_CFLAGS="$X_CFLAGS -I$x_includes"
- fi
-
- # It would also be nice to do this for all -L options, not just this one.
- if test -n "$x_libraries"; then
- X_LIBS="$X_LIBS -L$x_libraries"
- # For Solaris; some versions of Sun CC require a space after -R and
- # others require no space. Words are not sufficient . . . .
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
-$as_echo_n "checking whether -R must be followed by a space... " >&6; }
- ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
- ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- X_LIBS="$X_LIBS -R$x_libraries"
-else
- LIBS="$ac_xsave_LIBS -R $x_libraries"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- X_LIBS="$X_LIBS -R $x_libraries"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
-$as_echo "neither works" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
- LIBS=$ac_xsave_LIBS
- fi
-
- # Check for system-dependent libraries X programs must link with.
- # Do this before checking for the system-independent R6 libraries
- # (-lICE), since we may need -lsocket or whatever for X linking.
-
- if test "$ISC" = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
- else
- # Martyn Johnson says this is needed for Ultrix, if the X
- # libraries were built with DECnet support. And Karl Berry says
- # the Alpha needs dnet_stub (dnet does not exist).
- ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char XOpenDisplay ();
-int
-main ()
-{
-return XOpenDisplay ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
-$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_ntoa ();
-int
-main ()
-{
-return dnet_ntoa ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_dnet_dnet_ntoa=yes
-else
- ac_cv_lib_dnet_dnet_ntoa=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
-$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-fi
-
- if test $ac_cv_lib_dnet_dnet_ntoa = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
-$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
-if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldnet_stub $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dnet_ntoa ();
-int
-main ()
-{
-return dnet_ntoa ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_dnet_stub_dnet_ntoa=yes
-else
- ac_cv_lib_dnet_stub_dnet_ntoa=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
-$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
-fi
-
- fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LIBS="$ac_xsave_LIBS"
-
- # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
- # to get the SysV transport functions.
- # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
- # needs -lnsl.
- # The nsl library prevents programs from opening the X display
- # on Irix 5.2, according to T.E. Dickey.
- # The functions gethostbyname, getservbyname, and inet_addr are
- # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
- ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = x""yes; then :
-
-fi
-
- if test $ac_cv_func_gethostbyname = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnsl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_nsl_gethostbyname=yes
-else
- ac_cv_lib_nsl_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
-fi
-
- if test $ac_cv_lib_nsl_gethostbyname = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
-$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
-if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbsd $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_bsd_gethostbyname=yes
-else
- ac_cv_lib_bsd_gethostbyname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
-$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
-if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
-fi
-
- fi
- fi
-
- # lieder@skyler.mavd.honeywell.com says without -lsocket,
- # socket/setsockopt and other routines are undefined under SCO ODT
- # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
- # on later versions), says Simon Leinen: it contains gethostby*
- # variants that don't use the name server (or something). -lsocket
- # must be given before -lnsl if both are needed. We assume that
- # if connect needs -lnsl, so does gethostbyname.
- ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
-if test "x$ac_cv_func_connect" = x""yes; then :
-
-fi
-
- if test $ac_cv_func_connect = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
-$as_echo_n "checking for connect in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_connect+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char connect ();
-int
-main ()
-{
-return connect ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_socket_connect=yes
-else
- ac_cv_lib_socket_connect=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
-$as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = x""yes; then :
- X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
-fi
-
- fi
-
- # Guillermo Gomez says -lposix is necessary on A/UX.
- ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
-if test "x$ac_cv_func_remove" = x""yes; then :
-
-fi
-
- if test $ac_cv_func_remove = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
-$as_echo_n "checking for remove in -lposix... " >&6; }
-if test "${ac_cv_lib_posix_remove+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char remove ();
-int
-main ()
-{
-return remove ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_posix_remove=yes
-else
- ac_cv_lib_posix_remove=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
-$as_echo "$ac_cv_lib_posix_remove" >&6; }
-if test "x$ac_cv_lib_posix_remove" = x""yes; then :
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
-fi
-
- fi
-
- # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
- ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
-if test "x$ac_cv_func_shmat" = x""yes; then :
-
-fi
-
- if test $ac_cv_func_shmat = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
-$as_echo_n "checking for shmat in -lipc... " >&6; }
-if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lipc $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shmat ();
-int
-main ()
-{
-return shmat ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_ipc_shmat=yes
-else
- ac_cv_lib_ipc_shmat=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
-$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
-if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-fi
-
- fi
- fi
-
- # Check for libraries that X11R6 Xt/Xaw programs need.
- ac_save_LDFLAGS=$LDFLAGS
- test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
- # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
- # check for ICE first), but we must link in the order -lSM -lICE or
- # we get undefined symbols. So assume we have SM if we have ICE.
- # These have to be linked with before -lX11, unlike the other
- # libraries we check for below, so use a different variable.
- # John Interrante, Karl Berry
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
-$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lICE $X_EXTRA_LIBS $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char IceConnectionNumber ();
-int
-main ()
-{
-return IceConnectionNumber ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_ICE_IceConnectionNumber=yes
-else
- ac_cv_lib_ICE_IceConnectionNumber=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
-$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
-if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
- X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
-fi
-
- LDFLAGS=$ac_save_LDFLAGS
-
-fi
-
-
-if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
- help_on_build_dependency x11
- as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
-fi
-
-# Some of the old makefiles require a setting of OPENWIN_HOME
-# Since the X11R6 directory has disappeared on later Linuxes,
-# we need to probe for it.
-if test "x$HOST_OS" = xlinux; then
- if test -d "$SYS_ROOT/usr/X11R6"; then
- OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
- fi
- if test -d "$SYS_ROOT/usr/include/X11"; then
- OPENWIN_HOME="$SYS_ROOT/usr"
- fi
-fi
-if test "x$HOST_OS" = xsolaris; then
- OPENWIN_HOME="/usr/openwin"
-fi
-
-
-
-#
-# Weird Sol10 something check...TODO change to try compile
-#
-if test "x${HOST_OS}" = xsolaris; then
- if test "`uname -r`" = "5.10"; then
- if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
- X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
- fi
- fi
-fi
-
-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 $X_CFLAGS"
-
-
-for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- X11_A_OK=yes
-else
- X11_A_OK=no
-fi
-
-done
-
-CFLAGS="$OLD_CFLAGS"
-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
-
-
-if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
- help_on_build_dependency x11
- as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
-fi
-
-
-
-
-###############################################################################
-#
-# The common unix printing system cups is used to print from java.
-#
-
-# Check whether --with-cups was given.
-if test "${with_cups+set}" = set; then :
- withval=$with_cups;
-fi
-
-
-# Check whether --with-cups-include was given.
-if test "${with_cups_include+set}" = set; then :
- withval=$with_cups_include;
-fi
-
-
-# Check whether --with-cups-lib was given.
-if test "${with_cups_lib+set}" = set; then :
- withval=$with_cups_lib;
-fi
-
-
-if test "x$CUPS_NOT_NEEDED" = xyes; then
- if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
-$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
- fi
- CUPS_CFLAGS=
- CUPS_LIBS=
-else
- CUPS_FOUND=no
-
- if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
- as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
- fi
-
- if test "x${with_cups}" != x; then
- CUPS_LIBS="-L${with_cups}/lib -lcups"
- CUPS_CFLAGS="-I${with_cups}/include"
- CUPS_FOUND=yes
- fi
- if test "x${with_cups_include}" != x; then
- CUPS_CFLAGS="-I${with_cups_include}"
- CUPS_FOUND=yes
- fi
- if test "x${with_cups_lib}" != x; then
- CUPS_LIBS="-L${with_cups_lib} -lcups"
- CUPS_FOUND=yes
- fi
- if test "x$CUPS_FOUND" = xno; then
-
-
- 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 host and build machine specific resource!
- eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a host specific resource
- eval resource=\${builddep_cups_HOST_${rewritten_host_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 :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- CUPS_FOUND=yes
- CUPS_CFLAGS=
- CUPS_LIBS="-lcups"
- DEFAULT_CUPS=yes
-fi
-
-done
-
- fi
- if test "x$CUPS_FOUND" = xno; then
- # Getting nervous now? Lets poke around for standard Solaris third-party
- # package installation locations.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers and libs" >&5
-$as_echo_n "checking for cups headers and libs... " >&6; }
- if test -s /opt/sfw/cups/include/cups/cups.h; then
- # An SFW package seems to be installed!
- CUPS_FOUND=yes
- CUPS_CFLAGS="-I/opt/sfw/cups/include"
- CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
- elif test -s /opt/csw/include/cups/cups.h; then
- # A CSW package seems to be installed!
- CUPS_FOUND=yes
- CUPS_CFLAGS="-I/opt/csw/include"
- CUPS_LIBS="-L/opt/csw/lib -lcups"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
-$as_echo "$CUPS_FOUND" >&6; }
- fi
- if test "x$CUPS_FOUND" = xno; then
- help_on_build_dependency cups
- as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
- fi
-fi
-
-
-
-
-###############################################################################
-#
-# The ubiquitous freetype2 library is used to render fonts.
-#
-
-# Check whether --with-freetype was given.
-if test "${with_freetype+set}" = set; then :
- withval=$with_freetype;
-fi
-
-
-# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
-USING_SYSTEM_FT_LIB=false
-
-if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
- if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != 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;}
- fi
- FREETYPE2_CFLAGS=
- FREETYPE2_LIBS=
- FREETYPE2_LIB_PATH=
-else
- FREETYPE2_FOUND=no
-
- if test "x$with_freetype" != x; then
-
- # Fail with message the path to freetype if var with_freetype contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "$with_freetype" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$BUILD_OS" = "xwindows"; then
- with_freetype=`$CYGPATH -s -m -a "$with_freetype"`
- with_freetype=`$CYGPATH -u "$with_freetype"`
- else
- as_fn_error $? "You cannot have spaces in the path to freetype! \"$with_freetype\"" "$LINENO" 5
- fi
- fi
-
- FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
- if test "x$HOST_OS" = xwindows; then
- FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
- fi
- FREETYPE2_LIB_PATH="$with_freetype/lib"
- FREETYPE2_CFLAGS="-I$with_freetype/include"
- if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
- FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
- fi
- FREETYPE2_FOUND=yes
- if test "x$FREETYPE2_FOUND" = xyes; then
- # Verify that the directories exist
- if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
- as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
- fi
- # List the contents of the lib.
- FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
- if test "x$FREETYPELIB" = x; then
- as_fn_error $? "Could not find libfreetype.se nor freetype.dll in $with_freetype/lib" "$LINENO" 5
- fi
- # Check one h-file
- if ! test -s "$with_freetype/include/ft2build.h"; then
- as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
- fi
- fi
- fi
- if test "x$FREETYPE2_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 host and build machine specific resource!
- eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a host specific resource
- eval resource=\${builddep_freetype2_HOST_${rewritten_host_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
- FREETYPE2=$depdir
- if test "x$theroot" != x; then
- FREETYPE2="$theroot"
- fi
- if test "x$thecflags" != x; then
- FREETYPE2_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- FREETYPE2_LIBS="$thelibs"
- fi
- FREETYPE2_FOUND=yes
- else FREETYPE2_FOUND=no
-
- fi
- else FREETYPE2_FOUND=no
-
- fi
-
- USING_SYSTEM_FT_LIB=true
- fi
- if test "x$FREETYPE2_FOUND" = xno; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
-$as_echo_n "checking for FREETYPE2... " >&6; }
-
-if test -n "$FREETYPE2_CFLAGS"; then
- pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$FREETYPE2_LIBS"; then
- pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 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
- FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
- else
- FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$FREETYPE2_PKG_ERRORS" >&5
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- FREETYPE2_FOUND=no
-elif test $pkg_failed = untried; then
- FREETYPE2_FOUND=no
-else
- FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
- FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- FREETYPE2_FOUND=yes
-fi
- USING_SYSTEM_FT_LIB=true
- fi
- if test "x$FREETYPE2_FOUND" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
-$as_echo_n "checking for freetype in some standard locations... " >&6; }
-
- if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
- DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
- DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
- fi
- if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
- DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
- DEFAULT_FREETYPE_LIBS="-lfreetype"
- fi
-
- PREV_CXXCFLAGS="$CXXFLAGS"
- PREV_LDFLAGS="$LDFLAGS"
- CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
- LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
- #include FT_FREETYPE_H
- int main() { return 0; }
-
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
- # Yes, the default cflags and libs did the trick.
- FREETYPE2_FOUND=yes
- FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
- FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
-
-else
-
- FREETYPE2_FOUND=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- CXXCFLAGS="$PREV_CXXFLAGS"
- LDFLAGS="$PREV_LDFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
-$as_echo "$FREETYPE2_FOUND" >&6; }
- USING_SYSTEM_FT_LIB=true
- fi
- if test "x$FREETYPE2_FOUND" = xno; then
- help_on_build_dependency freetype2
- as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
- fi
-fi
-
-
-
-
-
-
-###############################################################################
-#
-# 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;
-fi
-
-
-# Check whether --with-alsa-include was given.
-if test "${with_alsa_include+set}" = set; then :
- withval=$with_alsa_include;
-fi
-
-
-# Check whether --with-alsa-lib was given.
-if test "${with_alsa_lib+set}" = set; then :
- withval=$with_alsa_lib;
-fi
-
-
-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
- { $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;}
- 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
- as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
- fi
-
- if test "x${with_alsa}" != x; then
- ALSA_LIBS="-L${with_alsa}/lib -lalsa"
- 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} -lalsa"
- 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 host and build machine specific resource!
- eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a host specific resource
- eval resource=\${builddep_alsa_HOST_${rewritten_host_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
- if test "x$ALSA_FOUND" = xno; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
-$as_echo_n "checking for ALSA... " >&6; }
-
-if test -n "$ALSA_CFLAGS"; then
- pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
- ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$ALSA_LIBS"; then
- pkg_cv_ALSA_LIBS="$ALSA_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
- ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 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
- ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
- else
- ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$ALSA_PKG_ERRORS" >&5
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ALSA_FOUND=no
-elif test $pkg_failed = untried; then
- ALSA_FOUND=no
-else
- ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
- ALSA_LIBS=$pkg_cv_ALSA_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ALSA_FOUND=yes
-fi
- fi
- if test "x$ALSA_FOUND" = xno; then
- for ac_header in alsa/asoundlib.h
-do :
- ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ALSA_ASOUNDLIB_H 1
-_ACEOF
- ALSA_FOUND=yes
- ALSA_CFLAGS=-Iignoreme
- ALSA_LIBS=-lasound
- DEFAULT_ALSA=yes
-else
- ALSA_FOUND=no
-fi
-
-done
-
- fi
- if test "x$ALSA_FOUND" = xno; then
- help_on_build_dependency alsa
- as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
- fi
-fi
-
-
-
-
-###############################################################################
-#
-# Check for pulse audio headers and libraries.
-#
-PULSE_FOUND=no
-
-# Check whether --with-pulse was given.
-if test "${with_pulse+set}" = set; then :
- withval=$with_pulse;
-fi
-
-
-# Check whether --with-pulse-include was given.
-if test "${with_pulse_include+set}" = set; then :
- withval=$with_pulse_include;
-fi
-
-
-# Check whether --with-pulse-lib was given.
-if test "${with_pulse_lib+set}" = set; then :
- withval=$with_pulse_lib;
-fi
-
-
-if test "x${with_pulse}" != x; then
- PULSE_LIBS="-L${with_pulse}/lib -lfreetype"
- PULSE_CFLAGS="-I${with_pulse}/include"
- PULSE_FOUND=yes
-fi
-if test "x${with_pulse_include}" != x; then
- PULSE_CFLAGS="-I${with_pulse_include}"
- PULSE_FOUND=yes
-fi
-if test "x${with_pulse_lib}" != x; then
- PULSE_LIBS="-L${with_pulse_lib} -lpulse"
- PULSE_FOUND=yes
-fi
-if test "x$PULSE_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 host and build machine specific resource!
- eval resource=\${builddep_pulse_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a host specific resource
- eval resource=\${builddep_pulse_HOST_${rewritten_host_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_pulse_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The pulse comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_pulse}
- fi
- if test "x$resource" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for pulse" >&5
-$as_echo "$as_me: Using builddeps $resource for pulse" >&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
-
-# pulse 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 pulse from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency pulse 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/pulse.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_pulse_ROOT}
- thecflags=${builddep_pulse_CFLAGS}
- thelibs=${builddep_pulse_LIBS}
- if test "x$depdir" = x; then
- as_fn_error $? "Could not download build dependency pulse" "$LINENO" 5
- fi
- PULSE=$depdir
- if test "x$theroot" != x; then
- PULSE="$theroot"
- fi
- if test "x$thecflags" != x; then
- PULSE_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- PULSE_LIBS="$thelibs"
- fi
- PULSE_FOUND=yes
- else PULSE_FOUND=no
-
- fi
- else PULSE_FOUND=no
-
- fi
-
-fi
-if test "x$PULSE_FOUND" = xno; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBPULSE" >&5
-$as_echo_n "checking for LIBPULSE... " >&6; }
-
-if test -n "$LIBPULSE_CFLAGS"; then
- pkg_cv_LIBPULSE_CFLAGS="$LIBPULSE_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.11\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.11") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBPULSE_CFLAGS=`$PKG_CONFIG --cflags "libpulse >= 0.9.11" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$LIBPULSE_LIBS"; then
- pkg_cv_LIBPULSE_LIBS="$LIBPULSE_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse >= 0.9.11\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libpulse >= 0.9.11") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBPULSE_LIBS=`$PKG_CONFIG --libs "libpulse >= 0.9.11" 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
- LIBPULSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse >= 0.9.11" 2>&1`
- else
- LIBPULSE_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse >= 0.9.11" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$LIBPULSE_PKG_ERRORS" >&5
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- PULSE_FOUND=no
-elif test $pkg_failed = untried; then
- PULSE_FOUND=no
-else
- LIBPULSE_CFLAGS=$pkg_cv_LIBPULSE_CFLAGS
- LIBPULSE_LIBS=$pkg_cv_LIBPULSE_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- PULSE_FOUND=yes
-fi
-fi
-if test "x$PULSE_FOUND" = xno; then
- for ac_header in pulse/pulseaudio.h
-do :
- ac_fn_cxx_check_header_mongrel "$LINENO" "pulse/pulseaudio.h" "ac_cv_header_pulse_pulseaudio_h" "$ac_includes_default"
-if test "x$ac_cv_header_pulse_pulseaudio_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PULSE_PULSEAUDIO_H 1
-_ACEOF
- PULSE_FOUND=yes
- PULSE_CFLAGS=-Iignoreme
- PULSE_LIBS=
- DEFAULT_PULSE=yes
-else
- PULSE_FOUND=no
-fi
-
-done
-
-fi
-
-if test "x$PULSE_FOUND" = xno && test "x$PULSE_NOT_NEEDED" != xyes; then
- help_on_build_dependency pulse
- as_fn_error $? "Could not find pulse audio libraries. $HELP_MSG " "$LINENO" 5
-fi
-
-
-
-
-###############################################################################
-#
-# Check for the jpeg library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
-$as_echo_n "checking for main in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_main+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int
-main ()
-{
-return main ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_jpeg_main=yes
-else
- ac_cv_lib_jpeg_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
-$as_echo "$ac_cv_lib_jpeg_main" >&6; }
-if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBJPEG 1
-_ACEOF
-
- LIBS="-ljpeg $LIBS"
-
-else
- USE_EXTERNAL_LIBJPEG=false
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
-$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
-
-fi
-
-
-
-###############################################################################
-#
-# Check for the gif library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
-$as_echo_n "checking for main in -lgif... " >&6; }
-if test "${ac_cv_lib_gif_main+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgif $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int
-main ()
-{
-return main ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_gif_main=yes
-else
- ac_cv_lib_gif_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
-$as_echo "$ac_cv_lib_gif_main" >&6; }
-if test "x$ac_cv_lib_gif_main" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGIF 1
-_ACEOF
-
- LIBS="-lgif $LIBS"
-
-else
- USE_EXTERNAL_LIBGIF=false
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
-$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
-
-fi
-
-
-
-###############################################################################
-#
-# Check for the zlib library
-#
-
-USE_EXTERNAL_LIBZ=true
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5
-$as_echo_n "checking for main in -lz... " >&6; }
-if test "${ac_cv_lib_z_main+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int
-main ()
-{
-return main ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_z_main=yes
-else
- ac_cv_lib_z_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_main" >&5
-$as_echo "$ac_cv_lib_z_main" >&6; }
-if test "x$ac_cv_lib_z_main" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
-
- LIBS="-lz $LIBS"
-
-else
- USE_EXTERNAL_LIBZ=false
- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use zlib bundled with the OpenJDK source" >&5
-$as_echo "$as_me: Will use zlib bundled with the OpenJDK source" >&6;}
-
-fi
-
-
-
-###############################################################################
-#
-# Check if altzone exists in time.h
-#
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-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
-#
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
-$as_echo_n "checking for cos in -lm... " >&6; }
-if test "${ac_cv_lib_m_cos+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cos ();
-int
-main ()
-{
-return cos ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_m_cos=yes
-else
- ac_cv_lib_m_cos=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
-$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
- LIBS="-lm $LIBS"
-
-else
-
- { $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
-
-save_LIBS="$LIBS"
-LIBS=""
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDL 1
-_ACEOF
-
- LIBS="-ldl $LIBS"
-
-fi
-
-LIBDL="$LIBS"
-
-LIBS="$save_LIBS"
-
-###############################################################################
-#
-# Should we run the painfully slow javadoc tool?
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
-$as_echo_n "checking whether to build documentation... " >&6; }
-# Check whether --enable-docs was given.
-if test "${enable_docs+set}" = set; then :
- enableval=$enable_docs; ENABLE_DOCS="${enableval}"
-else
- ENABLE_DOCS='no'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DOCS" >&5
-$as_echo "$ENABLE_DOCS" >&6; }
-
-GENERATE_DOCS=false
-if test "x$ENABLE_DOCS" = xyes; then
- GENERATE_DOCS=true
-fi
-
-
-###############################################################################
-#
-# Should we compile nimbus swing L&F? We can probably remove this option
-# since nimbus is officially part of javax now.
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build nimbus L&F" >&5
-$as_echo_n "checking whether to build nimbus L&F... " >&6; }
-# Check whether --enable-nimbus was given.
-if test "${enable_nimbus+set}" = set; then :
- enableval=$enable_nimbus; ENABLE_NIMBUS="${enableval}"
-else
- ENABLE_NIMBUS='yes'
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_NIMBUS" >&5
-$as_echo "$ENABLE_NIMBUS" >&6; }
-DISABLE_NIMBUS=
-if test "x$ENABLE_NIMBUS" = xno; then
- DISABLE_NIMBUS=true
-fi
-
-
-###############################################################################
-#
-# Setup the opt flags for different compilers
-# and different operating systems.
-#
-C_FLAG_DEPS="-MMD -MF"
-CXX_FLAG_DEPS="-MMD -MF"
-
-case $COMPILER_TYPE in
- CC )
- D_FLAG="-g"
- case $COMPILER_NAME in
- gcc )
- case $PLATFORM in
- macosx )
- # On MacOSX we optimize for size, something
- # we should do for all platforms?
- C_O_FLAG_HI="-Os"
- C_O_FLAG_NORM="-Os"
- C_O_FLAG_NONE=""
- ;;
- *)
- C_O_FLAG_HI="-O3"
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_NONE="-O0"
- ;;
- esac
- CXX_O_FLAG_HI="$C_O_FLAG_HI"
- CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
- CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
- ;;
- ossc )
- #
- # Forte has different names for this with their C++ compiler...
- #
- CXX_FLAG_DEPS="-xMMD -xMF"
-
-# Extra options used with HIGHEST
-#
-# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-# done with care, there are some assumptions below that need to
-# be understood about the use of pointers, and IEEE behavior.
-#
-# Use non-standard floating point mode (not IEEE 754)
-CC_HIGHEST="$CC_HIGHEST -fns"
-# Do some simplification of floating point arithmetic (not IEEE 754)
-CC_HIGHEST="$CC_HIGHEST -fsimple"
-# Use single precision floating point with 'float'
-CC_HIGHEST="$CC_HIGHEST -fsingle"
-# Assume memory references via basic pointer types do not alias
-# (Source with excessing pointer casting and data access with mixed
-# pointer types are not recommended)
-CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
-# Use intrinsic or inline versions for math/std functions
-# (If you expect perfect errno behavior, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
-# Loop data dependency optimizations (need -xO3 or higher)
-CC_HIGHEST="$CC_HIGHEST -xdepend"
-# Pointer parameters to functions do not overlap
-# (Similar to -xalias_level=basic usage, but less obvious sometimes.
-# If you pass in multiple pointers to the same data, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xrestrict"
-# Inline some library routines
-# (If you expect perfect errno behavior, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xlibmil"
-# Use optimized math routines
-# (If you expect perfect errno behavior, do not use this)
-# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
-
- case $LEGACY_HOST_CPU1 in
- i586)
- C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
- C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
- C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
- C_O_FLAG_NONE=""
- CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
- CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
- CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
- CXX_O_FLAG_NONE=""
- ;;
- sparc)
- C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
- C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
- C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
- C_O_FLAG_NONE=""
- CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
- CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
- CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
- CXX_O_FLAG_NONE=""
- ;;
- esac
- esac
- ;;
- CL )
- D_FLAG=
- C_O_FLAG_HI="-O2"
- C_O_FLAG_NORM="-O1"
- C_O_FLAG_NONE="-Od"
- CXX_O_FLAG_HI="$C_O_FLAG_HI"
- CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
- CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
- ;;
-esac
-
-if test -z "$C_O_FLAG_HIGHEST"; then
- C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
-fi
-
-if test -z "$CXX_O_FLAG_HIGHEST"; then
- CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-###############################################################################
-#
-# Setup legacy vars/targets and new vars to deal with different debug levels.
-#
-case $DEBUG_LEVEL in
- release )
- HOTSPOT_DEBUG_LEVEL="product"
- HOTSPOT_EXPORT="product"
- ;;
- fastdebug )
- HOTSPOT_DEBUG_LEVEL="fastdebug"
- HOTSPOT_EXPORT="fastdebug"
- CFLAGS="$CFLAGS $D_FLAG"
- JAVAC_FLAGS="$JAVAC_FLAGS -g"
- ;;
- slowdebug )
- HOTSPOT_DEBUG_LEVEL="jvmg"
- HOTSPOT_EXPORT="debug"
- CFLAGS="$CFLAGS $D_FLAG"
- C_O_FLAG_HI="$C_O_FLAG_NONE"
- C_O_FLAG_NORM="$C_O_FLAG_NONE"
- CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
- CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
- JAVAC_FLAGS="$JAVAC_FLAGS -g"
- ;;
-esac
-
-###############################################################################
-#
-# Generate the legacy makefile targets for hotspot.
-# The hotspot api for selecting the build artifacts, really, needs to be improved.
-#
-HOTSPOT_TARGET=""
-
-if test "x$JVM_VARIANT_SERVER" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
-fi
-
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
-fi
-
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
-fi
-
-if test "x$JVM_VARIANT_ZERO" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
-fi
-
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
-fi
-
-HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
-
-###############################################################################
-#
-# Setup all directories for the subrepoes and the arguments to the sub makes.
-#
-LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
-LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
-LANGTOOLS_MAKE_ARGS=""
-
-
-
-
-CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
-CORBA_DIST="$OUTPUT_ROOT/corba/dist"
-CORBA_MAKE_ARGS=""
-
-
-
-
-JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
-JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
-JAXP_MAKE_ARGS=""
-
-
-
-
-JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
-JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
-JAXWS_MAKE_ARGS=""
-
-
-
-
-HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
-HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
-HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
-
-
-
-
-JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
-JDK_MAKE_ARGS="ALT_OUTPUTDIR=\"$OUTPUT_ROOT/jdk\""
-
-
-
-IMAGES_OUTPUTDIR=$OUTPUT_ROOT/images
-IMAGES_MAKE_ARGS="ALT_OUTPUTDIR=$OUTPUT_ROOT/jdk \
- SHARE_SRC=$JDK_TOPDIR/src/share \
- PLATFORM_SRC=$JDK_TOPDIR/src/$LEGACY_HOST_OS_API \
- TEMPDIR=$IMAGES_OUTPUTDIR/tmp \
- ABS_TEMPDIR=$IMAGES_OUTPUTDIR/tmp "
-
-
-
-###############################################################################
-#
-# Now setup the CFLAGS and LDFLAGS for the JDK build.
-# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
-#
-case $COMPILER_NAME in
- gcc )
- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
- -pipe -fno-omit-frame-pointer \
- -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
- CFLAGS_JDK="$CFLAGS_JDK -fno-strict-aliasing"
- ;;
- ossc )
- CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
- CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
- ;;
- cl )
- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
- -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
- -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
- -DWIN32 -DIAL"
- case $LEGACY_HOST_CPU1 in
- i?86 )
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
- ;;
- amd64 )
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
- ;;
- esac
- ;;
-esac
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
-
-# The package path is used only on macosx?
-PACKAGE_PATH=/opt/local
-
-
-# Sometimes we use a cpu dir (.../lib/amd64/server)
-# Sometimes not (.../lib/server)
-LIBARCHDIR="$LEGACY_HOST_CPU2/"
-if test "x$ENDIAN" = xlittle; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
-else
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
-fi
-if test "x$HOST_OS" = xlinux; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-fi
-if test "x$HOST_OS" = xwindows; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
-fi
-if test "x$HOST_OS" = xsolaris; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
-fi
-if test "x$HOST_OS" = xmacosx; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
- LIBARCHDIR=""
-fi
-if test "x$HOST_OS" = xbsd; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
-fi
-if test "x$DEBUG_LEVEL" = xrelease; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
-else
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
-fi
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_HOST_CPU1\"' -D$LEGACY_HOST_CPU1"
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
- -I${JDK_OUTPUTDIR}/include \
- -I${JDK_OUTPUTDIR}/include/$PLATFORM \
- -I${JDK_TOPDIR}/src/share/javavm/export \
- -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/javavm/export \
- -I${JDK_TOPDIR}/src/share/native/common \
- -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/native/common"
-
-# The shared libraries are compiled using the picflag.
-CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG"
-
-# Executable flags
-CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
-CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
-
-# Now this is odd. The JDK native libraries have to link against libjvm.so
-# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
-# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
-# is identical for client and server? Yes. Which is picked at runtime (client or server)?
-# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
-# libraries will link to whatever is in memory. Yuck.
-#
-# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
-if test "x$COMPILER_TYPE" = xCL; then
- LDFLAGS_JDKLIB="$LDFLAGS -dll -libpath:${JDK_OUTPUTDIR}/lib -libpath:${JDK_OUTPUTDIR}/objs"
- LDFLAGS_JDKLIB_SUFFIX=""
- if test "$HOST_CPU_BITS" == "64"; then
- LDFLAGS_STACK_SIZE=1048576
- else
- LDFLAGS_STACK_SIZE=327680
- fi
- LDFLAGS_JDKEXE="$LDFLAGS /STACK:$LDFLAGS_STACK_SIZE"
-else
- # If this is a --hash-style=gnu system, use --hash-style=both, why?
- HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
- if test -n "$HAS_GNU_HASH"; then
- # And since we now know that the linker is gnu, then add -z defs, to forbid
- # undefined symbols in object files.
- LDFLAGS="$LDFLAGS -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
- if test "x$DEBUG_LEVEL" == "xrelease"; then
- # When building release libraries, tell the linker optimize them.
- # Should this be supplied to the OSS linker as well?
- LDFLAGS="$LDFLAGS -Xlinker -O1"
- fi
- fi
-
- LDFLAGS_JDKLIB="$LDFLAGS $SHARED_LIBRARY_FLAGS \
- -L${JDK_OUTPUTDIR}/objs \
- -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
- -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
- -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
- LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
- if test "x$COMPILER_NAME" = xossc; then
- LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
- fi
-
- # Only the jli library is explicitly linked when the launchers are built.
- # The libjvm is then dynamically loaded/linked by the launcher.
- if test "x$HOST_OS" != "xmacosx"; then
- LDFLAGS_JDKEXE="$LDFLAGS -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
- LDFLAGS_JDKEXE_SUFFIX="-ljli"
- fi
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-###############################################################################
-#
-# statically link libstdc++ before C++ ABI is stablized on Linux unless
-# dynamic build is configured on command line.
-#
-# Check whether --enable-static-link-stdc++ was given.
-if test "${enable_static_link_stdc__+set}" = set; then :
- enableval=$enable_static_link_stdc__;
-else
-
- enable_static_link_stdc__=yes
-
-fi
-
-
-if test "x$HOST_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_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
- as_fn_error $? "I cannot link to stdc++! Neither dynamically nor statically." "$LINENO" 5
- fi
-
- if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
-$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
- enable_static_link_stdc__=no
- fi
-
- if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
-$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
- enable_static_link_stdc__=yes
- 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 test "x$enable_static_link_stdc__" = xyes; then
- LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
- LDCXX="$CC"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
-$as_echo "static" >&6; }
- else
- LIBCXX="$LIBCXX -lstdc++"
- LDCXX="$CXX"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
-$as_echo "dynamic" >&6; }
- fi
-fi
-
-###############################################################################
-#
-# Could someone enlighten this configure script with a comment about libCrun?
-# The LEGACY_HOST_CPU3 is the setting for ISA_DIR.
-#
-if test "x$HOST_OS" = xsolaris && test "x$LIBCXX" = x; then
- LIBCXX="/usr/lib${LEGACY_HOST_CPU3}/libCrun.so.1"
-fi
-
-# TODO better (platform agnostic) test
-if test "x$HOST_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
- LIBCXX="-lstdc++"
-fi
-
-
-
-###############################################################################
-
-OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
-OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
-OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
-OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
-
-
-
-
-###############################################################################
-#
-# Misc
-#
-
-# The name of the Service Agent jar.
-SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
-if test "x$HOST_OS" = "xwindows"; then
- SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
-fi
-
-
-# Control wether Hotspot runs Queens test after build.
-# Check whether --enable-hotspot-test-in-build was given.
-if test "${enable_hotspot_test_in_build+set}" = set; then :
- enableval=$enable_hotspot_test_in_build;
-else
- enable_hotspot_test_in_build=no
-fi
-
-if test "x$enable_hotspot_test_in_build" = "xyes"; then
- TEST_IN_BUILD=true
-else
- TEST_IN_BUILD=false
-fi
-
-
-###############################################################################
-#
-# Choose cacerts source file
-#
-
-# Check whether --with-cacerts-file was given.
-if test "${with_cacerts_file+set}" = set; then :
- withval=$with_cacerts_file;
-fi
-
-if test "x$with_cacerts_file" != x; then
- CACERTS_FILE=$with_cacerts_file
-else
- if test "x$OPENJDK" = "xtrue"; then
- CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
- else
- CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
- fi
-fi
-
-
-# Check if build directory is on local disk.
-# return 0 if it is on local disk, non-0 if on remote disk or failure
-function is_directory_on_local_disk {
- # df -l lists only local disks; if the given directory is not found then
- # a non-zero exit code is given
- $DF -l $1 > /dev/null 2>&1
-}
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
-$as_echo_n "checking if build directory is on local disk... " >&6; }
-if is_directory_on_local_disk $OUTPUT_ROOT; then
- OUTPUT_DIR_IS_LOCAL="yes"
-else
- OUTPUT_DIR_IS_LOCAL="no"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
-$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
-
-# We're messing a bit with internal autoconf variables to put the config.status in the
-# output directory instead of the current directory.
-CONFIG_STATUS=$OUTPUT_ROOT/config.status
-
-# Now create the actual output files, after this, the main work of configure is done
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) { eval $ac_var=; unset $ac_var;} ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \.
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$1; test $as_status -eq 0 && as_status=1
- if test "$4"; then
- as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by openjdk $as_me version-0.1, which was
-generated by GNU Autoconf 2.67. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to ."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-openjdk config.status version-0.1
-configured by $0, generated by GNU Autoconf 2.67,
- with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=?*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- --*=)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
+ conf_processed_arguments="$conf_processed_arguments $conf_option" ;;
esac
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- '') as_fn_error $? "missing file argument" ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
- "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
- "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
-
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ case $conf_option in
+ -build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+ -target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
+ -host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
+ conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
esac
done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+if $TEST "x$conf_legacy_crosscompile" != "x"; then
+ if $TEST "x$conf_openjdk_target" != "x"; then
+ echo "Error: Specifying --openjdk-target together with autoconf"
+ echo "legacy cross-compilation flags is not supported."
+ echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_legacy_crosscompile."
+ echo "The recommended use is just --openjdk-target."
+ exit 1
else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ echo "Warning: You are using legacy autoconf cross-compilation flags."
+ echo "It is recommended that you use --openjdk-target instead."
+ echo ""
fi
-done
-rm -f conf$$subs.sh
+fi
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' >$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
+if $TEST "x$conf_openjdk_target" != "x"; then
+ conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
+ conf_processed_arguments="--build=$conf_build_platform --host=$conf_openjdk_target --target=$conf_openjdk_target $conf_processed_arguments"
+fi
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
+# Make configure exit with error on invalid options as default.
+# Can be overridden by --disable-option-checking, since we prepend our argument
+# and later options override earlier.
+conf_processed_arguments="--enable-option-checking=fatal $conf_processed_arguments"
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+###
+### Call the configure script
+###
+if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
+ # Closed source configure available; run that instead
+ . $conf_closed_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
-h
-s///
-s/^/:/
-s/[ ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[ ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[ ]*$//
-}'
+ . $conf_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags"
fi
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
+###
+### Post-processing
+###
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
- break
- elif $ac_last_try; then
- as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any. Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[ ]*#[ ]*define[ ][ ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' >$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- for (key in D) D_is_set[key] = 1
- FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
- line = \$ 0
- split(line, arg, " ")
- if (arg[1] == "#") {
- defundef = arg[2]
- mac1 = arg[3]
- } else {
- defundef = substr(arg[1], 2)
- mac1 = arg[2]
- }
- split(mac1, mac2, "(") #)
- macro = mac2[1]
- prefix = substr(line, 1, index(line, defundef) - 1)
- if (D_is_set[macro]) {
- # Preserve the white space surrounding the "#".
- print prefix "define", macro P[macro] D[macro]
- next
- } else {
- # Replace #undef with comments. This is necessary, for example,
- # in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- if (defundef == "undef") {
- print "/*", prefix defundef, macro, "*/"
- next
- }
- }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined" >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
- if test x"$ac_file" != x-; then
- {
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error $? "could not create -" "$LINENO" 5
- fi
- ;;
-
-
- esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-# Finally output some useful information to the user
-
-if test "x$CCACHE_FOUND" != x; then
- if test "x$HAS_GOOD_CCACHE" = x; then
- CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
- CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
- else
- CCACHE_STATUS="installed and in use"
- fi
-else
- if test "x$GCC" = xyes; then
- CCACHE_STATUS="not installed (consider installing)"
- CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
- else
- CCACHE_STATUS="not available for your system"
- fi
-fi
-
-printf "\n"
-printf "====================================================\n"
-printf "A new configuration has been successfully created in\n"
-printf "$OUTPUT_ROOT\n"
-if test "x$CONFIGURE_COMMAND_LINE" != x; then
- printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
-else
- printf "using default settings.\n"
-fi
-
-printf "\n"
-printf "Configuration summary:\n"
-printf "* Debug level: $DEBUG_LEVEL\n"
-printf "* JDK variant: $JDK_VARIANT\n"
-printf "* JVM variants: $with_jvm_variants\n"
-printf "* Host info: OS: $HOST_OS, CPU architecture: $HOST_CPU_ARCH, address length: $HOST_CPU_BITS\n"
-printf "* Boot JDK: $BOOT_JDK\n"
-
-printf "\n"
-printf "Build performance summary:\n"
-printf "* Cores to use: $NUM_CORES\n"
-printf "* Memory limit: $MEMORY_SIZE MB\n"
-printf "* ccache status: $CCACHE_STATUS\n"
-
-if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
- printf "\n"
- printf "WARNING: Your build output directory is not on a local disk.\n"
- printf "This will severely degrade build performance!\n"
- printf "It is recommended that you create an output directory on a local disk,\n"
- printf "and run the configure script again from that directory.\n"
-fi
-
-if test "x$CCACHE_HELP_MSG" != x; then
- printf "\n"
- printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
- printf "$CCACHE_HELP_MSG\n"
-
- help_on_build_dependency ccache
- printf "$HELP_MSG\n"
+# Move the log file to the output root, if this was successfully created
+if $TEST -d "$OUTPUT_ROOT"; then
+ mv -f config.log "$OUTPUT_ROOT" 2> /dev/null
fi
diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac
index be678cc2f15..df8c5f1bcb5 100644
--- a/common/autoconf/configure.ac
+++ b/common/autoconf/configure.ac
@@ -23,2856 +23,204 @@
# questions.
#
+###############################################################################
+#
+# Includes and boilerplate
+#
+###############################################################################
+
+
AC_PREREQ([2.61])
-AC_INIT(openjdk, version-0.1, build-infra-dev@openjdk.java.net)
+AC_INIT(openjdk, jdk8, build-dev@openjdk.java.net)
+
+# Do not change or remove the following line, it is needed for consistency checks:
+# DATE_WHEN_GENERATED: @DATE_WHEN_GENERATED@
AC_CONFIG_AUX_DIR([build-aux])
-
m4_include([build-aux/pkg.m4])
+
+# Include these first...
+m4_include([basics.m4])
m4_include([builddeps.m4])
-m4_include([platform.m4])
-m4_include([cores.m4])
+# ... then the rest
+m4_include([boot-jdk.m4])
+m4_include([build-performance.m4])
m4_include([help.m4])
+m4_include([jdk-options.m4])
+m4_include([libraries.m4])
+m4_include([platform.m4])
+m4_include([source-dirs.m4])
+m4_include([toolchain.m4])
-# Save the command line. Do this very early, before it is lost by calling autoconf macros.
-CONFIGURE_COMMAND_LINE="$@"
-AC_SUBST(CONFIGURE_COMMAND_LINE)
-
-# Locate the directory of this script.
-SCRIPT="[$]0"
-REMOVE_SYMBOLIC_LINKS(SCRIPT)
-AUTOCONF_DIR=`dirname [$]0`
-
-# 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.
-AC_PROG_AWK
-CHECK_NONEMPTY(AWK)
-AC_PATH_PROG(CAT, cat)
-CHECK_NONEMPTY(CAT)
-AC_PATH_PROG(CHMOD, chmod)
-CHECK_NONEMPTY(CHMOD)
-AC_PATH_PROG(CP, cp)
-CHECK_NONEMPTY(CP)
-AC_PATH_PROG(CPIO, cpio)
-CHECK_NONEMPTY(CPIO)
-AC_PATH_PROG(CUT, cut)
-CHECK_NONEMPTY(CUT)
-AC_PATH_PROG(DATE, date)
-CHECK_NONEMPTY(DATE)
-AC_PATH_PROG(DF, df)
-CHECK_NONEMPTY(DF)
-AC_PATH_PROG(DIFF, diff)
-CHECK_NONEMPTY(DIFF)
-# Warning echo is really, really unportable!!!!! Different
-# behaviour in bash and dash and in a lot of other shells!
-# Use printf for serious work!
-AC_PATH_PROG(ECHO, echo)
-CHECK_NONEMPTY(ECHO)
-AC_PROG_EGREP
-CHECK_NONEMPTY(EGREP)
-AC_PROG_FGREP
-CHECK_NONEMPTY(FGREP)
-
-AC_PATH_PROG(FIND, find)
-CHECK_NONEMPTY(FIND)
-CHECK_FIND_DELETE
-AC_SUBST(FIND_DELETE)
-
-AC_PROG_GREP
-CHECK_NONEMPTY(GREP)
-AC_PATH_PROG(HEAD, head)
-CHECK_NONEMPTY(HEAD)
-AC_PATH_PROG(LN, ln)
-CHECK_NONEMPTY(LN)
-AC_PATH_PROG(LS, ls)
-CHECK_NONEMPTY(LS)
-AC_PATH_PROGS(MAKE, [gmake make])
-CHECK_NONEMPTY(MAKE)
-MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'`
-if test "x$MAKE_VERSION" = x; then
- AC_MSG_ERROR([You must use GNU make 3.81 or newer! Please put it in the path.])
-fi
-AC_PATH_PROG(MKDIR, mkdir)
-CHECK_NONEMPTY(MKDIR)
-AC_PATH_PROG(MV, mv)
-CHECK_NONEMPTY(MV)
-AC_PATH_PROGS(NAWK, [nawk gawk awk])
-CHECK_NONEMPTY(NAWK)
-AC_PATH_PROG(PRINTF, printf)
-CHECK_NONEMPTY(PRINTF)
-AC_PATH_PROG(THEPWDCMD, pwd)
-AC_PATH_PROG(RM, rm)
-CHECK_NONEMPTY(RM)
-RM="$RM -f"
-AC_PROG_SED
-CHECK_NONEMPTY(SED)
-AC_PATH_PROG(SH, sh)
-CHECK_NONEMPTY(SH)
-AC_PATH_PROG(SORT, sort)
-CHECK_NONEMPTY(SORT)
-AC_PATH_PROG(TAR, tar)
-CHECK_NONEMPTY(TAR)
-AC_PATH_PROG(TAIL, tail)
-CHECK_NONEMPTY(TAIL)
-AC_PATH_PROG(TEE, tee)
-CHECK_NONEMPTY(TEE)
-AC_PATH_PROG(TR, tr)
-CHECK_NONEMPTY(TR)
-AC_PATH_PROG(TOUCH, touch)
-CHECK_NONEMPTY(TOUCH)
-AC_PATH_PROG(WC, wc)
-CHECK_NONEMPTY(WC)
-AC_PATH_PROG(XARGS, xargs)
-CHECK_NONEMPTY(XARGS)
-AC_PATH_PROG(ZIP, zip)
-CHECK_NONEMPTY(ZIP)
-AC_PATH_PROG(UNZIP, unzip)
-CHECK_NONEMPTY(UNZIP)
-AC_PATH_PROG(LDD, ldd)
-if test "x$LDD" = "x"; then
- # List shared lib dependencies is used for
- # debug output and checking for forbidden dependencies.
- # We can build without it.
- LDD="true"
-fi
-AC_PATH_PROG(OTOOL, otool)
-if test "x$OTOOL" = "x"; then
- OTOOL="true"
-fi
-AC_PATH_PROG(READELF, readelf)
-AC_PATH_PROG(EXPR, expr)
-CHECK_NONEMPTY(EXPR)
-AC_PATH_PROG(FILE, file)
-CHECK_NONEMPTY(FILE)
-AC_PATH_PROG(HG, hg)
-
-# Figure out the build and host system.
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-
-AC_ARG_WITH(data-model, [AS_HELP_STRING([--with-data-model],
- [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-data-model=32 @<:@guessed@:>@])])
-
-if test "x$with_data_model" != x && \
- test "x$with_data_model" != x32 && \
- test "x$with_data_model" != x64 ; then
- AC_MSG_ERROR([The data model can only be 32 or 64!])
-fi
-# Translate the standard cpu-vendor-kernel-os quadruplets into
-# the new HOST_.... and BUILD_... and the legacy names used by
-# the openjdk build.
-# It uses $host_os $host_cpu $build_os $build_cpu and $with_data_model
-EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS
-# Now the following vars are defined.
-# HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
-# HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
-# HOST_OS_API=posix,winapi
-#
-# HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
-# HOST_CPU_ARCH=x86,sparc,pcc,arm
-# HOST_CPU_BITS=32,64
-# HOST_CPU_ENDIAN=big,little
-#
-# There is also a:
-# LEGACY_HOST_CPU1=i586,amd64,.... # used to set the old var ARCH
-# LEGACY_HOST_CPU2=i386,amd64,.... # used to set the old var LIBARCH
-# LEGACY_HOST_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
-# There was also a BUILDARCH that had i486,amd64,... but we do not use that
-# in the new build.
-# LEGACY_HOST_OS_API=solaris,windows # used to select source roots
-
-DATE_WHEN_CONFIGURED=`LANG=C date`
-AC_SUBST(DATE_WHEN_CONFIGURED)
-
-# How many cores do we have on this build system?
-AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
- [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
-if test "x$with_num_cores" = x; then
- # The number of cores were not specified, try to probe them.
- CHECK_CORES
-else
- NUM_CORES=$with_num_cores
- CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
-fi
-AC_SUBST(NUM_CORES)
-AC_SUBST(CONCURRENT_BUILD_JOBS)
-
-# How many cores do we have on this build system?
-AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
- [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
-if test "x$with_memory_size" = x; then
- # The memory size was not specified, try to probe it.
- CHECK_MEMORY_SIZE
-else
- MEMORY_SIZE=$with_memory_size
-fi
-AC_SUBST(MEMORY_SIZE)
-
-# Where is the source? It is located two levels above the configure script.
-CURDIR="$PWD"
-cd "$AUTOCONF_DIR/../.."
-SRC_ROOT="`pwd`"
-AC_SUBST(SRC_ROOT)
-cd "$CURDIR"
-
-# For cygwin we need cygpath first, since it is used everywhere.
-AC_PATH_PROG(CYGPATH, cygpath)
-PATH_SEP=":"
-if test "x$BUILD_OS" = "xwindows"; then
- if test "x$CYGPATH" = x; then
- AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
- fi
- PATH_SEP=";"
-fi
-AC_SUBST(PATH_SEP)
-
-SPACESAFE(SRC_ROOT,[the path to the source root])
-SPACESAFE(CURDIR,[the path to the current directory])
-
-if test "x$BUILD_OS" = "xsolaris"; then
- # Also search in /usr/ccs/bin for utilities like ar and as.
- PATH="/usr/ccs/bin:$PATH"
-fi
+# This line needs to be here, verbatim, after all includes.
+# It is replaced with closed functionality when building
+# closed sources.
+AC_DEFUN_ONCE([CLOSED_HOOK])
###############################################################################
#
-# OpenJDK or closed
+# Initialization
#
-AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
- [build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,)
-
-if test "x$enable_openjdk_only" = "xyes"; then
- OPENJDK=true
-elif test "x$enable_openjdk_only" = "xno"; then
- OPENJDK=false
-elif test -d "$SRC_ROOT/jdk/src/closed"; then
- OPENJDK=false
-else
- OPENJDK=true
-fi
-
-if test "x$OPENJDK" = "xtrue"; then
- SET_OPENJDK=OPENJDK=true
-fi
-
-AC_SUBST(SET_OPENJDK)
-
###############################################################################
-#
-# JIGSAW or not. The JIGSAW variable is used during the intermediate
-# stage when we are building both the old style JDK and the new style modularized JDK.
-# When the modularized JDK is finalized, this option will go away.
-#
-AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
- [build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
-if test "x$enable_jigsaw" = "xyes"; then
- JIGSAW=true
-else
- JIGSAW=false
-fi
-AC_SUBST(JIGSAW)
+# Basic initialization that must happen first of all
+BASIC_INIT
+BASIC_SETUP_PATHS
+BASIC_SETUP_LOGGING
-###############################################################################
-#
-# Check which variant of the JDK that we want to build.
-# Currently we have:
-# normal: standard edition
-# embedded: cut down to a smaller footprint
-#
-# Effectively the JDK variant gives a name to a specific set of
-# modules to compile into the JDK. In the future, these modules
-# might even be Jigsaw modules.
-#
-AC_MSG_CHECKING([which variant of the JDK to build])
-AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
- [JDK variant to build (normal, embedded) @<:@normal@:>@])])
+# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
+HELP_SETUP_DEPENDENCY_HELP
-if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
- JAVASE_EMBEDDED=""
- MINIMIZE_RAM_USAGE=""
- JDK_VARIANT="normal"
-elif test "x$with_jdk_variant" = xembedded; then
- JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
- MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
- JDK_VARIANT="embedded"
-else
- AC_MSG_ERROR([The available JDK variants are: normal, embedded])
-fi
-
-AC_SUBST(JAVASE_EMBEDDED)
-AC_SUBST(MINIMIZE_RAM_USAGE)
-AC_SUBST(JDK_VARIANT)
+# Setup simple tools, that do not need have cross compilation support.
+# Without these, we can't properly run the rest of the configure script.
+BASIC_SETUP_TOOLS
-AC_MSG_RESULT([$JDK_VARIANT])
-
-###############################################################################
-#
-# Should we build a JDK/JVM with head support (ie a graphical ui)?
-# We always build headless support.
-#
-AC_MSG_CHECKING([headful support])
-AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
- [build headful support (graphical UI support) @<:@enabled@:>@])],
- [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
-
-SUPPORT_HEADLESS=yes
-BUILD_HEADLESS="BUILD_HEADLESS:=true"
-
-if test "x$SUPPORT_HEADFUL" = xyes; then
- # We are building both headful and headless.
- BUILD_HEADLESS_ONLY=""
- headful_msg="inlude support for both headful and headless"
-fi
-
-if test "x$SUPPORT_HEADFUL" = xno; then
- # Thus we are building headless only.
- BUILD_HEADLESS="BUILD_HEADLESS:=true"
- BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
- headful_msg="headless only"
-fi
-
-AC_MSG_RESULT([$headful_msg])
-
-AC_SUBST(SUPPORT_HEADLESS)
-AC_SUBST(SUPPORT_HEADFUL)
-AC_SUBST(BUILD_HEADLESS)
-AC_SUBST(BUILD_HEADLESS_ONLY)
-
-###############################################################################
-#
-# Check which variants of the JVM that we want to build.
-# Currently we have:
-# server: normal interpreter and a tiered C1/C2 compiler
-# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
-# kernel: kernel footprint JVM that passes the TCK without major performance problems,
-# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
-# zero: no machine code interpreter, no compiler
-# zeroshark: zero interpreter and shark/llvm compiler backend
-AC_MSG_CHECKING([which variants of the JVM that should be built])
-AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
- [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
-
-if test "x$with_jvm_variants" = x; then
- if test "x$JDK_VARIANT" = xembedded; then
- with_jvm_variants="kernel"
- elif test "x$HOST_CPU_BITS" = x64; then
- with_jvm_variants="server"
- else
- # Yes, on 32-bit machines, the same source (almost) is compiled twice
- # to generate two libjvm.so files. Fun, fun.
- with_jvm_variants="client,server"
- fi
-fi
-
-JVM_VARIANTS=",$with_jvm_variants,"
-TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
-
-if test "x$TEST_VARIANTS" != "x,"; then
- AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark])
-fi
-AC_MSG_RESULT([$with_jvm_variants])
-
-JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
-JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
-JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
-JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
-JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
-
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
- if test "x$HOST_CPU_BITS" = x64; then
- AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
- fi
-fi
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
- if test "x$HOST_CPU_BITS" = x64; then
- AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
- fi
-fi
-
-COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
-# Replace the commas with AND for use in the build directory name.
-ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
-if test "x$COUNT_VARIANTS" != "x,1"; then
- AC_MSG_NOTICE([NOTE! Longer build time since we are building more than one version of the libjvm! $with_jvm_variants])
-fi
-
-AC_SUBST(JVM_VARIANTS)
-AC_SUBST(JVM_VARIANT_SERVER)
-AC_SUBST(JVM_VARIANT_CLIENT)
-AC_SUBST(JVM_VARIANT_KERNEL)
-AC_SUBST(JVM_VARIANT_ZERO)
-AC_SUBST(JVM_VARIANT_ZEROSHARK)
-
-###############################################################################
-#
-# Set the debug level
-# release: no debug information, all optimizations, no asserts.
-# fastdebug: debug information (-g), all optimizations, all asserts
-# slowdebug: debug information (-g), no optimizations, all asserts
-#
-DEBUG_LEVEL="release"
-AC_MSG_CHECKING([which debug level to use])
-AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
- [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
- [
- ENABLE_DEBUG="${enableval}"
- DEBUG_LEVEL="fastdebug"
- ], [ENABLE_DEBUG="no"])
-
-AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
- [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
- [
- DEBUG_LEVEL="${withval}"
- if test "x$ENABLE_DEBUG" = xyes; then
- AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
- fi
- ])
-AC_MSG_RESULT([$DEBUG_LEVEL])
-
-if test "x$DEBUG_LEVEL" != xrelease && \
- test "x$DEBUG_LEVEL" != xfastdebug && \
- test "x$DEBUG_LEVEL" != xslowdebug; then
- AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
-fi
-
-case $DEBUG_LEVEL in
- release )
- VARIANT="OPT"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="false"
- BUILD_VARIANT_RELEASE=""
- ;;
- fastdebug )
- VARIANT="DBG"
- FASTDEBUG="true"
- DEBUG_CLASSFILES="true"
- BUILD_VARIANT_RELEASE="-fastdebug"
- ;;
- slowdebug )
- VARIANT="DBG"
- FASTDEBUG="false"
- DEBUG_CLASSFILES="true"
- BUILD_VARIANT_RELEASE="-debug"
- ;;
-esac
-
-AC_SUBST(DEBUG_LEVEL)
-AC_SUBST(VARIANT)
-AC_SUBST(FASTDEBUG)
-AC_SUBST(DEBUG_CLASSFILES)
-AC_SUBST(BUILD_VARIANT_RELEASE)
-
-# Source the version numbers
-. $AUTOCONF_DIR/version.numbers
-if test "x$OPENJDK" = "xfalse"; then
- . $AUTOCONF_DIR/closed.version.numbers
-fi
-# Now set the JDK version, milestone, build number etc.
-AC_SUBST(JDK_MAJOR_VERSION)
-AC_SUBST(JDK_MINOR_VERSION)
-AC_SUBST(JDK_MICRO_VERSION)
-AC_SUBST(JDK_UPDATE_VERSION)
-AC_SUBST(JDK_BUILD_NUMBER)
-AC_SUBST(MILESTONE)
-AC_SUBST(LAUNCHER_NAME)
-AC_SUBST(PRODUCT_NAME)
-AC_SUBST(PRODUCT_SUFFIX)
-AC_SUBST(JDK_RC_PLATFORM_NAME)
-AC_SUBST(COMPANY_NAME)
-
-COPYRIGHT_YEAR=`date +'%Y'`
-AC_SUBST(COPYRIGHT_YEAR)
-
-RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
-AC_SUBST(RUNTIME_NAME)
-
-if test "x$JDK_UPDATE_VERSION" != x; then
- JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
-else
- JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
-fi
-AC_SUBST(JDK_VERSION)
-
-if test "x$MILESTONE" != x; then
- RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
-else
- RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
-fi
-AC_SUBST(RELEASE)
-
-if test "x$JDK_BUILD_NUMBER" != x; then
- FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
-else
- JDK_BUILD_NUMBER=b00
- BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
- # Avoid [:alnum:] since it depends on the locale.
- CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
- USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
- FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
-fi
-AC_SUBST(FULL_VERSION)
-COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
-AC_SUBST(COOKED_BUILD_NUMBER)
-
-# Test from where we are running configure, in or outside of src root.
-if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
- # We are running configure from the src root.
- # Create a default ./build/host-variant-debuglevel output root.
- CONF_NAME="${HOST_OS}-${HOST_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
- OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
- mkdir -p "$OUTPUT_ROOT"
- if test ! -d "$OUTPUT_ROOT"; then
- AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
- fi
-else
- # We are running configure from outside of the src dir.
- # Then use the current directory as output dir!
- # If configuration is situated in normal build directory, just use the build
- # directory name as configuration name, otherwise use the complete path.
- CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
- OUTPUT_ROOT="$CURDIR"
-fi
-
-SPACESAFE(OUTPUT_ROOT,[the path to the output root])
-
-# Save the arguments given to us
-echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
-
-# Check if the VS env variables were setup prior to running configure.
-# If not, then find vcvarsall.bat and run it automatically, and integrate
-# the set env variables into the spec file.
-SETUPDEVENV="# No special vars"
-if test "x$BUILD_OS" = "xwindows"; then
- # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
- if test "x$VCINSTALLDIR" != x; then
- # No further setup is needed. The build will happen from this kind
- # of shell.
- SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
- # Make sure to remind you, if you forget to run make from a cygwin bash shell
- # that is spawned "bash -l" from a VS command prompt.
- CHECK_FOR_VCINSTALLDIR=yes
- AC_MSG_CHECKING([if you are running from within a VS command prompt])
- AC_MSG_RESULT([yes])
- else
- # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
- if test "x$VS100COMNTOOLS" != x; then
- VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
- SEARCH_ROOT="$VS100COMNTOOLS"
- else
- VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
- SEARCH_ROOT="$PROGRAMFILES"
- fi
- VCPATH=`dirname "$VARSBAT"`
- VCPATH=`cygpath -w "$VCPATH"`
- if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
- AC_MSG_CHECKING([if we can find the VS installation])
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
- fi
- case "$LEGACY_HOST_CPU1" in
- i?86)
- VARSBAT_ARCH=x86
- ;;
- *)
- VARSBAT_ARCH=$LEGACY_HOST_CPU1
- ;;
- esac
- # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
- cd $OUTPUT_ROOT
- bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
- cd $CURDIR
- if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
- AC_MSG_CHECKING([if we can extract the needed env variables])
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not succesfully extract the env variables needed for the VS setup. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
- fi
- # Now set all paths and other env variables. This will allow the rest of
- # the configure script to find and run the compiler in the proper way.
- . $OUTPUT_ROOT/localdevenv.sh
- AC_MSG_CHECKING([if we can find the VS installation])
- if test "x$VCINSTALLDIR" != x; then
- AC_MSG_RESULT([$VCINSTALLDIR])
- else
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find VS installation. Please install. If you are sure you have installed VS, then please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
- fi
- CHECK_FOR_VCINSTALLDIR=no
- SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
-
- AC_MSG_CHECKING([for msvcr100.dll])
- AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll],
- [copy this msvcr100.dll into the built JDK])])
- if test "x$with_msvcr100dll" != x; then
- MSVCR100DLL="$with_msvcr100dll"
- else
- if test "x$HOST_CPU_BITS" = x64; then
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
- else
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
- if test "x$MSVCR100DLL" = x; then
- MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
- fi
- fi
- fi
- if test "x$MSVCR100DLL" = x; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find msvcr100.dll !])
- fi
- AC_MSG_RESULT([$MSVCR100DLL])
- SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll])
- fi
-fi
-AC_SUBST(SETUPDEVENV)
-AC_SUBST(CHECK_FOR_VCINSTALLDIR)
-AC_SUBST(MSVCR100DLL)
-
-# Most of the probed defines are put into config.h
-AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
-# The spec.gmk file contains all variables for the make system.
-AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
-# The generated Makefile knows where the spec.gmk is and where the source is.
-# You can run make from the OUTPUT_ROOT. If you have only
-# one configured host, then you can also run make from the SRC_ROOT,
-# since it will go look for a single spec.gmk file. Or perhaps it
-# should instead make all configured hosts it can find?
-AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
-
-AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
-AC_SUBST(CONF_NAME, $CONF_NAME)
-AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
-
-# Where are the sources. Any of these can be overridden
-# using --with-override-corba and the likes.
-LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
-CORBA_TOPDIR="$SRC_ROOT/corba"
-JAXP_TOPDIR="$SRC_ROOT/jaxp"
-JAXWS_TOPDIR="$SRC_ROOT/jaxws"
-HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
-JDK_TOPDIR="$SRC_ROOT/jdk"
-AC_SUBST(LANGTOOLS_TOPDIR)
-AC_SUBST(CORBA_TOPDIR)
-AC_SUBST(JAXP_TOPDIR)
-AC_SUBST(JAXWS_TOPDIR)
-AC_SUBST(HOTSPOT_TOPDIR)
-AC_SUBST(JDK_TOPDIR)
+# 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
# Check if pkg-config is available.
PKG_PROG_PKG_CONFIG
-AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
- [use this configuration file for the builddeps])])
+###############################################################################
+#
+# Determine OpenJDK build and target platforms.
+#
+###############################################################################
-AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
- [download and use build dependencies from this server url, e.g. --with-builddeps-server=ftp://example.com/dir])])
+PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
+PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
-AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
- [store downloaded build dependencies here @<:@d/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])])
-
-AC_ARG_ENABLE([list-builddeps], [AS_HELP_STRING([--enable-list-builddeps],
- [list all build dependencies known to the configure script])],
- [LIST_BUILDDEPS="${enableval}"], [LIST_BUILDDEPS='no'])
-
-if test "x$LIST_BUILDDEPS" = xyes; then
- echo
- echo List of build dependencies known to the configure script,
- echo that can be used in builddeps.conf files:
- cat $SRC_ROOT/configure.ac | grep BDEPS_CHECK_MODUL | grep -v configure.ac | cut -f 2 -d ',' | tr -d ' ' | sort
- echo
- exit 1
-fi
-
-# If builddeps server or conf file is given. Setup buildeps usage.
-BDEPS_SCAN_FOR_BUILDDEPS
+# With knowledge of the build platform, setup more basic things.
+BASIC_SETUP_PATH_SEP
+BASIC_SETUP_SEARCHPATH
###############################################################################
#
-# Configure the development tool paths and potential sysroot.
+# Determine OpenJDK variants, options and version numbers.
#
-AC_LANG(C++)
-DEVKIT=
-SYS_ROOT=/
-AC_SUBST(SYS_ROOT)
+###############################################################################
-# The option used to specify the target .o,.a or .so file.
-# When compiling, how to specify the to be created object file.
-CC_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created executable.
-EXE_OUT_OPTION='-o$(SPACE)'
-# When linking, how to specify the to be created dynamically linkable library.
-LD_OUT_OPTION='-o$(SPACE)'
-# When archiving, how to specify the to be create static archive for object files.
-AR_OUT_OPTION='rcs$(SPACE)'
-AC_SUBST(CC_OUT_OPTION)
-AC_SUBST(EXE_OUT_OPTION)
-AC_SUBST(LD_OUT_OPTION)
-AC_SUBST(AR_OUT_OPTION)
+# We need build & target for this.
+JDKOPT_SETUP_JDK_VARIANT
+JDKOPT_SETUP_JVM_VARIANTS
+JDKOPT_SETUP_DEBUG_LEVEL
+JDKOPT_SETUP_JDK_OPTIONS
+JDKOPT_SETUP_JDK_VERSION_NUMBERS
-# If --build AND --host is set, then the configure script will find any
-# cross compilation tools in the PATH. Cross compilation tools
-# follows the cross compilation standard where they are prefixed with ${host}.
-# For example the binary i686-sun-solaris2.10-gcc
-# will cross compile for i686-sun-solaris2.10
-# If neither of build and host is not set, then build=host and the
-# default compiler found in the path will be used.
-# Setting only --host, does not seem to be really supported.
-# Please set both --build and --host if you want to cross compile.
-
-DEFINE_CROSS_COMPILE_ARCH=""
-HOSTCC=""
-HOSTCXX=""
-AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
-AC_SUBST(HOST_CC)
-AC_SUBST(HOST_CXX)
-AC_MSG_CHECKING([if this is a cross compile])
-if test "x$build_var" != "x$host_var"; then
- AC_MSG_RESULT([yes, from $build_var to $host_var])
- # We have detected a cross compile!
- DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_HOST_CPU1"
- # Now we to find a C/C++ compiler that can build executables for the build
- # platform. We can't use the AC_PROG_CC macro, since it can only be used
- # once.
- AC_PATH_PROGS(HOSTCC, [cl cc gcc])
- WHICHCMD(HOSTCC)
- AC_PATH_PROGS(HOSTCXX, [cl CC g++])
- WHICHCMD(HOSTCXX)
- # Building for the build platform should be easy. Therefore
- # we do not need any linkers or assemblers etc.
-else
- AC_MSG_RESULT([no])
-fi
-
-# You can force the sys-root if the sys-root encoded into the cross compiler tools
-# is not correct.
-AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
- [pass this sys-root to the compilers and linker (useful if the sys-root encoded in
- the cross compiler tools is incorrect)])])
-
-if test "x$with_sys_root" != x; then
- SYS_ROOT=$with_sys_root
-fi
-
-# If a devkit is found on the builddeps server, then prepend its path to the
-# PATH variable. If there are cross compilers available in the devkit, these
-# will be found by AC_PROG_CC et al.
-BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
- [# Found devkit
- PATH="$DEVKIT/bin:$PATH"
- SYS_ROOT="$DEVKIT/${rewritten_host}/sys-root"
- if test "x$x_includes" = "xNONE"; then
- x_includes="$SYS_ROOT/usr/include/X11"
- fi
- if test "x$x_libraries" = "xNONE"; then
- x_libraries="$SYS_ROOT/usr/lib"
- fi
- ],
- [])
-
-if test "x$SYS_ROOT" != "x/" ; then
- CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
- CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
- OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
- OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
- CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
- LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
-fi
-
-# Store the CFLAGS etal passed to the configure script.
-ORG_CFLAGS="$CFLAGS"
-ORG_CXXFLAGS="$CXXFLAGS"
-ORG_OBJCFLAGS="$OBJCFLAGS"
-
-prepare_help_system
-
-# gcc is almost always present, but on Windows we
-# prefer cl.exe and on Solaris we prefer CC.
-# Thus test for them in this order.
-AC_PROG_CC([cl cc gcc])
-if test "x$CC" = x; then
- help_on_build_dependency devkit
- AC_MSG_ERROR([Could not find a compiler. $HELP_MSG])
-fi
-if test "x$CC" = xcc && test "x$BUILD_OS" = xmacosx; then
- # Do not use cc on MacOSX use gcc instead.
- CC="gcc"
-fi
-WHICHCMD(CC)
-
-AC_PROG_CXX([cl CC g++])
-if test "x$CXX" = xCC && test "x$BUILD_OS" = xmacosx; then
- # The found CC, even though it seems to be a g++ derivate, cannot compile
- # c++ code. Override.
- CXX="g++"
-fi
-WHICHCMD(CXX)
-
-if test "x$CXX" = x || test "x$CC" = x; then
- help_on_build_dependency devkit
- AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ])
-fi
-
-if test "x$BUILD_OS" != xwindows; then
- AC_PROG_OBJC
- WHICHCMD(OBJC)
-else
- OBJC=
-fi
-
-# Restore the flags to the user specified values.
-# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
-CFLAGS="$ORG_CFLAGS"
-CXXFLAGS="$ORG_CXXFLAGS"
-OBJCFLAGS="$ORG_OBJCFLAGS"
-
-# If we are not cross compiling, use the same compilers for
-# building the build platform executables.
-if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
- HOSTCC="$CC"
- HOSTCXX="$CXX"
-fi
-
-AC_CHECK_TOOL(LD, ld)
-WHICHCMD(LD)
-LD="$CC"
-LDEXE="$CC"
-LDCXX="$CXX"
-LDEXECXX="$CXX"
-# LDEXE is the linker to use, when creating executables.
-AC_SUBST(LDEXE)
-# Linking C++ libraries.
-AC_SUBST(LDCXX)
-# Linking C++ executables.
-AC_SUBST(LDEXECXX)
-
-AC_CHECK_TOOL(AR, ar)
-WHICHCMD(AR)
-if test "x$BUILD_OS" = xmacosx; then
- ARFLAGS="-r"
-else
- ARFLAGS=""
-fi
-AC_SUBST(ARFLAGS)
-
-COMPILER_NAME=gcc
-COMPILER_TYPE=CC
-AS_IF([test "x$BUILD_OS" = xwindows], [
- # For now, assume that we are always compiling using cl.exe.
- CC_OUT_OPTION=-Fo
- EXE_OUT_OPTION=-out:
- LD_OUT_OPTION=-out:
- AR_OUT_OPTION=-out:
- # On Windows, reject /usr/bin/link, which is a cygwin
- # program for something completely different.
- AC_CHECK_PROG([WINLD], [link],[link],,, [/usr/bin/link])
- # Since we must ignore the first found link, WINLD will contain
- # the full path to the link.exe program.
- WHICHCMD_SPACESAFE([WINLD])
- LD="$WINLD"
- LDEXE="$WINLD"
- LDCXX="$WINLD"
- LDEXECXX="$WINLD"
-
- AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
- WHICHCMD_SPACESAFE([MT])
- # The resource compiler
- AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
- WHICHCMD_SPACESAFE([RC])
-
- RC_FLAGS="-nologo /l 0x409 /r"
- AS_IF([test "x$VARIANT" = xOPT], [
- RC_FLAGS="$RC_FLAGS -d NDEBUG"
- ])
- JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
- AS_IF([test "x$JDK_UPDATE_VERSION" = x], [
- JDK_UPDATE_VERSION_NOTNULL=0
- ])
- RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
- RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
-
- # lib.exe is used to create static libraries.
- AC_CHECK_PROG([WINAR], [lib],[lib],,,)
- WHICHCMD_SPACESAFE([WINAR])
- AR="$WINAR"
- ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
-
- AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
- WHICHCMD_SPACESAFE([DUMPBIN])
-
- COMPILER_TYPE=CL
- CCXXFLAGS="$CCXXFLAGS -nologo"
- LDFLAGS="$LDFLAGS -nologo -opt:ref -incremental:no"
- if test "x$LEGACY_HOST_CPU1" = xi586; then
- LDFLAGS="$LDFLAGS -safeseh"
- fi
- # TODO: make -debug optional "--disable-full-debug-symbols"
- LDFLAGS="$LDFLAGS -debug"
-])
-AC_SUBST(RC_FLAGS)
-AC_SUBST(COMPILER_TYPE)
-
-AC_PROG_CPP
-WHICHCMD(CPP)
-
-AC_PROG_CXXCPP
-WHICHCMD(CXXCPP)
-
-# Find the right assembler.
-if test "x$BUILD_OS" = xsolaris; then
- AC_PATH_PROG(AS, as)
- WHICHCMD(AS)
- ASFLAGS=" "
-else
- AS="$CC -c"
- ASFLAGS=" "
-fi
-AC_SUBST(AS)
-AC_SUBST(ASFLAGS)
-
-if test "x$HOST_CPU_BITS" = x32 && test "x$HOST_OS" = xmacosx; then
- # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
- # While waiting for a better solution, the current workaround is to use -mstackrealign.
- CFLAGS="$CFLAGS -mstackrealign"
- AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
- AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
- [
- AC_MSG_RESULT([yes])
- ],
- [
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
- ])
-fi
-
-if test "x$BUILD_OS" = xsolaris; then
- AC_PATH_PROG(NM, nm)
- WHICHCMD(NM)
- AC_PATH_PROG(STRIP, strip)
- WHICHCMD(STRIP)
- AC_PATH_PROG(MCS, mcs)
- WHICHCMD(MCS)
-else
- AC_CHECK_TOOL(NM, nm)
- WHICHCMD(NM)
- AC_CHECK_TOOL(STRIP, strip)
- WHICHCMD(STRIP)
-fi
-
-# When using cygwin, we need a wrapper binary that renames
-# /cygdrive/c/ arguments into c:/ arguments and peeks into
-# @files and rewrites these too! This wrapper binary is
-# called uncygdrive.exe.
-UNCYGDRIVE=
-if test "x$BUILD_OS" = xwindows; then
- AC_MSG_CHECKING([if uncygdrive can be created])
- UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
- rm -f $OUTPUT_ROOT/uncygdrive*
- UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
- cd $OUTPUT_ROOT
- $CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
- cd $CURDIR
-
- if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
- AC_MSG_RESULT([no])
- cat $OUTPUT_ROOT/uncygdrive1.log
- AC_MSG_ERROR([Could not create $OUTPUT_ROOT/uncygdrive.exe])
- fi
- AC_MSG_RESULT([$UNCYGDRIVE])
- AC_MSG_CHECKING([if uncygdrive.exe works])
- cd $OUTPUT_ROOT
- $UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
- cd $CURDIR
- if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
- AC_MSG_RESULT([no])
- cat $OUTPUT_ROOT/uncygdrive2.log
- AC_MSG_ERROR([Uncygdrive did not work!])
- fi
- AC_MSG_RESULT([yes])
- rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
-fi
-
-AC_SUBST(UNCYGDRIVE)
-
-TESTFOR_PROG_CCACHE
-
-# Used on GNU/Linux systems, can be empty...
-#AC_PATH_PROG(ELFDUMP, elfdump)
-
-# Setup default logging of stdout and stderr to build.log in the output root.
-BUILD_LOG='$(OUTPUT_ROOT)/build.log'
-BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
-AC_SUBST(BUILD_LOG)
-AC_SUBST(BUILD_LOG_WRAPPER)
+# To properly create a configuration name, we need to have the OpenJDK target
+# and options (variants and debug level) parsed.
+BASIC_SETUP_OUTPUT_DIR
###############################################################################
#
-# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
-# (The JVM can use 32 or 64 bit Java pointers but that decision
-# is made at runtime.)
+# Setup BootJDK, used to bootstrap the build.
#
-AC_LANG_PUSH(C++)
-OLD_CXXFLAGS="$CXXFLAGS"
-if test "x$HOST_OS" = xsolaris && test "x$with_data_model" != x; then
- CXXFLAGS="-m{$with_data_model} $CXXFLAGS"
-fi
-AC_CHECK_SIZEOF([int *], [1111])
-CXXFLAGS="$OLD_CXXFLAGS"
-AC_LANG_POP(C++)
+###############################################################################
-if test "x$ac_cv_sizeof_int_p" = x0; then
- # The test failed, lets pick the assumed value.
- ARCH_DATA_MODEL=$HOST_CPU_BITS
-else
- ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
-fi
-
-if test "x$ARCH_DATA_MODEL" = x64; then
- A_LP64="LP64:="
- ADD_LP64="-D_LP64=1"
-fi
-AC_MSG_CHECKING([for host address size])
-AC_MSG_RESULT([$ARCH_DATA_MODEL bits])
-AC_SUBST(LP64,$A_LP64)
-AC_SUBST(ARCH_DATA_MODEL)
-
-if test "x$ARCH_DATA_MODEL" != "x$HOST_CPU_BITS"; then
- AC_MSG_ERROR([The tested number of bits in the host ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the host ($HOST_CPU_BITS)])
-fi
+BOOTJDK_SETUP_BOOT_JDK
+BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
###############################################################################
#
+# Configure the sources to use. We can add or override individual directories.
+#
+###############################################################################
+
+SRCDIRS_SETUP_TOPDIRS
+SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS
+SRCDIRS_SETUP_OUTPUT_DIRS
+
+###############################################################################
+#
+# Setup the toolchain (compilers etc), i.e. the tools that need to be
+# cross-compilation aware.
+#
+###############################################################################
+
+TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
+TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
+# Locate the actual tools
+TOOLCHAIN_SETUP_PATHS
+
+# FIXME: Currently we must test this after paths but before flags. Fix!
+
+# And we can test some aspects on the target using configure macros.
+PLATFORM_TEST_OPENJDK_TARGET_BITS
+PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
+
+# Configure flags for the tools
+TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
+TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
+TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
+
+# After we have toolchain, we can compile the uncygdrive helper
+BASIC_COMPILE_UNCYGDRIVE
+
+
+# Setup debug symbols (need objcopy from the toolchain for that)
+JDKOPT_SETUP_DEBUG_SYMBOLS
+
+###############################################################################
+#
+# Check dependencies for external and internal libraries.
+#
+###############################################################################
+
+LIB_SETUP_INIT
+LIB_SETUP_X11
+LIB_SETUP_CUPS
+LIB_SETUP_FREETYPE
+LIB_SETUP_ALSA
+LIB_SETUP_MISC_LIBS
+LIB_SETUP_STATIC_LINK_LIBSTDCPP
+
+###############################################################################
+#
+# We need to do some final tweaking, when everything else is done.
+#
+###############################################################################
+
+JDKOPT_SETUP_BUILD_TWEAKS
+
+###############################################################################
+#
+# Configure parts of the build that only affect the build performance,
+# not the result.
+#
+###############################################################################
+
+BPERF_SETUP_BUILD_CORES
+BPERF_SETUP_BUILD_MEMORY
+
+# Setup smart javac (after cores and memory have been setup)
+BPERF_SETUP_SMART_JAVAC
+
# Can the C/C++ compiler use precompiled headers?
-#
-AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
- [use precompiled headers when compiling C++ @<:@enabled@:>@])],
- [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
+BPERF_SETUP_PRECOMPILED_HEADERS
-USE_PRECOMPILED_HEADER=1
-if test "x$ENABLE_PRECOMPH" = xno; then
- USE_PRECOMPILED_HEADER=0
-fi
-
-if test "x$ENABLE_PRECOMPH" = xyes; then
- # Check that the compiler actually supports precomp headers.
- if test "x$GCC" = xyes; then
- AC_MSG_CHECKING([that precompiled headers work])
- echo "int alfa();" > conftest.h
- $CXX -x c++-header conftest.h -o conftest.hpp.gch
- if test ! -f conftest.hpp.gch; then
- echo Precompiled header is not working!
- USE_PRECOMPILED_HEADER=0
- AC_MSG_RESULT([no])
- else
- AC_MSG_RESULT([yes])
- fi
- rm -f conftest.h
- fi
-fi
-
-AC_SUBST(USE_PRECOMPILED_HEADER)
+# Setup use of ccache, if available
+BPERF_SETUP_CCACHE
###############################################################################
#
-# How to compile shared libraries.
+# And now the finish...
#
-
-if test "x$GCC" = xyes; then
- COMPILER_NAME=gcc
- PICFLAG="-fPIC"
- LIBRARY_PREFIX=lib
- SHARED_LIBRARY='lib$1.so'
- STATIC_LIBRARY='lib$1.a'
- SHARED_LIBRARY_FLAGS="-shared"
- SHARED_LIBRARY_SUFFIX='.so'
- STATIC_LIBRARY_SUFFIX='.a'
- OBJ_SUFFIX='.o'
- EXE_SUFFIX=''
- SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
- SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
- C_FLAG_REORDER=''
- CXX_FLAG_REORDER=''
- SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/$1'
- LD="$CC"
- LDEXE="$CC"
- LDCXX="$CXX"
- LDEXECXX="$CXX"
- # TODO: for embedded set --strip-unneeded
- POST_STRIP_CMD="$STRIP -g"
-
- # Linking is different on MacOSX
- if test "x$BUILD_OS" = xmacosx; then
- # Might change in the future to clang.
- COMPILER_NAME=gcc
- SHARED_LIBRARY='lib$1.dylib'
- SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
- SHARED_LIBRARY_SUFFIX='.dylib'
- EXE_SUFFIX=''
- SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
- SET_SHARED_LIBRARY_MAPFILE=''
- SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
- POST_STRIP_CMD="$STRIP -S"
- fi
-else
- if test "x$BUILD_OS" = xsolaris; then
- # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
- COMPILER_NAME=ossc
- PICFLAG="-KPIC"
- LIBRARY_PREFIX=lib
- SHARED_LIBRARY='lib$1.so'
- STATIC_LIBRARY='lib$1.a'
- SHARED_LIBRARY_FLAGS="-G"
- SHARED_LIBRARY_SUFFIX='.so'
- STATIC_LIBRARY_SUFFIX='.a'
- OBJ_SUFFIX='.o'
- EXE_SUFFIX=''
- SET_SHARED_LIBRARY_NAME=''
- SET_SHARED_LIBRARY_MAPFILE='-M $1'
- C_FLAG_REORDER='-xF'
- CXX_FLAG_REORDER='-xF'
- SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/$1'
- CFLAGS_JDKLIB_EXTRA='-xstrconst -D__solaris__'
- POST_STRIP_CMD="$STRIP -x"
- POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
- fi
- if test "x$BUILD_OS" = xwindows; then
- # If it is not gcc, then assume it is the MS Visual Studio compiler
- COMPILER_NAME=cl
- PICFLAG=""
- LIBRARY_PREFIX=
- SHARED_LIBRARY='$1.dll'
- STATIC_LIBRARY='$1.lib'
- SHARED_LIBRARY_FLAGS="-LD"
- SHARED_LIBRARY_SUFFIX='.dll'
- STATIC_LIBRARY_SUFFIX='.lib'
- OBJ_SUFFIX='.obj'
- EXE_SUFFIX='.exe'
- SET_SHARED_LIBRARY_NAME=''
- SET_SHARED_LIBRARY_MAPFILE=''
- SET_SHARED_LIBRARY_ORIGIN=''
- fi
-fi
-
-AC_SUBST(OBJ_SUFFIX)
-AC_SUBST(SHARED_LIBRARY)
-AC_SUBST(STATIC_LIBRARY)
-AC_SUBST(LIBRARY_PREFIX)
-AC_SUBST(SHARED_LIBRARY_SUFFIX)
-AC_SUBST(STATIC_LIBRARY_SUFFIX)
-AC_SUBST(EXE_SUFFIX)
-AC_SUBST(SHARED_LIBRARY_FLAGS)
-AC_SUBST(SET_SHARED_LIBRARY_NAME)
-AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
-AC_SUBST(C_FLAG_REORDER)
-AC_SUBST(CXX_FLAG_REORDER)
-AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
-AC_SUBST(POST_STRIP_CMD)
-AC_SUBST(POST_MCS_CMD)
-
-# The (cross) compiler is now configured, we can now test capabilities
-# of the host platform.
-
-###############################################################################
-#
-# Is the host little of big endian?
-#
-AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal"])
-
-if test "x$ENDIAN" = xuniversal; then
- AC_MSG_ERROR([It seems like someone needs to decide how we are to deal with universal binaries on the MacOSX?])
-fi
-if test "x$ENDIAN" = xunknown; then
- ENDIAN="$HOST_CPU_ENDIAN"
-fi
-if test "x$ENDIAN" != "x$HOST_CPU_ENDIAN"; then
- AC_MSG_WARN([The tested endian in the host ($ENDIAN) differs from the endian expected to be found in the host ($HOST_CPU_ENDIAN)])
- ENDIAN="$HOST_CPU_ENDIAN"
-fi
-AC_SUBST(ENDIAN)
-
-###############################################################################
-#
-# We need a Boot JDK to bootstrap the build.
-#
-BOOT_JDK_FOUND=no
-AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
- [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
-
-if test "x$with_boot_jdk" != x; then
- BOOT_JDK=$with_boot_jdk
- BOOT_JDK_FOUND=yes
-fi
-if test "x$BOOT_JDK_FOUND" = xno; then
- BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no])
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
- if test "x$JAVA_HOME" != x; then
- if test ! -d "$JAVA_HOME"; then
- AC_MSG_ERROR([Your JAVA_HOME points to a non-existing directory!])
- fi
- # Aha, the user has set a JAVA_HOME
- # let us use that as the Boot JDK.
- BOOT_JDK="$JAVA_HOME"
- BOOT_JDK_FOUND=yes
- # To be on the safe side, lets check that it is a JDK.
- if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
- JAVAC="$BOOT_JDK/bin/javac"
- JAVA="$BOOT_JDK/bin/java"
- BOOT_JDK_FOUND=yes
- else
- AC_MSG_ERROR([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME])
- fi
- fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
- AC_PATH_PROG(JAVAC_CHECK, javac)
- AC_PATH_PROG(JAVA_CHECK, java)
- BINARY="$JAVAC_CHECK"
- if test "x$JAVAC_CHECK" = x; then
- BINARY="$JAVA_CHECK"
- fi
- if test "x$BINARY" != x; then
- # So there is a java(c) binary, it might be part of a JDK.
- # Lets find the JDK/JRE directory by following symbolic links.
- # Linux/GNU systems often have links from /usr/bin/java to
- # /etc/alternatives/java to the real JDK binary.
- WHICHCMD_SPACESAFE(BINARY,[path to javac])
- REMOVE_SYMBOLIC_LINKS(BINARY)
- BOOT_JDK=`dirname $BINARY`
- BOOT_JDK=`cd $BOOT_JDK/..; pwd`
- if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
- JAVAC=$BOOT_JDK/bin/javac
- JAVA=$BOOT_JDK/bin/java
- BOOT_JDK_FOUND=yes
- fi
- fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
- # Try the MacOSX way.
- if test -x /usr/libexec/java_home; then
- BOOT_JDK=`/usr/libexec/java_home`
- if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
- JAVAC=$BOOT_JDK/bin/javac
- JAVA=$BOOT_JDK/bin/java
- BOOT_JDK_FOUND=yes
- fi
- fi
-fi
-
-if test "x$BOOT_JDK_FOUND" = xno; then
- AC_PATH_PROG(JAVA_CHECK, java)
- if test "x$JAVA_CHECK" != x; then
- # There is a java in the path. But apparently we have not found a javac
- # in the path, since that would have been tested earlier.
- if test "x$HOST_OS" = xwindows; then
- # Now if this is a windows platform. The default installation of a JDK
- # actually puts the JRE in the path and keeps the JDK out of the path!
- # Go look in the default installation location.
- BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
- if test -d "$BOOT_JDK"; then
- BOOT_JDK_FOUND=yes
- fi
- fi
- if test "x$BOOT_JDK_FOUND" = xno; then
- help_on_build_dependency openjdk
- AC_MSG_ERROR([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG])
- fi
- else
- help_on_build_dependency openjdk
- AC_MSG_ERROR([Could not find a JDK. $HELP_MSG])
- fi
-fi
-
-WIN_FIX_PATH(BOOT_JDK)
-
-# Now see if we can find the rt.jar, or its nearest equivalent.
-BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
-SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)])
-
-BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
-SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)])
-
-if test ! -f $BOOT_RTJAR; then
- # On MacOSX it is called classes.jar
- BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
- if test ! -f $BOOT_RTJAR; then
- AC_MSG_ERROR([Cannot find the rt.jar or its equivalent!])
- fi
- # Remove the ..
- BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
- # The tools.jar is part of classes.jar
- BOOT_TOOLSJAR="$BOOT_RTJAR"
-fi
-
-AC_SUBST(BOOT_JDK)
-AC_SUBST(BOOT_RTJAR)
-AC_SUBST(BOOT_TOOLSJAR)
-AC_MSG_CHECKING([for Boot JDK])
-AC_MSG_RESULT([$BOOT_JDK])
-AC_MSG_CHECKING([for Boot rt.jar])
-AC_MSG_RESULT([$BOOT_RTJAR])
-AC_MSG_CHECKING([for Boot tools.jar])
-AC_MSG_RESULT([$BOOT_TOOLSJAR])
-
-# Use the java tool from the Boot JDK.
-AC_MSG_CHECKING([for java in Boot JDK])
-JAVA=$BOOT_JDK/bin/java
-if test ! -x $JAVA; then
- AC_MSG_ERROR([Could not find a working java])
-fi
-BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
-AC_MSG_RESULT([yes $BOOT_JDK_VERSION])
-AC_SUBST(JAVA)
-
-# Extra M4 quote needed to protect [] in grep expression.
-[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
-if test "x$FOUND_VERSION_78" = x; then
- help_on_build_dependency openjdk
- AC_MSG_ERROR([Your boot-jdk must be version 7 or 8. $HELP_MSG])
-fi
-
-# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
-BOOT_JDK_SOURCETARGET="-source 7 -target 7"
-AC_SUBST(BOOT_JDK_SOURCETARGET)
-
-# Use the javac tool from the Boot JDK.
-AC_MSG_CHECKING([for javac in Boot JDK])
-JAVAC=$BOOT_JDK/bin/javac
-if test ! -x $JAVAC; then
- AC_MSG_ERROR([Could not find a working javac])
-fi
-AC_MSG_RESULT(yes)
-AC_SUBST(JAVAC)
-AC_SUBST(JAVAC_FLAGS)
-
-# Use the javah tool from the Boot JDK.
-AC_MSG_CHECKING([for javah in Boot JDK])
-JAVAH=$BOOT_JDK/bin/javah
-if test ! -x $JAVAH; then
- AC_MSG_ERROR([Could not find a working javah])
-fi
-AC_MSG_RESULT(yes)
-AC_SUBST(JAVAH)
-
-# Use the jar tool from the Boot JDK.
-AC_MSG_CHECKING([for jar in Boot JDK])
-JAR=$BOOT_JDK/bin/jar
-if test ! -x $JAR; then
- AC_MSG_ERROR([Could not find a working jar])
-fi
-AC_SUBST(JAR)
-AC_MSG_RESULT(yes)
-
-# Use the rmic tool from the Boot JDK.
-AC_MSG_CHECKING([for rmic in Boot JDK])
-RMIC=$BOOT_JDK/bin/rmic
-if test ! -x $RMIC; then
- AC_MSG_ERROR([Could not find a working rmic])
-fi
-AC_SUBST(RMIC)
-AC_MSG_RESULT(yes)
-
-# Use the native2ascii tool from the Boot JDK.
-AC_MSG_CHECKING([for native2ascii in Boot JDK])
-NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
-if test ! -x $NATIVE2ASCII; then
- AC_MSG_ERROR([Could not find a working native2ascii])
-fi
-AC_MSG_RESULT(yes)
-AC_SUBST(NATIVE2ASCII)
-
-###############################################################################
-#
-# Pickup additional source for a component from outside of the source root
-# or override source for a component.
-#
-AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
- [for each and every source directory, look in this additional source root for
- the same directory; if it exists and have files in it, include it in the build])])
-
-AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
- [for each and every source directory, look in this override source root for
- the same directory; if it exists, use that directory instead and
- ignore the directory in the original source root])])
-
-AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
- [use the subdirs 'adds' and 'overrides' in the specified directory as
- add-source-root and override-source-root])])
-
-if test "x$with_adds_and_overrides" != x; then
- with_add_source_root="$with_adds_and_overrides/adds"
- with_override_source_root="$with_adds_and_overrides/overrides"
-fi
-
-if test "x$with_add_source_root" != x; then
- if ! test -d $with_add_source_root; then
- AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
- fi
- CURDIR="$PWD"
- cd "$with_add_source_root"
- ADD_SRC_ROOT="`pwd`"
- cd "$CURDIR"
- # Verify that the addon source root does not have any root makefiles.
- # If it does, then it is usually an error, prevent this.
- if test -f $with_add_source_root/langtools/makefiles/Makefile || \
- test -f $with_add_source_root/langtools/make/Makefile; then
- AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
- fi
- if test -f $with_add_source_root/corba/makefiles/Makefile || \
- test -f $with_add_source_root/corba/make/Makefile; then
- AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
- fi
- if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
- test -f $with_add_source_root/jaxp/make/Makefile; then
- AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
- fi
- if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
- test -f $with_add_source_root/jaxws/make/Makefile; then
- AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
- fi
- if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
- test -f $with_add_source_root/hotspot/make/Makefile; then
- AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
- fi
- if test -f $with_add_source_root/jdk/makefiles/Makefile || \
- test -f $with_add_source_root/jdk/make/Makefile; then
- AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
- fi
-fi
-AC_SUBST(ADD_SRC_ROOT)
-
-if test "x$with_override_source_root" != x; then
- if ! test -d $with_override_source_root; then
- AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
- fi
- CURDIR="$PWD"
- cd "$with_override_source_root"
- OVERRIDE_SRC_ROOT="`pwd`"
- cd "$CURDIR"
- if test -f $with_override_source_root/langtools/makefiles/Makefile || \
- test -f $with_override_source_root/langtools/make/Makefile; then
- AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
- fi
- if test -f $with_override_source_root/corba/makefiles/Makefile || \
- test -f $with_override_source_root/corba/make/Makefile; then
- AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
- fi
- if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
- test -f $with_override_source_root/jaxp/make/Makefile; then
- AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
- fi
- if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
- test -f $with_override_source_root/jaxws/make/Makefile; then
- AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
- fi
- if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
- test -f $with_override_source_root/hotspot/make/Makefile; then
- AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
- fi
- if test -f $with_override_source_root/jdk/makefiles/Makefile || \
- test -f $with_override_source_root/jdk/make/Makefile; then
- AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
- fi
-fi
-AC_SUBST(OVERRIDE_SRC_ROOT)
-
-###############################################################################
-#
-# Override a repo completely, this is used for example when you have 3 small
-# development sandboxes of the langtools sources and want to avoid having 3 full
-# OpenJDK sources checked out on disk.
-#
-# Assuming that the 3 langtools sandboxes are located here:
-# /home/fredrik/sandbox1/langtools
-# /home/fredrik/sandbox2/langtools
-# /home/fredrik/sandbox3/langtools
-#
-# From the source root you create build subdirs manually:
-# mkdir -p build1 build2 build3
-# in each build directory run:
-# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
-# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
-# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
-#
-
-AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
- [use this langtools dir for the build])])
-
-AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
- [use this corba dir for the build])])
-
-AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
- [use this jaxp dir for the build])])
-
-AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
- [use this jaxws dir for the build])])
-
-AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
- [use this hotspot dir for the build])])
-
-AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
- [use this jdk dir for the build])])
-
-if test "x$with_override_langtools" != x; then
- CURDIR="$PWD"
- cd "$with_override_langtools"
- LANGTOOLS_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
- AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
- fi
- AC_MSG_CHECKING([if langtools should be overridden])
- AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
-fi
-if test "x$with_override_corba" != x; then
- CURDIR="$PWD"
- cd "$with_override_corba"
- CORBA_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
- AC_MSG_ERROR([You have to override corba with a full corba repo!])
- fi
- AC_MSG_CHECKING([if corba should be overridden])
- AC_MSG_RESULT([yes with $CORBA_TOPDIR])
-fi
-if test "x$with_override_jaxp" != x; then
- CURDIR="$PWD"
- cd "$with_override_jaxp"
- JAXP_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
- AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
- fi
- AC_MSG_CHECKING([if jaxp should be overridden])
- AC_MSG_RESULT([yes with $JAXP_TOPDIR])
-fi
-if test "x$with_override_jaxws" != x; then
- CURDIR="$PWD"
- cd "$with_override_jaxws"
- JAXWS_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
- AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
- fi
- AC_MSG_CHECKING([if jaxws should be overridden])
- AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
-fi
-if test "x$with_override_hotspot" != x; then
- CURDIR="$PWD"
- cd "$with_override_hotspot"
- HOTSPOT_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
- ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
- AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
- fi
- AC_MSG_CHECKING([if hotspot should be overridden])
- AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
-fi
-if test "x$with_override_jdk" != x; then
- CURDIR="$PWD"
- cd "$with_override_jdk"
- JDK_TOPDIR="`pwd`"
- cd "$CURDIR"
- if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
- AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
- fi
- AC_MSG_CHECKING([if JDK should be overridden])
- AC_MSG_RESULT([yes with $JDK_TOPDIR])
-fi
-
-###############################################################################
-#
-# Specify options for anything that is run with the Boot JDK.
-#
-AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
- [specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
- e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
-
-if test "x$with_boot_jdk_jvmargs" = x; then
- # Not all JVM:s accept the same arguments on the command line.
- # OpenJDK specific increase in thread stack for JDK build,
- # well more specifically, when running javac.
- if test "x$BUILD_NUM_BITS" = x32; then
- STACK_SIZE=768
- else
- # Running Javac on a JVM on a 64-bit machine, the stack takes more space
- # since 64-bit pointers are pushed on the stach. Apparently, we need
- # to increase the stack space when javacing the JDK....
- STACK_SIZE=1536
- fi
-
- # Minimum amount of heap memory.
- ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
- if test "x$HOST_OS" = "xmacosx"; then
- # Why does macosx need more heap? Its the huge JDK batch.
- ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
- else
- ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
- fi
- # When is adding -client something that speeds up the JVM?
- # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
- ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA])
- ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA])
- ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
- # Disable special log output when a debug build is used as Boot JDK...
- ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
-fi
-
-AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
-
-AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java],
- [use this java binary for running the javac background server and other long running java tasks in the build process,
- e.g. ---with-server-java="/opt/jrockit/bin/java -server"])])
-
-if test "x$with_server_java" != x; then
- SERVER_JAVA="$with_server_java"
- FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" = x; then
- AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA])
- fi
-else
- SERVER_JAVA=""
- # Hotspot specific options.
- ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA])
- ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA])
- # JRockit specific options.
- ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA])
- SERVER_JAVA="$JAVA $SERVER_JAVA"
-fi
-AC_SUBST(SERVER_JAVA)
-
-AC_MSG_CHECKING([whether to use shared server for javac])
-AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server],
- [enable the shared javac server during the build process @<:@disabled@:>@])],
- [ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no'])
-AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
-if test "x$ENABLE_JAVAC_SERVER" = xyes; then
- JAVAC_USE_REMOTE=true
- JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
-else
- JAVAC_USE_REMOTE=false
- JAVAC_SERVERS=
-fi
-AC_SUBST(JAVAC_USE_REMOTE)
-AC_SUBST(JAVAC_SERVERS)
-
-AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores],
- [use at most this number of concurrent threads on the javac server @<:@probed@:>@])])
-if test "x$with_javac_server_cores" != x; then
- JAVAC_SERVER_CORES="$with_javac_server_cores"
-else
- if test "$NUM_CORES" -gt 16; then
- # We set this arbitrary limit because we want to limit the heap
- # size of the javac server.
- # In the future we will make the javac compilers in the server
- # share more and more state, thus enabling us to use more and
- # more concurrent threads in the server.
- JAVAC_SERVER_CORES="16"
- else
- JAVAC_SERVER_CORES="$NUM_CORES"
- fi
-
- if test "$MEMORY_SIZE" -gt "17000"; then
- MAX_HEAP_MEM=10000
- ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA])
- elif test "$MEMORY_SIZE" -gt "10000"; then
- MAX_HEAP_MEM=6000
- ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA])
- elif test "$MEMORY_SIZE" -gt "5000"; then
- MAX_HEAP_MEM=3000
- ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
- elif test "$MEMORY_SIZE" -gt "3800"; then
- MAX_HEAP_MEM=2500
- ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
- elif test "$MEMORY_SIZE" -gt "1900"; then
- MAX_HEAP_MEM=1200
- ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
- elif test "$MEMORY_SIZE" -gt "1000"; then
- MAX_HEAP_MEM=900
- ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
- else
- MAX_HEAP_MEM=512
- ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA])
- ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
- fi
-
- MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
- if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
- AC_MSG_CHECKING([if number of server cores must be reduced])
- JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
- AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
- fi
-fi
-AC_SUBST(JAVAC_SERVER_CORES)
-
-AC_MSG_CHECKING([whether to track dependencies between Java packages])
-AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps],
- [enable the dependency tracking between Java packages @<:@disabled@:>@])],
- [ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no'])
-AC_MSG_RESULT([$ENABLE_JAVAC_DEPS])
-if test "x$ENABLE_JAVAC_DEPS" = xyes; then
- JAVAC_USE_DEPS=true
-else
- JAVAC_USE_DEPS=false
-fi
-AC_SUBST(JAVAC_USE_DEPS)
-
-AC_MSG_CHECKING([whether to use multiple cores for javac compilation])
-AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core],
- [compile Java packages concurrently @<:@disabled@:>@])],
- [ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no'])
-AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE])
-if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
- JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
-else
- JAVAC_USE_MODE=SINGLE_THREADED_BATCH
- if test "x$ENABLE_JAVAC_DEPS" = xyes; then
- AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.])
- AC_MSG_WARN([Disabling dependency tracking for you now.])
- JAVAC_USE_DEPS=false
- fi
- if test "x$ENABLE_JAVAC_SERVER" = xyes; then
- AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.])
- AC_MSG_WARN([Disabling javac server for you now.])
- JAVAC_USE_REMOTE=false
- fi
-fi
-AC_SUBST(JAVAC_USE_MODE)
-
-###############################################################################
-#
-# OS specific settings that we never will need to probe.
-#
-if test "x$HOST_OS" = xlinux; then
- AC_MSG_CHECKING([what is not needed on Linux?])
- PULSE_NOT_NEEDED=yes
- AC_MSG_RESULT([pulse])
-fi
-
-if test "x$HOST_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$HOST_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$HOST_OS" = xmacosx; then
- AC_MSG_CHECKING([what is not needed on MacOSX?])
- ALSA_NOT_NEEDED=yes
- PULSE_NOT_NEEDED=yes
- X11_NOT_NEEDED=yes
- FREETYPE2_NOT_NEEDED=yes
- # If the java runtime framework is disabled, then we need X11.
- # This will be adjusted below.
- AC_MSG_RESULT([alsa pulse x11])
-fi
-
-if test "x$HOST_OS" = xbsd; then
- AC_MSG_CHECKING([what is not needed on bsd?])
- ALSA_NOT_NEEDED=yes
- AC_MSG_RESULT([alsa])
-fi
-
-###############################################################################
-#
-# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
-# that uses this API.
-#
-AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
- [disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
- [MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
-
-USE_MACOSX_RUNTIME_SUPPORT=no
-AC_MSG_CHECKING([for explicit Java runtime support in the OS])
-if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
- if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
- MACOSX_RUNTIME_SUPPORT=yes
- USE_MACOSX_RUNTIME_SUPPORT=yes
- AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
- else
- AC_MSG_RESULT([yes, but explicitly disabled.])
- fi
-else
- AC_MSG_RESULT([no])
-fi
-
-if test "x$HOST_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
- AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
- X11_NOT_NEEDED=
- FREETYPE2_NOT_NEEDED=
- AC_MSG_RESULT([alsa pulse])
-fi
-
-###############################################################################
-#
-# Check for X Windows
-#
-AC_PATH_XTRA
-
-if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
- help_on_build_dependency x11
- AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
-fi
-
-# Some of the old makefiles require a setting of OPENWIN_HOME
-# Since the X11R6 directory has disappeared on later Linuxes,
-# we need to probe for it.
-if test "x$HOST_OS" = xlinux; then
- if test -d "$SYS_ROOT/usr/X11R6"; then
- OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
- fi
- if test -d "$SYS_ROOT/usr/include/X11"; then
- OPENWIN_HOME="$SYS_ROOT/usr"
- fi
-fi
-if test "x$HOST_OS" = xsolaris; then
- OPENWIN_HOME="/usr/openwin"
-fi
-AC_SUBST(OPENWIN_HOME)
-
-
-#
-# Weird Sol10 something check...TODO change to try compile
-#
-if test "x${HOST_OS}" = xsolaris; then
- if test "`uname -r`" = "5.10"; then
- if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
- X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
- fi
- fi
-fi
-
-AC_LANG_PUSH(C)
-OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $X_CFLAGS"
-AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
- [X11_A_OK=yes],
- [X11_A_OK=no])
-CFLAGS="$OLD_CFLAGS"
-AC_LANG_POP(C)
-
-if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
- help_on_build_dependency x11
- AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG])
-fi
-
-AC_SUBST(X_CFLAGS)
-AC_SUBST(X_LIBS)
-
-###############################################################################
-#
-# 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 libraries under PATH/lib and the headers under PATH/include)])])
-AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
- [specify directory for the cups include files])])
-AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib],
- [specify directory for the cups library])])
-
-if test "x$CUPS_NOT_NEEDED" = xyes; then
- if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
- AC_MSG_WARN([cups not used, so --with-cups is ignored])
- fi
- CUPS_CFLAGS=
- CUPS_LIBS=
-else
- CUPS_FOUND=no
-
- if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
- 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_LIBS="-L${with_cups}/lib -lcups"
- 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${with_cups_lib}" != x; then
- CUPS_LIBS="-L${with_cups_lib} -lcups"
- 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=
- CUPS_LIBS="-lcups"
- 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 and libs])
- if test -s /opt/sfw/cups/include/cups/cups.h; then
- # An SFW package seems to be installed!
- CUPS_FOUND=yes
- CUPS_CFLAGS="-I/opt/sfw/cups/include"
- CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
- elif test -s /opt/csw/include/cups/cups.h; then
- # A CSW package seems to be installed!
- CUPS_FOUND=yes
- CUPS_CFLAGS="-I/opt/csw/include"
- CUPS_LIBS="-L/opt/csw/lib -lcups"
- fi
- AC_MSG_RESULT([$CUPS_FOUND])
- fi
- if test "x$CUPS_FOUND" = xno; then
- help_on_build_dependency cups
- AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
- fi
-fi
-
-AC_SUBST(CUPS_CFLAGS)
-AC_SUBST(CUPS_LIBS)
-
-###############################################################################
-#
-# The ubiquitous freetype2 library is used to render fonts.
-#
-AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
- [specify prefix directory for the freetype2 package
- (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-
-# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
-USING_SYSTEM_FT_LIB=false
-
-if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
- if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
- AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
- fi
- FREETYPE2_CFLAGS=
- FREETYPE2_LIBS=
- FREETYPE2_LIB_PATH=
-else
- FREETYPE2_FOUND=no
-
- if test "x$with_freetype" != x; then
- SPACESAFE(with_freetype,[the path to freetype])
- FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
- if test "x$HOST_OS" = xwindows; then
- FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
- fi
- FREETYPE2_LIB_PATH="$with_freetype/lib"
- FREETYPE2_CFLAGS="-I$with_freetype/include"
- if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
- FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
- fi
- FREETYPE2_FOUND=yes
- if test "x$FREETYPE2_FOUND" = xyes; then
- # Verify that the directories exist
- if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
- AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
- fi
- # List the contents of the lib.
- FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
- if test "x$FREETYPELIB" = x; then
- AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib])
- fi
- # Check one h-file
- if ! test -s "$with_freetype/include/ft2build.h"; then
- AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
- fi
- fi
- fi
- if test "x$FREETYPE2_FOUND" = xno; then
- BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
- USING_SYSTEM_FT_LIB=true
- fi
- if test "x$FREETYPE2_FOUND" = xno; then
- PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
- USING_SYSTEM_FT_LIB=true
- fi
- if test "x$FREETYPE2_FOUND" = xno; then
- AC_MSG_CHECKING([for freetype in some standard locations])
-
- if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
- DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
- DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
- fi
- if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
- DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
- DEFAULT_FREETYPE_LIBS="-lfreetype"
- fi
-
- PREV_CXXCFLAGS="$CXXFLAGS"
- PREV_LDFLAGS="$LDFLAGS"
- CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
- LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[#include
- #include FT_FREETYPE_H
- int main() { return 0; }
- ]])],
- [
- # Yes, the default cflags and libs did the trick.
- FREETYPE2_FOUND=yes
- FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
- FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
- ],
- [
- FREETYPE2_FOUND=no
- ])
- CXXCFLAGS="$PREV_CXXFLAGS"
- LDFLAGS="$PREV_LDFLAGS"
- AC_MSG_RESULT([$FREETYPE2_FOUND])
- USING_SYSTEM_FT_LIB=true
- fi
- if test "x$FREETYPE2_FOUND" = xno; then
- help_on_build_dependency freetype2
- AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
- fi
-fi
-
-AC_SUBST(USING_SYSTEM_FT_LIB)
-AC_SUBST(FREETYPE2_LIB_PATH)
-AC_SUBST(FREETYPE2_CFLAGS)
-AC_SUBST(FREETYPE2_LIBS)
-
-###############################################################################
-#
-# 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 -lalsa"
- 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} -lalsa"
- ALSA_FOUND=yes
- fi
- if test "x$ALSA_FOUND" = xno; then
- BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
- fi
- if test "x$ALSA_FOUND" = xno; then
- PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
- 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_on_build_dependency alsa
- AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
- fi
-fi
-
-AC_SUBST(ALSA_CFLAGS)
-AC_SUBST(ALSA_LIBS)
-
-###############################################################################
-#
-# Check for pulse audio headers and libraries.
-#
-PULSE_FOUND=no
-AC_ARG_WITH(pulse, [AS_HELP_STRING([--with-pulse],
- [specify prefix directory for the pulseaudio package
- (expecting the libraries under PATH/lib and the headers under PATH/include)])])
-AC_ARG_WITH(pulse-include, [AS_HELP_STRING([--with-pulse-include],
- [specify directory for the pulseaudio include files])])
-AC_ARG_WITH(pulse-lib, [AS_HELP_STRING([--with-pulse-lib],
- [specify directory for the pulseaudio library])])
-
-if test "x${with_pulse}" != x; then
- PULSE_LIBS="-L${with_pulse}/lib -lfreetype"
- PULSE_CFLAGS="-I${with_pulse}/include"
- PULSE_FOUND=yes
-fi
-if test "x${with_pulse_include}" != x; then
- PULSE_CFLAGS="-I${with_pulse_include}"
- PULSE_FOUND=yes
-fi
-if test "x${with_pulse_lib}" != x; then
- PULSE_LIBS="-L${with_pulse_lib} -lpulse"
- PULSE_FOUND=yes
-fi
-if test "x$PULSE_FOUND" = xno; then
- BDEPS_CHECK_MODULE(PULSE, pulse, xxx, [PULSE_FOUND=yes], [PULSE_FOUND=no])
-fi
-if test "x$PULSE_FOUND" = xno; then
- PKG_CHECK_MODULES(LIBPULSE,[libpulse >= 0.9.11],[PULSE_FOUND=yes],[PULSE_FOUND=no])
-fi
-if test "x$PULSE_FOUND" = xno; then
- AC_CHECK_HEADERS([pulse/pulseaudio.h],
- [PULSE_FOUND=yes
- PULSE_CFLAGS=-Iignoreme
- PULSE_LIBS=
- DEFAULT_PULSE=yes],
- [PULSE_FOUND=no])
-fi
-
-if test "x$PULSE_FOUND" = xno && test "x$PULSE_NOT_NEEDED" != xyes; then
- help_on_build_dependency pulse
- AC_MSG_ERROR([Could not find pulse audio libraries. $HELP_MSG ])
-fi
-
-AC_SUBST(PULSE_CFLAGS)
-AC_SUBST(PULSE_LIBS)
-
-###############################################################################
-#
-# Check for the jpeg library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-AC_CHECK_LIB(jpeg, main, [],
- [ USE_EXTERNAL_LIBJPEG=false
- AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
- ])
-AC_SUBST(USE_EXTERNAL_LIBJPEG)
-
-###############################################################################
-#
-# Check for the gif library
-#
-
-USE_EXTERNAL_LIBJPEG=true
-AC_CHECK_LIB(gif, main, [],
- [ USE_EXTERNAL_LIBGIF=false
- AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source])
- ])
-AC_SUBST(USE_EXTERNAL_LIBGIF)
-
-###############################################################################
-#
-# Check for the zlib library
-#
-
-USE_EXTERNAL_LIBZ=true
-AC_CHECK_LIB(z, main, [],
- [ USE_EXTERNAL_LIBZ=false
- AC_MSG_NOTICE([Will use zlib bundled with the OpenJDK source])
- ])
-AC_SUBST(USE_EXTERNAL_LIBZ)
-
-###############################################################################
-#
-# Check if altzone exists in time.h
-#
-
-AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [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"
-
-###############################################################################
-#
-# Should we run the painfully slow javadoc tool?
-#
-AC_MSG_CHECKING([whether to build documentation])
-AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs],
- [enable generation of Javadoc documentation @<:@disabled@:>@])],
- [ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no'])
-AC_MSG_RESULT([$ENABLE_DOCS])
-AC_SUBST(ENABLE_DOCS)
-GENERATE_DOCS=false
-if test "x$ENABLE_DOCS" = xyes; then
- GENERATE_DOCS=true
-fi
-AC_SUBST(GENERATE_DOCS)
-
-###############################################################################
-#
-# Should we compile nimbus swing L&F? We can probably remove this option
-# since nimbus is officially part of javax now.
-#
-AC_MSG_CHECKING([whether to build nimbus L&F])
-AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
- [disable Nimbus L&F @<:@enabled@:>@])],
- [ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
-AC_MSG_RESULT([$ENABLE_NIMBUS])
-DISABLE_NIMBUS=
-if test "x$ENABLE_NIMBUS" = xno; then
- DISABLE_NIMBUS=true
-fi
-AC_SUBST(DISABLE_NIMBUS)
-
-###############################################################################
-#
-# Setup the opt flags for different compilers
-# and different operating systems.
-#
-C_FLAG_DEPS="-MMD -MF"
-CXX_FLAG_DEPS="-MMD -MF"
-
-case $COMPILER_TYPE in
- CC )
- D_FLAG="-g"
- case $COMPILER_NAME in
- gcc )
- case $PLATFORM in
- macosx )
- # On MacOSX we optimize for size, something
- # we should do for all platforms?
- C_O_FLAG_HI="-Os"
- C_O_FLAG_NORM="-Os"
- C_O_FLAG_NONE=""
- ;;
- *)
- C_O_FLAG_HI="-O3"
- C_O_FLAG_NORM="-O2"
- C_O_FLAG_NONE="-O0"
- ;;
- esac
- CXX_O_FLAG_HI="$C_O_FLAG_HI"
- CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
- CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
- ;;
- ossc )
- #
- # Forte has different names for this with their C++ compiler...
- #
- CXX_FLAG_DEPS="-xMMD -xMF"
-
-# Extra options used with HIGHEST
-#
-# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
-# done with care, there are some assumptions below that need to
-# be understood about the use of pointers, and IEEE behavior.
-#
-# Use non-standard floating point mode (not IEEE 754)
-CC_HIGHEST="$CC_HIGHEST -fns"
-# Do some simplification of floating point arithmetic (not IEEE 754)
-CC_HIGHEST="$CC_HIGHEST -fsimple"
-# Use single precision floating point with 'float'
-CC_HIGHEST="$CC_HIGHEST -fsingle"
-# Assume memory references via basic pointer types do not alias
-# (Source with excessing pointer casting and data access with mixed
-# pointer types are not recommended)
-CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
-# Use intrinsic or inline versions for math/std functions
-# (If you expect perfect errno behavior, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
-# Loop data dependency optimizations (need -xO3 or higher)
-CC_HIGHEST="$CC_HIGHEST -xdepend"
-# Pointer parameters to functions do not overlap
-# (Similar to -xalias_level=basic usage, but less obvious sometimes.
-# If you pass in multiple pointers to the same data, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xrestrict"
-# Inline some library routines
-# (If you expect perfect errno behavior, do not use this)
-CC_HIGHEST="$CC_HIGHEST -xlibmil"
-# Use optimized math routines
-# (If you expect perfect errno behavior, do not use this)
-# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
-#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
-
- case $LEGACY_HOST_CPU1 in
- i586)
- C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
- C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
- C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
- C_O_FLAG_NONE=""
- CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
- CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
- CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
- CXX_O_FLAG_NONE=""
- ;;
- sparc)
- C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
- C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
- C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
- C_O_FLAG_NONE=""
- CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
- CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
- CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
- CXX_O_FLAG_NONE=""
- ;;
- esac
- esac
- ;;
- CL )
- D_FLAG=
- C_O_FLAG_HI="-O2"
- C_O_FLAG_NORM="-O1"
- C_O_FLAG_NONE="-Od"
- CXX_O_FLAG_HI="$C_O_FLAG_HI"
- CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
- CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
- ;;
-esac
-
-if test -z "$C_O_FLAG_HIGHEST"; then
- C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
-fi
-
-if test -z "$CXX_O_FLAG_HIGHEST"; then
- CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
-fi
-
-AC_SUBST(C_O_FLAG_HIGHEST)
-AC_SUBST(C_O_FLAG_HI)
-AC_SUBST(C_O_FLAG_NORM)
-AC_SUBST(C_O_FLAG_NONE)
-AC_SUBST(CXX_O_FLAG_HIGHEST)
-AC_SUBST(CXX_O_FLAG_HI)
-AC_SUBST(CXX_O_FLAG_NORM)
-AC_SUBST(CXX_O_FLAG_NONE)
-AC_SUBST(C_FLAG_DEPS)
-AC_SUBST(CXX_FLAG_DEPS)
-
-###############################################################################
-#
-# Setup legacy vars/targets and new vars to deal with different debug levels.
-#
-case $DEBUG_LEVEL in
- release )
- HOTSPOT_DEBUG_LEVEL="product"
- HOTSPOT_EXPORT="product"
- ;;
- fastdebug )
- HOTSPOT_DEBUG_LEVEL="fastdebug"
- HOTSPOT_EXPORT="fastdebug"
- CFLAGS="$CFLAGS $D_FLAG"
- JAVAC_FLAGS="$JAVAC_FLAGS -g"
- ;;
- slowdebug )
- HOTSPOT_DEBUG_LEVEL="jvmg"
- HOTSPOT_EXPORT="debug"
- CFLAGS="$CFLAGS $D_FLAG"
- C_O_FLAG_HI="$C_O_FLAG_NONE"
- C_O_FLAG_NORM="$C_O_FLAG_NONE"
- CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
- CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
- JAVAC_FLAGS="$JAVAC_FLAGS -g"
- ;;
-esac
-
-###############################################################################
-#
-# Generate the legacy makefile targets for hotspot.
-# The hotspot api for selecting the build artifacts, really, needs to be improved.
-#
-HOTSPOT_TARGET=""
-
-if test "x$JVM_VARIANT_SERVER" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
-fi
-
-if test "x$JVM_VARIANT_CLIENT" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
-fi
-
-if test "x$JVM_VARIANT_KERNEL" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
-fi
-
-if test "x$JVM_VARIANT_ZERO" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
-fi
-
-if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
- HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
-fi
-
-HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
-
-###############################################################################
-#
-# Setup all directories for the subrepoes and the arguments to the sub makes.
-#
-LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
-LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
-LANGTOOLS_MAKE_ARGS=""
-AC_SUBST(LANGTOOLS_OUTPUTDIR)
-AC_SUBST(LANGTOOLS_DIST)
-AC_SUBST(LANGTOOLS_MAKE_ARGS)
-
-CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
-CORBA_DIST="$OUTPUT_ROOT/corba/dist"
-CORBA_MAKE_ARGS=""
-AC_SUBST(CORBA_OUTPUTDIR)
-AC_SUBST(CORBA_DIST)
-AC_SUBST(CORBA_MAKE_ARGS)
-
-JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
-JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
-JAXP_MAKE_ARGS=""
-AC_SUBST(JAXP_OUTPUTDIR)
-AC_SUBST(JAXP_DIST)
-AC_SUBST(JAXP_MAKE_ARGS)
-
-JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
-JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
-JAXWS_MAKE_ARGS=""
-AC_SUBST(JAXWS_OUTPUTDIR)
-AC_SUBST(JAXWS_DIST)
-AC_SUBST(JAXWS_MAKE_ARGS)
-
-HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
-HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
-HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
-AC_SUBST(HOTSPOT_OUTPUTDIR)
-AC_SUBST(HOTSPOT_DIST)
-AC_SUBST(HOTSPOT_MAKE_ARGS)
-
-JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
-JDK_MAKE_ARGS="ALT_OUTPUTDIR=\"$OUTPUT_ROOT/jdk\""
-AC_SUBST(JDK_OUTPUTDIR)
-AC_SUBST(JDK_MAKE_ARGS)
-
-IMAGES_OUTPUTDIR=$OUTPUT_ROOT/images
-IMAGES_MAKE_ARGS="ALT_OUTPUTDIR=$OUTPUT_ROOT/jdk \
- SHARE_SRC=$JDK_TOPDIR/src/share \
- PLATFORM_SRC=$JDK_TOPDIR/src/$LEGACY_HOST_OS_API \
- TEMPDIR=$IMAGES_OUTPUTDIR/tmp \
- ABS_TEMPDIR=$IMAGES_OUTPUTDIR/tmp "
-AC_SUBST(IMAGES_OUTPUTDIR)
-AC_SUBST(IMAGES_MAKE_ARGS)
-
-###############################################################################
-#
-# Now setup the CFLAGS and LDFLAGS for the JDK build.
-# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
-#
-case $COMPILER_NAME in
- gcc )
- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
- -pipe -fno-omit-frame-pointer \
- -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
- CFLAGS_JDK="$CFLAGS_JDK -fno-strict-aliasing"
- ;;
- ossc )
- CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
- CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
- ;;
- cl )
- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
- -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
- -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
- -DWIN32 -DIAL"
- case $LEGACY_HOST_CPU1 in
- i?86 )
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
- ;;
- amd64 )
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
- ;;
- esac
- ;;
-esac
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
-
-# The package path is used only on macosx?
-PACKAGE_PATH=/opt/local
-AC_SUBST(PACKAGE_PATH)
-
-# Sometimes we use a cpu dir (.../lib/amd64/server)
-# Sometimes not (.../lib/server)
-LIBARCHDIR="$LEGACY_HOST_CPU2/"
-if test "x$ENDIAN" = xlittle; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
-else
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
-fi
-if test "x$HOST_OS" = xlinux; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-fi
-if test "x$HOST_OS" = xwindows; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
-fi
-if test "x$HOST_OS" = xsolaris; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
-fi
-if test "x$HOST_OS" = xmacosx; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
- LIBARCHDIR=""
-fi
-if test "x$HOST_OS" = xbsd; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
-fi
-if test "x$DEBUG_LEVEL" = xrelease; then
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
-else
- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
-fi
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_HOST_CPU1\"' -D$LEGACY_HOST_CPU1"
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
-
-CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
- -I${JDK_OUTPUTDIR}/include \
- -I${JDK_OUTPUTDIR}/include/$PLATFORM \
- -I${JDK_TOPDIR}/src/share/javavm/export \
- -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/javavm/export \
- -I${JDK_TOPDIR}/src/share/native/common \
- -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/native/common"
-
-# The shared libraries are compiled using the picflag.
-CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG"
-
-# Executable flags
-CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
-CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
-
-# Now this is odd. The JDK native libraries have to link against libjvm.so
-# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
-# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
-# is identical for client and server? Yes. Which is picked at runtime (client or server)?
-# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
-# libraries will link to whatever is in memory. Yuck.
-#
-# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
-if test "x$COMPILER_TYPE" = xCL; then
- LDFLAGS_JDKLIB="$LDFLAGS -dll -libpath:${JDK_OUTPUTDIR}/lib -libpath:${JDK_OUTPUTDIR}/objs"
- LDFLAGS_JDKLIB_SUFFIX=""
- if test "$HOST_CPU_BITS" == "64"; then
- LDFLAGS_STACK_SIZE=1048576
- else
- LDFLAGS_STACK_SIZE=327680
- fi
- LDFLAGS_JDKEXE="$LDFLAGS /STACK:$LDFLAGS_STACK_SIZE"
-else
- # If this is a --hash-style=gnu system, use --hash-style=both, why?
- HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
- if test -n "$HAS_GNU_HASH"; then
- # And since we now know that the linker is gnu, then add -z defs, to forbid
- # undefined symbols in object files.
- LDFLAGS="$LDFLAGS -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
- if test "x$DEBUG_LEVEL" == "xrelease"; then
- # When building release libraries, tell the linker optimize them.
- # Should this be supplied to the OSS linker as well?
- LDFLAGS="$LDFLAGS -Xlinker -O1"
- fi
- fi
-
- LDFLAGS_JDKLIB="$LDFLAGS $SHARED_LIBRARY_FLAGS \
- -L${JDK_OUTPUTDIR}/objs \
- -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
- -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
- -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
- LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
- if test "x$COMPILER_NAME" = xossc; then
- LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
- fi
-
- # Only the jli library is explicitly linked when the launchers are built.
- # The libjvm is then dynamically loaded/linked by the launcher.
- if test "x$HOST_OS" != "xmacosx"; then
- LDFLAGS_JDKEXE="$LDFLAGS -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
- LDFLAGS_JDKEXE_SUFFIX="-ljli"
- fi
-fi
-
-
-AC_SUBST(CFLAGS_JDKLIB)
-AC_SUBST(CFLAGS_JDKEXE)
-
-AC_SUBST(CXXFLAGS_JDKLIB)
-AC_SUBST(CXXFLAGS_JDKEXE)
-
-AC_SUBST(LDFLAGS_JDKLIB)
-AC_SUBST(LDFLAGS_JDKEXE)
-AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
-AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
-
-
-###############################################################################
-#
-# statically link libstdc++ before C++ ABI is stablized on Linux unless
-# dynamic build is configured on command line.
-#
-AC_ARG_ENABLE([static-link-stdc++], [AS_HELP_STRING([--disable-static-link-stdc++],
- [disable static linking of the C++ runtime on Linux @<:@enabled@:>@])],,
- [
- enable_static_link_stdc__=yes
- ])
-
-if test "x$HOST_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_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
- AC_MSG_ERROR([I cannot link to stdc++! Neither dynamically nor statically.])
- fi
-
- if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
- AC_MSG_NOTICE([Static linking of libstdc++ was not possible reverting to dynamic linking.])
- enable_static_link_stdc__=no
- fi
-
- if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
- AC_MSG_NOTICE([Dynamic linking of libstdc++ was not possible reverting to static linking.])
- enable_static_link_stdc__=yes
- fi
-
- AC_MSG_CHECKING([how to link with libstdc++])
- if test "x$enable_static_link_stdc__" = xyes; then
- LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
- LDCXX="$CC"
- AC_MSG_RESULT([static])
- else
- LIBCXX="$LIBCXX -lstdc++"
- LDCXX="$CXX"
- AC_MSG_RESULT([dynamic])
- fi
-fi
-
-###############################################################################
-#
-# Could someone enlighten this configure script with a comment about libCrun?
-# The LEGACY_HOST_CPU3 is the setting for ISA_DIR.
-#
-if test "x$HOST_OS" = xsolaris && test "x$LIBCXX" = x; then
- LIBCXX="/usr/lib${LEGACY_HOST_CPU3}/libCrun.so.1"
-fi
-
-# TODO better (platform agnostic) test
-if test "x$HOST_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
- LIBCXX="-lstdc++"
-fi
-
-AC_SUBST(LIBCXX)
-
###############################################################################
-OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
-OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
-OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
-OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
-AC_SUBST(OS_VERSION_MAJOR)
-AC_SUBST(OS_VERSION_MINOR)
-AC_SUBST(OS_VERSION_MICRO)
+# Check for some common pitfalls
+BASIC_TEST_USABILITY_ISSUES
-###############################################################################
-#
-# Misc
-#
+# At the end, call the closed hook. (Dummy macro if no closed sources available)
+CLOSED_HOOK
-# The name of the Service Agent jar.
-SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
-if test "x$HOST_OS" = "xwindows"; then
- SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
-fi
-AC_SUBST(SALIB_NAME)
-
-# Control wether Hotspot runs Queens test after build.
-AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
- [enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],,
- [enable_hotspot_test_in_build=no])
-if test "x$enable_hotspot_test_in_build" = "xyes"; then
- TEST_IN_BUILD=true
-else
- TEST_IN_BUILD=false
-fi
-AC_SUBST(TEST_IN_BUILD)
-
-###############################################################################
-#
-# Choose cacerts source file
-#
-AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
- [specify alternative cacerts file])])
-if test "x$with_cacerts_file" != x; then
- CACERTS_FILE=$with_cacerts_file
-else
- if test "x$OPENJDK" = "xtrue"; then
- CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
- else
- CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
- fi
-fi
-AC_SUBST(CACERTS_FILE)
-
-# Check if build directory is on local disk.
-# return 0 if it is on local disk, non-0 if on remote disk or failure
-function is_directory_on_local_disk {
- # df -l lists only local disks; if the given directory is not found then
- # a non-zero exit code is given
- $DF -l $1 > /dev/null 2>&1
-}
-
-AC_MSG_CHECKING([if build directory is on local disk])
-if is_directory_on_local_disk $OUTPUT_ROOT; then
- OUTPUT_DIR_IS_LOCAL="yes"
-else
- OUTPUT_DIR_IS_LOCAL="no"
-fi
-AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
-
-# We're messing a bit with internal autoconf variables to put the config.status in the
-# output directory instead of the current directory.
-CONFIG_STATUS=$OUTPUT_ROOT/config.status
-
-# Now create the actual output files, after this, the main work of configure is done
+# We're messing a bit with internal autoconf variables to put the config.status
+# in the output directory instead of the current directory.
+CONFIG_STATUS="$OUTPUT_ROOT/config.status"
+# Create the actual output files. Now the main work of configure is done.
AC_OUTPUT
# Finally output some useful information to the user
-
-if test "x$CCACHE_FOUND" != x; then
- if test "x$HAS_GOOD_CCACHE" = x; then
- CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
- CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
- else
- CCACHE_STATUS="installed and in use"
- fi
-else
- if test "x$GCC" = xyes; then
- CCACHE_STATUS="not installed (consider installing)"
- CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
- else
- CCACHE_STATUS="not available for your system"
- fi
-fi
-
-printf "\n"
-printf "====================================================\n"
-printf "A new configuration has been successfully created in\n"
-printf "$OUTPUT_ROOT\n"
-if test "x$CONFIGURE_COMMAND_LINE" != x; then
- printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
-else
- printf "using default settings.\n"
-fi
-
-printf "\n"
-printf "Configuration summary:\n"
-printf "* Debug level: $DEBUG_LEVEL\n"
-printf "* JDK variant: $JDK_VARIANT\n"
-printf "* JVM variants: $with_jvm_variants\n"
-printf "* Host info: OS: $HOST_OS, CPU architecture: $HOST_CPU_ARCH, address length: $HOST_CPU_BITS\n"
-printf "* Boot JDK: $BOOT_JDK\n"
-
-printf "\n"
-printf "Build performance summary:\n"
-printf "* Cores to use: $NUM_CORES\n"
-printf "* Memory limit: $MEMORY_SIZE MB\n"
-printf "* ccache status: $CCACHE_STATUS\n"
-
-if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
- printf "\n"
- printf "WARNING: Your build output directory is not on a local disk.\n"
- printf "This will severely degrade build performance!\n"
- printf "It is recommended that you create an output directory on a local disk,\n"
- printf "and run the configure script again from that directory.\n"
-fi
-
-if test "x$CCACHE_HELP_MSG" != x; then
- printf "\n"
- printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
- printf "$CCACHE_HELP_MSG\n"
-
- help_on_build_dependency ccache
- printf "$HELP_MSG\n"
-fi
+HELP_PRINT_SUMMARY_AND_WARNINGS
diff --git a/common/autoconf/cores.m4 b/common/autoconf/cores.m4
deleted file mode 100644
index f48887d36be..00000000000
--- a/common/autoconf/cores.m4
+++ /dev/null
@@ -1,103 +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([CHECK_CORES],
-[
- AC_MSG_CHECKING([for number of cores])
- NUM_CORES=1
- FOUND_CORES=no
-
- if test -f /proc/cpuinfo; then
- # Looks like a Linux system
- NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
- FOUND_CORES=yes
- fi
-
- if test -x /usr/sbin/psrinfo; then
- # Looks like a Solaris system
- NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
- FOUND_CORES=yes
- fi
-
- if test -x /usr/sbin/system_profiler; then
- # Looks like a MacOSX system
- NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
- FOUND_CORES=yes
- fi
-
- if test "x$build_os" = xwindows; then
- NUM_CORES=4
- fi
-
- # For c/c++ code we run twice as many concurrent build
- # jobs than we have cores, otherwise we will stall on io.
- CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
-
- if test "x$FOUND_CORES" = xyes; then
- AC_MSG_RESULT([$NUM_CORES])
- else
- AC_MSG_RESULT([could not detect number of cores, defaulting to 1!])
- fi
-
-])
-
-AC_DEFUN([CHECK_MEMORY_SIZE],
-[
- AC_MSG_CHECKING([for memory size])
- # Default to 1024MB
- MEMORY_SIZE=1024
- FOUND_MEM=no
-
- if test -f /proc/cpuinfo; then
- # Looks like a Linux system
- MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
- MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
- FOUND_MEM=yes
- fi
-
- if test -x /usr/sbin/prtconf; then
- # Looks like a Solaris system
- MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
- FOUND_MEM=yes
- fi
-
- if test -x /usr/sbin/system_profiler; then
- # Looks like a MacOSX system
- MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
- MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
- FOUND_MEM=yes
- fi
-
- if test "x$build_os" = xwindows; then
- MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
- FOUND_MEM=yes
- fi
-
- if test "x$FOUND_MEM" = xyes; then
- AC_MSG_RESULT([$MEMORY_SIZE MB])
- else
- AC_MSG_RESULT([could not detect memory size defaulting to 1024MB!])
- fi
-])
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
new file mode 100644
index 00000000000..5f7058f9300
--- /dev/null
+++ b/common/autoconf/generated-configure.sh
@@ -0,0 +1,18054 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.67 for openjdk jdk8.
+#
+# Report bugs to .
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: build-dev@openjdk.java.net about your system, including
+$0: any error possibly output before this message. Then
+$0: install a modern shell, or manually run the script
+$0: under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 &1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='openjdk'
+PACKAGE_TARNAME='openjdk'
+PACKAGE_VERSION='jdk8'
+PACKAGE_STRING='openjdk jdk8'
+PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include
+#ifdef HAVE_SYS_TYPES_H
+# include
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include
+#endif
+#ifdef STDC_HEADERS
+# include
+# include
+#else
+# ifdef HAVE_STDLIB_H
+# include
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include
+# endif
+# include
+#endif
+#ifdef HAVE_STRINGS_H
+# include
+#endif
+#ifdef HAVE_INTTYPES_H
+# include
+#endif
+#ifdef HAVE_STDINT_H
+# include
+#endif
+#ifdef HAVE_UNISTD_H
+# include
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+CCACHE
+USE_PRECOMPILED_HEADER
+ENABLE_SJAVAC
+JAVAC_USE_MODE
+JAVAC_USE_DEPS
+JAVAC_SERVER_CORES
+JAVAC_SERVERS
+JAVAC_USE_REMOTE
+SERVER_JAVA
+MEMORY_SIZE
+CONCURRENT_BUILD_JOBS
+NUM_CORES
+SALIB_NAME
+HOTSPOT_MAKE_ARGS
+LIBCXX
+LIBDL
+LIBM
+LIBZIP_CAN_USE_MMAP
+USE_EXTERNAL_LIBZ
+USE_EXTERNAL_LIBGIF
+USE_EXTERNAL_LIBJPEG
+ALSA_LIBS
+ALSA_CFLAGS
+FREETYPE2_LIB_PATH
+USING_SYSTEM_FT_LIB
+FREETYPE2_LIBS
+FREETYPE2_CFLAGS
+CUPS_LIBS
+CUPS_CFLAGS
+OPENWIN_HOME
+X_EXTRA_LIBS
+X_LIBS
+X_PRE_LIBS
+X_CFLAGS
+XMKMF
+CXXFLAGS_DEBUG_SYMBOLS
+CFLAGS_DEBUG_SYMBOLS
+ZIP_DEBUGINFO_FILES
+ENABLE_DEBUG_SYMBOLS
+UNCYGDRIVE
+LDFLAGS_JDKEXE_SUFFIX
+LDFLAGS_JDKLIB_SUFFIX
+LDFLAGS_JDKEXE
+LDFLAGS_JDKLIB
+CXXFLAGS_JDKEXE
+CXXFLAGS_JDKLIB
+CFLAGS_JDKEXE
+CFLAGS_JDKLIB
+PACKAGE_PATH
+CXX_FLAG_DEPS
+C_FLAG_DEPS
+CXX_O_FLAG_NONE
+CXX_O_FLAG_NORM
+CXX_O_FLAG_HI
+CXX_O_FLAG_HIGHEST
+C_O_FLAG_NONE
+C_O_FLAG_NORM
+C_O_FLAG_HI
+C_O_FLAG_HIGHEST
+POST_MCS_CMD
+POST_STRIP_CMD
+SET_SHARED_LIBRARY_ORIGIN
+CXX_FLAG_REORDER
+C_FLAG_REORDER
+SET_SHARED_LIBRARY_MAPFILE
+SET_SHARED_LIBRARY_NAME
+SHARED_LIBRARY_FLAGS
+EXE_SUFFIX
+STATIC_LIBRARY_SUFFIX
+SHARED_LIBRARY_SUFFIX
+LIBRARY_PREFIX
+STATIC_LIBRARY
+SHARED_LIBRARY
+OBJ_SUFFIX
+ENDIAN
+ARCH_DATA_MODEL
+LP64
+OBJCOPY
+MCS
+STRIP
+NM
+ASFLAGS
+AS
+CXXCPP
+CPP
+COMPILER_TYPE
+RC_FLAGS
+DUMPBIN
+WINAR
+RC
+MT
+WINLD
+ARFLAGS
+AR
+LDEXECXX
+LDCXX
+LDEXE
+LD
+ac_ct_OBJC
+OBJCFLAGS
+OBJC
+ac_ct_CXX
+CXXFLAGS
+CXX
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+HOSTLD
+HOSTCXX
+HOSTCC
+DEFINE_CROSS_COMPILE_ARCH
+MSVCR100DLL
+CHECK_FOR_VCINSTALLDIR
+SETUPDEVENV
+AR_OUT_OPTION
+LD_OUT_OPTION
+EXE_OUT_OPTION
+CC_OUT_OPTION
+SYS_ROOT
+HOTSPOT_DIST
+JAXWS_DIST
+JAXP_DIST
+CORBA_DIST
+LANGTOOLS_DIST
+IMAGES_OUTPUTDIR
+JDK_OUTPUTDIR
+HOTSPOT_OUTPUTDIR
+JAXWS_OUTPUTDIR
+JAXP_OUTPUTDIR
+CORBA_OUTPUTDIR
+LANGTOOLS_OUTPUTDIR
+OVERRIDE_SRC_ROOT
+ADD_SRC_ROOT
+JDK_TOPDIR
+HOTSPOT_TOPDIR
+JAXWS_TOPDIR
+JAXP_TOPDIR
+CORBA_TOPDIR
+LANGTOOLS_TOPDIR
+BOOT_JDK_JVMARGS
+NATIVE2ASCII
+RMIC
+JAR
+JAVAH
+JAVAC_FLAGS
+JAVAC
+BOOT_JDK_SOURCETARGET
+JAVA
+BOOT_TOOLSJAR
+BOOT_RTJAR
+BOOT_JDK
+JAVA_CHECK
+JAVAC_CHECK
+OUTPUT_ROOT
+CONF_NAME
+SPEC
+COOKED_BUILD_NUMBER
+FULL_VERSION
+RELEASE
+JDK_VERSION
+RUNTIME_NAME
+COPYRIGHT_YEAR
+COMPANY_NAME
+JDK_RC_PLATFORM_NAME
+PRODUCT_SUFFIX
+PRODUCT_NAME
+LAUNCHER_NAME
+MILESTONE
+JDK_BUILD_NUMBER
+JDK_UPDATE_VERSION
+JDK_MICRO_VERSION
+JDK_MINOR_VERSION
+JDK_MAJOR_VERSION
+ENABLE_JFR
+COMPRESS_JARS
+CACERTS_FILE
+TEST_IN_BUILD
+DISABLE_NIMBUS
+GENERATE_DOCS
+ENABLE_DOCS
+BUILD_HEADLESS_ONLY
+BUILD_HEADLESS
+SUPPORT_HEADFUL
+SUPPORT_HEADLESS
+JIGSAW
+SET_OPENJDK
+BUILD_VARIANT_RELEASE
+DEBUG_CLASSFILES
+FASTDEBUG
+VARIANT
+DEBUG_LEVEL
+JVM_VARIANT_ZEROSHARK
+JVM_VARIANT_ZERO
+JVM_VARIANT_KERNEL
+JVM_VARIANT_CLIENT
+JVM_VARIANT_SERVER
+JVM_VARIANTS
+JDK_VARIANT
+MINIMIZE_RAM_USAGE
+JAVASE_EMBEDDED
+PATH_SEP
+CYGPATH
+OS_VERSION_MICRO
+OS_VERSION_MINOR
+OS_VERSION_MAJOR
+REQUIRED_OS_VERSION
+REQUIRED_OS_NAME
+LEGACY_OPENJDK_BUILD_CPU3
+LEGACY_OPENJDK_BUILD_CPU2
+LEGACY_OPENJDK_BUILD_CPU1
+OPENJDK_BUILD_CPU_ENDIAN
+OPENJDK_BUILD_CPU_BITS
+OPENJDK_BUILD_CPU_ARCH
+OPENJDK_BUILD_CPU
+LEGACY_OPENJDK_BUILD_OS_API
+OPENJDK_BUILD_OS_API
+OPENJDK_BUILD_OS_FAMILY
+OPENJDK_BUILD_OS
+LEGACY_OPENJDK_TARGET_CPU3
+LEGACY_OPENJDK_TARGET_CPU2
+LEGACY_OPENJDK_TARGET_CPU1
+OPENJDK_TARGET_CPU_ENDIAN
+OPENJDK_TARGET_CPU_BITS
+OPENJDK_TARGET_CPU_ARCH
+OPENJDK_TARGET_CPU
+LEGACY_OPENJDK_TARGET_OS_API
+OPENJDK_TARGET_OS_API
+OPENJDK_TARGET_OS_FAMILY
+OPENJDK_TARGET_OS
+OPENJDK_BUILD_SYSTEM
+OPENJDK_TARGET_SYSTEM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+PKG_CONFIG
+BDEPS_FTP
+BDEPS_UNZIP
+HG
+FILE
+EXPR
+READELF
+OTOOL
+LDD
+UNZIP
+ZIP
+XARGS
+WC
+TOUCH
+TR
+TEE
+TAIL
+TAR
+SORT
+SH
+SED
+RM
+THEPWDCMD
+PRINTF
+NAWK
+MV
+MKDIR
+MAKE
+LS
+LN
+HEAD
+FIND_DELETE
+FIND
+FGREP
+EGREP
+GREP
+ECHO
+DIFF
+DF
+DATE
+CUT
+CPIO
+CP
+CHMOD
+CAT
+AWK
+PKGHANDLER
+BUILD_LOG_WRAPPER
+BUILD_LOG_PREVIOUS
+BUILD_LOG
+SRC_ROOT
+READLINK
+DATE_WHEN_CONFIGURED
+CONFIGURE_COMMAND_LINE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_builddeps_conf
+with_builddeps_server
+with_builddeps_dir
+with_builddeps_group
+enable_list_builddeps
+with_target_bits
+with_jdk_variant
+with_jvm_variants
+enable_debug
+with_debug_level
+enable_openjdk_only
+enable_jigsaw
+enable_headful
+enable_docs
+enable_nimbus
+enable_hotspot_test_in_build
+with_cacerts_file
+enable_jfr
+with_conf_name
+with_boot_jdk
+with_boot_jdk_jvmargs
+with_add_source_root
+with_override_source_root
+with_adds_and_overrides
+with_override_langtools
+with_override_corba
+with_override_jaxp
+with_override_jaxws
+with_override_hotspot
+with_override_jdk
+with_msvcr100dll
+with_sys_root
+with_tools_dir
+with_devkit
+with_extra_cflags
+with_extra_cxxflags
+with_extra_ldflags
+enable_debug_symbols
+enable_zip_debug_info
+enable_macosx_runtime_support
+with_x
+with_cups
+with_cups_include
+with_cups_lib
+with_freetype
+with_alsa
+with_alsa_include
+with_alsa_lib
+with_zlib
+enable_static_link_stdc__
+with_num_cores
+with_memory_size
+with_server_java
+enable_javac_server
+with_javac_server_cores
+enable_javac_deps
+enable_javac_multi_core
+enable_sjavac
+enable_precompiled_headers
+enable_ccache
+with_ccache_dir
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+PKG_CONFIG
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+OBJC
+OBJCFLAGS
+CPP
+CXXCPP
+XMKMF
+FREETYPE2_CFLAGS
+FREETYPE2_LIBS
+ALSA_CFLAGS
+ALSA_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures openjdk jdk8 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of openjdk jdk8:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-list-builddeps list all build dependencies known to the configure
+ script
+ --enable-debug set the debug level to fastdebug (shorthand for
+ --with-debug-level=fastdebug) [disabled]
+ --enable-openjdk-only build OpenJDK regardless of the presence of closed
+ repositories [disabled]
+ --enable-jigsaw build Jigsaw images (not yet available) [disabled]
+ --disable-headful build headful support (graphical UI support)
+ [enabled]
+ --enable-docs enable generation of Javadoc documentation
+ [disabled]
+ --disable-nimbus disable Nimbus L&F [enabled]
+ --enable-hotspot-test-in-build
+ enable running of Queens test after Hotspot build
+ (not yet available) [disabled]
+ --enable-jfr enable jfr (default is no)
+ ENABLE_JFR="${enableval}"
+ --disable-debug-symbols disable generation of debug symbols ([enabled])
+ --disable-zip-debug-info
+ don't zip debug-info files ([enabled@:@)
+ --disable-macosx-runtime-support
+ disable the use of MacOSX Java runtime support
+ framework [enabled]
+ --disable-static-link-stdc++
+ disable static linking of the C++ runtime on Linux
+ [enabled]
+ --enable-javac-server enable the shared javac server during the build
+ process [disabled]
+ --enable-javac-deps enable the dependency tracking between Java packages
+ [disabled]
+ --enable-javac-multi-core
+ compile Java packages concurrently [disabled]
+ --enable-sjavac use sjavac to do fast incremental compiles
+ [disabled]
+ --disable-precompiled-headers
+ use precompiled headers when compiling C++ [enabled]
+ --disable-ccache use ccache to speed up recompilations [enabled]
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-builddeps-conf use this configuration file for the builddeps
+ --with-builddeps-server download and use build dependencies from this server
+ url, e.g.
+ --with-builddeps-server=ftp://example.com/dir
+ --with-builddeps-dir store downloaded build dependencies here
+ [d/localhome/builddeps]
+ --with-builddeps-group chgrp the downloaded build dependencies to this
+ group
+ --with-target-bits build 32-bit or 64-bit binaries (for platforms that
+ support it), e.g. --with-target-bits=32 [guessed]
+ --with-jdk-variant JDK variant to build (normal, embedded) [normal]
+ --with-jvm-variants JVM variants (separated by commas) to build (server,
+ client, kernel, zero, zeroshark) [server]
+ --with-debug-level set the debug level (release, fastdebug, slowdebug)
+ [release]
+ --with-cacerts-file specify alternative cacerts file
+ --with-conf-name use this as the name of the configuration,
+ overriding the generated default
+ --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
+ --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
+ invocations of the Boot JDK, overriding the default
+ values, e.g --with-boot-jdk-jvmargs="-Xmx8G
+ -enableassertions"
+ --with-add-source-root for each and every source directory, look in this
+ additional source root for the same directory; if it
+ exists and have files in it, include it in the build
+ --with-override-source-root
+ for each and every source directory, look in this
+ override source root for the same directory; if it
+ exists, use that directory instead and ignore the
+ directory in the original source root
+ --with-adds-and-overrides
+ use the subdirs 'adds' and 'overrides' in the
+ specified directory as add-source-root and
+ override-source-root
+ --with-override-langtools
+ use this langtools dir for the build
+ --with-override-corba use this corba dir for the build
+ --with-override-jaxp use this jaxp dir for the build
+ --with-override-jaxws use this jaxws dir for the build
+ --with-override-hotspot use this hotspot dir for the build
+ --with-override-jdk use this jdk dir for the build
+ --with-msvcr100dll copy this msvcr100.dll into the built JDK
+ --with-sys-root pass this sys-root to the compilers and linker
+ (useful if the sys-root encoded in the cross
+ compiler tools is incorrect)
+ --with-tools-dir search this directory for compilers and tools
+ --with-devkit use this directory as base for tools-dir and
+ sys-root
+ --with-extra-cflags extra flags to be used when compiling jdk c-files
+ --with-extra-cxxflags extra flags to be used when compiling jdk c++-files
+ --with-extra-ldflags extra flags to be used when linking jdk
+ --with-x use the X Window System
+ --with-cups specify prefix directory for the cups package
+ (expecting the libraries under PATH/lib and the
+ headers under PATH/include)
+ --with-cups-include specify directory for the cups include files
+ --with-cups-lib specify directory for the cups library
+ --with-freetype specify prefix directory for the freetype2 package
+ (expecting the libraries under PATH/lib and the
+ headers under PATH/include)
+ --with-alsa specify prefix directory for the alsa package
+ (expecting the libraries under PATH/lib and the
+ headers under PATH/include)
+ --with-alsa-include specify directory for the alsa include files
+ --with-alsa-lib specify directory for the alsa library
+ --with-zlib use zlib from build system or OpenJDK source
+ (system, bundled) [bundled]
+ --with-num-cores number of cores in the build system, e.g.
+ --with-num-cores=8 [probed]
+ --with-memory-size memory (in MB) available in the build system, e.g.
+ --with-memory-size=1024 [probed]
+ --with-server-java use this java binary for running the javac
+ background server and other long running java tasks
+ in the build process, e.g.
+ ---with-server-java="/opt/jrockit/bin/java -server"
+ --with-javac-server-cores
+ use at most this number of concurrent threads on the
+ javac server [probed]
+ --with-ccache-dir where to store ccache files [~/.ccache]
+
+Some influential environment variables:
+ PKG_CONFIG path to pkg-config utility
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L if you have libraries in a
+ nonstandard directory
+ LIBS libraries to pass to the linker, e.g. -l
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if
+ you have headers in a nonstandard directory
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ OBJC Objective C compiler command
+ OBJCFLAGS Objective C compiler flags
+ CPP C preprocessor
+ CXXCPP C++ preprocessor
+ XMKMF Path to xmkmf, Makefile generator for X Window System
+ FREETYPE2_CFLAGS
+ C compiler flags for FREETYPE2, overriding pkg-config
+ FREETYPE2_LIBS
+ linker flags for FREETYPE2, overriding pkg-config
+ ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
+ ALSA_LIBS linker flags for ALSA, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to .
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+openjdk configure jdk8
+generated by GNU Autoconf 2.67
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_objc_try_compile LINENO
+# -----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_objc_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_objc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_objc_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_run LINENO
+# ------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_cxx_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_run
+
+# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
+# ----------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_cxx_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid; break
+else
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_lo=$ac_mid; break
+else
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid
+else
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include
+#include
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 &5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_header_compile
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+
+# ac_fn_cxx_check_func LINENO FUNC VAR
+# ------------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_cxx_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case declares $2.
+ For example, HP-UX 11i declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval "test \"\${$3+set}\"" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ----------------------------------------- ##
+## Report this to build-dev@openjdk.java.net ##
+## ----------------------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_cxx_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval "test \"\${$3+set}\"" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ----------------------------------------- ##
+## Report this to build-dev@openjdk.java.net ##
+## ----------------------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_header_mongrel
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by openjdk $as_me jdk8, which was
+generated by GNU Autoconf 2.67. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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
+
+
+
+# Do not change or remove the following line, it is needed for consistency checks:
+# DATE_WHEN_GENERATED: 1341161875
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant .
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+# PKG_CHECK_MODULES
+
+
+# Include these first...
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#%%% Simple tools %%%
+
+
+
+
+
+
+
+
+
+
+
+
+# Check if build directory is on local disk.
+# Argument 1: directory to test
+# Argument 2: what to do if it is on local disk
+# Argument 3: what to do otherwise (remote disk or failure)
+
+
+
+
+#
+# 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, 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.
+#
+
+# Fixes paths on windows to be mixed mode short.
+
+
+
+
+###############################################################################
+#
+# We need a Boot JDK to bootstrap the build.
+#
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+apt_help() {
+ case $1 in
+ devkit)
+ PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
+ openjdk)
+ PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
+ alsa)
+ PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
+ cups)
+ PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
+ freetype2)
+ PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
+ pulse)
+ PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
+ x11)
+ PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
+ ccache)
+ PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
+ * )
+ break ;;
+ esac
+}
+
+yum_help() {
+ case $1 in
+ devkit)
+ PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
+ openjdk)
+ PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
+ alsa)
+ PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
+ cups)
+ PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
+ freetype2)
+ PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
+ pulse)
+ PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
+ x11)
+ PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
+ ccache)
+ PKGHANDLER_COMMAND="sudo yum install ccache" ;;
+ * )
+ break ;;
+ esac
+}
+
+port_help() {
+ PKGHANDLER_COMMAND=""
+}
+
+pkgutil_help() {
+ PKGHANDLER_COMMAND=""
+}
+
+pkgadd_help() {
+ PKGHANDLER_COMMAND=""
+}
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+#%%% Build and target systems %%%
+
+
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+#
+# 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.
+#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# This line needs to be here, verbatim, after all includes.
+# It is replaced with closed functionality when building
+# closed sources.
+
+
+###############################################################################
+#
+# Initialization
+#
+###############################################################################
+
+# Basic initialization that must happen first of all
+
+# Save the original command line. This is passed to us by the wrapper configure script.
+
+DATE_WHEN_CONFIGURED=`LANG=C date`
+
+
+# Locate the directory of this script.
+SCRIPT="$0"
+
+ if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ # Follow a chain of symbolic links. Use readlink
+ # where it exists, else fall back to horribly
+ # complicated shell code.
+ # Extract the first word of "readlink", so it can be a program name with args.
+set dummy readlink; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_READLINK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $READLINK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+READLINK=$ac_cv_path_READLINK
+if test -n "$READLINK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
+$as_echo "$READLINK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$READLINK_TESTED" != yes; then
+ # On MacOSX there is a readlink tool with a different
+ # purpose than the GNU readlink tool. Check the found readlink.
+ ISGNU=`$READLINK --help 2>&1 | grep GNU`
+ if test "x$ISGNU" = x; then
+ # A readlink that we do not know how to use.
+ # Are there other non-GNU readlinks out there?
+ READLINK_TESTED=yes
+ READLINK=
+ fi
+ fi
+
+ if test "x$READLINK" != x; then
+ SCRIPT=`$READLINK -f $SCRIPT`
+ else
+ STARTDIR=$PWD
+ COUNTER=0
+ DIR=`dirname $SCRIPT`
+ FIL=`basename $SCRIPT`
+ while test $COUNTER -lt 20; do
+ ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
+ if test "x$ISLINK" == x; then
+ # This is not a symbolic link! We are done!
+ break
+ fi
+ # The link might be relative! We have to use cd to travel safely.
+ cd $DIR
+ cd `dirname $ISLINK`
+ DIR=`pwd`
+ FIL=`basename $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ SCRIPT=$DIR/$FIL
+ fi
+ fi
+
+AUTOCONF_DIR=`dirname $0`
+
+
+# Where is the source? It is located two levels above the configure script.
+CURDIR="$PWD"
+cd "$AUTOCONF_DIR/../.."
+SRC_ROOT="`pwd`"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ SRC_ROOT_LENGTH=`pwd|wc -m`
+ if test $SRC_ROOT_LENGTH -gt 100; then
+ as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
+ fi
+fi
+
+cd "$CURDIR"
+
+
+ # Fail with message the path to the source root if var SRC_ROOT contains a path with no spaces in it.
+ # Unless on Windows, where we can rewrite the path.
+ HAS_SPACE=`echo "$SRC_ROOT" | grep " "`
+ if test "x$HAS_SPACE" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ SRC_ROOT=`$CYGPATH -s -m -a "$SRC_ROOT"`
+ SRC_ROOT=`$CYGPATH -u "$SRC_ROOT"`
+ else
+ as_fn_error $? "You cannot have spaces in the path to the source root! \"$SRC_ROOT\"" "$LINENO" 5
+ fi
+ fi
+
+
+ # Fail with message the path to the current directory if var CURDIR contains a path with no spaces in it.
+ # Unless on Windows, where we can rewrite the path.
+ HAS_SPACE=`echo "$CURDIR" | grep " "`
+ if test "x$HAS_SPACE" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ CURDIR=`$CYGPATH -s -m -a "$CURDIR"`
+ CURDIR=`$CYGPATH -u "$CURDIR"`
+ else
+ as_fn_error $? "You cannot have spaces in the path to the current directory! \"$CURDIR\"" "$LINENO" 5
+ fi
+ fi
+
+
+
+# Setup default logging of stdout and stderr to build.log in the output root.
+BUILD_LOG='$(OUTPUT_ROOT)/build.log'
+BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
+BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
+
+
+
+
+
+# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
+
+ for ac_prog in apt-get yum port pkgutil pkgadd
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKGHANDLER"; then
+ ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PKGHANDLER="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PKGHANDLER=$ac_cv_prog_PKGHANDLER
+if test -n "$PKGHANDLER"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
+$as_echo "$PKGHANDLER" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PKGHANDLER" && break
+done
+
+
+
+# Setup simple tools, that do not need have cross compilation support.
+# Without these, we can't properly run the rest of the configure script.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+
+# 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.
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$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
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+
+ # Test that variable AWK is not empty.
+ if test "" = "$AWK"; then as_fn_error $? "Could not find awk !" "$LINENO" 5 ; fi
+
+# Extract the first word of "cat", so it can be a program name with args.
+set dummy cat; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CAT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CAT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CAT="$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
+CAT=$ac_cv_path_CAT
+if test -n "$CAT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
+$as_echo "$CAT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable CAT is not empty.
+ if test "" = "$CAT"; then as_fn_error $? "Could not find cat !" "$LINENO" 5 ; fi
+
+# Extract the first word of "chmod", so it can be a program name with args.
+set dummy chmod; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CHMOD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CHMOD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CHMOD="$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
+CHMOD=$ac_cv_path_CHMOD
+if test -n "$CHMOD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
+$as_echo "$CHMOD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable CHMOD is not empty.
+ if test "" = "$CHMOD"; then as_fn_error $? "Could not find chmod !" "$LINENO" 5 ; fi
+
+# Extract the first word of "cp", so it can be a program name with args.
+set dummy cp; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CP="$CP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CP="$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
+CP=$ac_cv_path_CP
+if test -n "$CP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
+$as_echo "$CP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable CP is not empty.
+ if test "" = "$CP"; then as_fn_error $? "Could not find cp !" "$LINENO" 5 ; fi
+
+# Extract the first word of "cpio", so it can be a program name with args.
+set dummy cpio; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CPIO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CPIO in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CPIO=$ac_cv_path_CPIO
+if test -n "$CPIO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
+$as_echo "$CPIO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable CPIO is not empty.
+ if test "" = "$CPIO"; then as_fn_error $? "Could not find cpio !" "$LINENO" 5 ; fi
+
+# Extract the first word of "cut", so it can be a program name with args.
+set dummy cut; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CUT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CUT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CUT="$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
+CUT=$ac_cv_path_CUT
+if test -n "$CUT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
+$as_echo "$CUT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable CUT is not empty.
+ if test "" = "$CUT"; then as_fn_error $? "Could not find cut !" "$LINENO" 5 ; fi
+
+# Extract the first word of "date", so it can be a program name with args.
+set dummy date; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_DATE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $DATE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_DATE="$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
+DATE=$ac_cv_path_DATE
+if test -n "$DATE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
+$as_echo "$DATE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable DATE is not empty.
+ if test "" = "$DATE"; then as_fn_error $? "Could not find date !" "$LINENO" 5 ; fi
+
+# Extract the first word of "df", so it can be a program name with args.
+set dummy df; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_DF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $DF in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DF="$DF" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+DF=$ac_cv_path_DF
+if test -n "$DF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
+$as_echo "$DF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable DF is not empty.
+ if test "" = "$DF"; then as_fn_error $? "Could not find df !" "$LINENO" 5 ; fi
+
+# Extract the first word of "diff", so it can be a program name with args.
+set dummy diff; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_DIFF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $DIFF in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_DIFF="$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
+DIFF=$ac_cv_path_DIFF
+if test -n "$DIFF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
+$as_echo "$DIFF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable DIFF is not empty.
+ if test "" = "$DIFF"; then as_fn_error $? "Could not find diff !" "$LINENO" 5 ; fi
+
+# Warning echo is really, really unportable!!!!! Different
+# behaviour in bash and dash and in a lot of other shells!
+# Use printf for serious work!
+# Extract the first word of "echo", so it can be a program name with args.
+set dummy echo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ECHO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ECHO in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ECHO="$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
+ECHO=$ac_cv_path_ECHO
+if test -n "$ECHO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
+$as_echo "$ECHO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable ECHO is not empty.
+ if test "" = "$ECHO"; then as_fn_error $? "Could not find echo !" "$LINENO" 5 ; fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+ # Test that variable EGREP is not empty.
+ if test "" = "$EGREP"; then as_fn_error $? "Could not find egrep !" "$LINENO" 5 ; fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+
+ # Test that variable FGREP is not empty.
+ if test "" = "$FGREP"; then as_fn_error $? "Could not find fgrep !" "$LINENO" 5 ; fi
+
+
+# Extract the first word of "find", so it can be a program name with args.
+set dummy find; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_FIND+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $FIND in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_FIND="$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
+FIND=$ac_cv_path_FIND
+if test -n "$FIND"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
+$as_echo "$FIND" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable FIND is not empty.
+ if test "" = "$FIND"; then as_fn_error $? "Could not find find !" "$LINENO" 5 ; fi
+
+
+ # Test if find supports -delete
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
+$as_echo_n "checking if find supports -delete... " >&6; }
+ FIND_DELETE="-delete"
+
+ DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
+
+ echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
+
+ TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
+ if test -f $DELETEDIR/TestIfFindSupportsDelete; then
+ # No, it does not.
+ rm $DELETEDIR/TestIfFindSupportsDelete
+ FIND_DELETE="-exec rm \{\} \+"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ rmdir $DELETEDIR
+
+
+
+{ $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; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+
+ # Test that variable GREP is not empty.
+ if test "" = "$GREP"; then as_fn_error $? "Could not find grep !" "$LINENO" 5 ; fi
+
+# Extract the first word of "head", so it can be a program name with args.
+set dummy head; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_HEAD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $HEAD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_HEAD="$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
+HEAD=$ac_cv_path_HEAD
+if test -n "$HEAD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
+$as_echo "$HEAD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable HEAD is not empty.
+ if test "" = "$HEAD"; then as_fn_error $? "Could not find head !" "$LINENO" 5 ; fi
+
+# Extract the first word of "ln", so it can be a program name with args.
+set dummy ln; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_LN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $LN in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LN="$LN" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LN="$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
+LN=$ac_cv_path_LN
+if test -n "$LN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
+$as_echo "$LN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable LN is not empty.
+ if test "" = "$LN"; then as_fn_error $? "Could not find ln !" "$LINENO" 5 ; fi
+
+# Extract the first word of "ls", so it can be a program name with args.
+set dummy ls; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_LS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $LS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LS="$LS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LS="$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
+LS=$ac_cv_path_LS
+if test -n "$LS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
+$as_echo "$LS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable LS is not empty.
+ if test "" = "$LS"; then as_fn_error $? "Could not find ls !" "$LINENO" 5 ; fi
+
+for ac_prog in gmake make
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MAKE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAKE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MAKE=$ac_cv_path_MAKE
+if test -n "$MAKE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
+$as_echo "$MAKE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$MAKE" && break
+done
+
+
+ # Test that variable MAKE is not empty.
+ if test "" = "$MAKE"; then as_fn_error $? "Could not find make !" "$LINENO" 5 ; fi
+
+MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[12346789]'`
+if test "x$MAKE_VERSION" = x; then
+ as_fn_error $? "You must use GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
+fi
+# Extract the first word of "mkdir", so it can be a program name with args.
+set dummy mkdir; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MKDIR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MKDIR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MKDIR="$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
+MKDIR=$ac_cv_path_MKDIR
+if test -n "$MKDIR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
+$as_echo "$MKDIR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable MKDIR is not empty.
+ if test "" = "$MKDIR"; then as_fn_error $? "Could not find mkdir !" "$LINENO" 5 ; fi
+
+# Extract the first word of "mv", so it can be a program name with args.
+set dummy mv; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MV+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MV in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MV="$MV" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MV="$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
+MV=$ac_cv_path_MV
+if test -n "$MV"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
+$as_echo "$MV" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable MV is not empty.
+ if test "" = "$MV"; then as_fn_error $? "Could not find mv !" "$LINENO" 5 ; fi
+
+for ac_prog in nawk gawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_NAWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $NAWK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_NAWK="$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
+NAWK=$ac_cv_path_NAWK
+if test -n "$NAWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
+$as_echo "$NAWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$NAWK" && break
+done
+
+
+ # Test that variable NAWK is not empty.
+ if test "" = "$NAWK"; then as_fn_error $? "Could not find nawk !" "$LINENO" 5 ; fi
+
+# Extract the first word of "printf", so it can be a program name with args.
+set dummy printf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PRINTF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PRINTF in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PRINTF="$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
+PRINTF=$ac_cv_path_PRINTF
+if test -n "$PRINTF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
+$as_echo "$PRINTF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable PRINTF is not empty.
+ if test "" = "$PRINTF"; then as_fn_error $? "Could not find printf !" "$LINENO" 5 ; fi
+
+# Extract the first word of "pwd", so it can be a program name with args.
+set dummy pwd; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $THEPWDCMD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+THEPWDCMD=$ac_cv_path_THEPWDCMD
+if test -n "$THEPWDCMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
+$as_echo "$THEPWDCMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "rm", so it can be a program name with args.
+set dummy rm; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_RM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $RM in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_RM="$RM" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+RM=$ac_cv_path_RM
+if test -n "$RM"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
+$as_echo "$RM" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable RM is not empty.
+ if test "" = "$RM"; then as_fn_error $? "Could not find rm !" "$LINENO" 5 ; fi
+
+RM="$RM -f"
+{ $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; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ 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_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+
+ # Test that variable SED is not empty.
+ if test "" = "$SED"; then as_fn_error $? "Could not find sed !" "$LINENO" 5 ; fi
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_SH+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SH="$SH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_SH="$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
+SH=$ac_cv_path_SH
+if test -n "$SH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
+$as_echo "$SH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable SH is not empty.
+ if test "" = "$SH"; then as_fn_error $? "Could not find sh !" "$LINENO" 5 ; fi
+
+# Extract the first word of "sort", so it can be a program name with args.
+set dummy sort; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_SORT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SORT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_SORT="$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
+SORT=$ac_cv_path_SORT
+if test -n "$SORT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
+$as_echo "$SORT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable SORT is not empty.
+ if test "" = "$SORT"; then as_fn_error $? "Could not find sort !" "$LINENO" 5 ; fi
+
+# Extract the first word of "tar", so it can be a program name with args.
+set dummy tar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_TAR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $TAR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TAR="$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
+TAR=$ac_cv_path_TAR
+if test -n "$TAR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
+$as_echo "$TAR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable TAR is not empty.
+ if test "" = "$TAR"; then as_fn_error $? "Could not find tar !" "$LINENO" 5 ; fi
+
+# Extract the first word of "tail", so it can be a program name with args.
+set dummy tail; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_TAIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $TAIL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TAIL="$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
+TAIL=$ac_cv_path_TAIL
+if test -n "$TAIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
+$as_echo "$TAIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable TAIL is not empty.
+ if test "" = "$TAIL"; then as_fn_error $? "Could not find tail !" "$LINENO" 5 ; fi
+
+# Extract the first word of "tee", so it can be a program name with args.
+set dummy tee; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_TEE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $TEE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TEE="$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
+TEE=$ac_cv_path_TEE
+if test -n "$TEE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
+$as_echo "$TEE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable TEE is not empty.
+ if test "" = "$TEE"; then as_fn_error $? "Could not find tee !" "$LINENO" 5 ; fi
+
+# Extract the first word of "tr", so it can be a program name with args.
+set dummy tr; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_TR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $TR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TR="$TR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TR="$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
+TR=$ac_cv_path_TR
+if test -n "$TR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
+$as_echo "$TR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable TR is not empty.
+ if test "" = "$TR"; then as_fn_error $? "Could not find tr !" "$LINENO" 5 ; fi
+
+# Extract the first word of "touch", so it can be a program name with args.
+set dummy touch; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_TOUCH+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $TOUCH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TOUCH="$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
+TOUCH=$ac_cv_path_TOUCH
+if test -n "$TOUCH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
+$as_echo "$TOUCH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable TOUCH is not empty.
+ if test "" = "$TOUCH"; then as_fn_error $? "Could not find touch !" "$LINENO" 5 ; fi
+
+# Extract the first word of "wc", so it can be a program name with args.
+set dummy wc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_WC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $WC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_WC="$WC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_WC="$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
+WC=$ac_cv_path_WC
+if test -n "$WC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
+$as_echo "$WC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable WC is not empty.
+ if test "" = "$WC"; then as_fn_error $? "Could not find wc !" "$LINENO" 5 ; fi
+
+# Extract the first word of "xargs", so it can be a program name with args.
+set dummy xargs; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XARGS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $XARGS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_XARGS="$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
+XARGS=$ac_cv_path_XARGS
+if test -n "$XARGS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
+$as_echo "$XARGS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable XARGS is not empty.
+ if test "" = "$XARGS"; then as_fn_error $? "Could not find xargs !" "$LINENO" 5 ; fi
+
+# Extract the first word of "zip", so it can be a program name with args.
+set dummy zip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ZIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ZIP=$ac_cv_path_ZIP
+if test -n "$ZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
+$as_echo "$ZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable ZIP is not empty.
+ if test "" = "$ZIP"; then as_fn_error $? "Could not find zip !" "$LINENO" 5 ; fi
+
+# Extract the first word of "unzip", so it can be a program name with args.
+set dummy unzip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_UNZIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $UNZIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+UNZIP=$ac_cv_path_UNZIP
+if test -n "$UNZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
+$as_echo "$UNZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable UNZIP is not empty.
+ if test "" = "$UNZIP"; then as_fn_error $? "Could not find unzip !" "$LINENO" 5 ; fi
+
+# Extract the first word of "ldd", so it can be a program name with args.
+set dummy ldd; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_LDD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $LDD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+LDD=$ac_cv_path_LDD
+if test -n "$LDD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
+$as_echo "$LDD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "x$LDD" = "x"; then
+ # List shared lib dependencies is used for
+ # debug output and checking for forbidden dependencies.
+ # We can build without it.
+ LDD="true"
+fi
+# Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $OTOOL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+OTOOL=$ac_cv_path_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "x$OTOOL" = "x"; then
+ OTOOL="true"
+fi
+# Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_READELF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $READELF in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+READELF=$ac_cv_path_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "expr", so it can be a program name with args.
+set dummy expr; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_EXPR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $EXPR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_EXPR="$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
+EXPR=$ac_cv_path_EXPR
+if test -n "$EXPR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
+$as_echo "$EXPR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable EXPR is not empty.
+ if test "" = "$EXPR"; then as_fn_error $? "Could not find expr !" "$LINENO" 5 ; fi
+
+# Extract the first word of "file", so it can be a program name with args.
+set dummy file; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_FILE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $FILE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_FILE="$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
+FILE=$ac_cv_path_FILE
+if test -n "$FILE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
+$as_echo "$FILE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Test that variable FILE is not empty.
+ if test "" = "$FILE"; then as_fn_error $? "Could not find file !" "$LINENO" 5 ; fi
+
+# Extract the first word of "hg", so it can be a program name with args.
+set dummy hg; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_HG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $HG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_HG="$HG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+HG=$ac_cv_path_HG
+if test -n "$HG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
+$as_echo "$HG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# Setup builddeps, for automatic downloading of tools we need.
+# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
+# boot-jdk setup, but we need to have basic tools setup first.
+
+
+# Check whether --with-builddeps-conf was given.
+if test "${with_builddeps_conf+set}" = set; then :
+ withval=$with_builddeps_conf;
+fi
+
+
+
+# Check whether --with-builddeps-server was given.
+if test "${with_builddeps_server+set}" = set; then :
+ withval=$with_builddeps_server;
+fi
+
+
+
+# Check whether --with-builddeps-dir was given.
+if test "${with_builddeps_dir+set}" = set; then :
+ withval=$with_builddeps_dir;
+else
+ with_builddeps_dir=/localhome/builddeps
+fi
+
+
+
+# Check whether --with-builddeps-group was given.
+if test "${with_builddeps_group+set}" = set; then :
+ withval=$with_builddeps_group;
+fi
+
+
+# Check whether --enable-list-builddeps was given.
+if test "${enable_list_builddeps+set}" = set; then :
+ enableval=$enable_list_builddeps; LIST_BUILDDEPS="${enableval}"
+else
+ LIST_BUILDDEPS='no'
+fi
+
+
+if test "x$LIST_BUILDDEPS" = xyes; then
+ echo
+ echo List of build dependencies known to the configure script,
+ echo that can be used in builddeps.conf files:
+ cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODULE\( | cut -f 2 -d ',' | tr -d ' ' | sort
+ echo
+ exit 1
+fi
+
+
+
+ if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
+ if test "x$with_builddeps_conf" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
+$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
+ builddepsfile=$with_builddeps_conf
+ if test -s $builddepsfile; then
+ . $builddepsfile
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
+$as_echo "loaded!" >&6; }
+ else
+ as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
+$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
+ builddepsfile=`mktemp`
+ touch $builddepsfile
+ # Put all found confs into a single file.
+ find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
+ # Source the file to acquire the variables
+ if test -s $builddepsfile; then
+ . $builddepsfile
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
+$as_echo "found at least one!" >&6; }
+ else
+ as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
+ fi
+ fi
+ # Create build and target names that use _ instead of "-" and ".".
+ # This is necessary to use them in variable names.
+ build_var=`echo ${OPENJDK_BUILD_SYSTEM} | tr '-' '_' | tr '.' '_'`
+ target_var=`echo ${OPENJDK_TARGET_SYSTEM} | 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_SYSTEM}
+ 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_SYSTEM}
+ echo Target stays the same $rewritten_target
+ else
+ echo Rewriting target for builddeps into $rewritten_target
+ fi
+ rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
+ rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
+ fi
+ for ac_prog in 7z unzip
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$BDEPS_UNZIP"; then
+ ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_BDEPS_UNZIP="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
+if test -n "$BDEPS_UNZIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
+$as_echo "$BDEPS_UNZIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$BDEPS_UNZIP" && break
+done
+
+ if test "x$BDEPS_UNZIP" = x7z; then
+ BDEPS_UNZIP="7z x"
+ fi
+
+ for ac_prog in wget lftp ftp
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$BDEPS_FTP"; then
+ ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_BDEPS_FTP="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
+if test -n "$BDEPS_FTP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
+$as_echo "$BDEPS_FTP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$BDEPS_FTP" && break
+done
+
+
+
+# Check if pkg-config is available.
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+
+###############################################################################
+#
+# Determine OpenJDK build and target platforms.
+#
+###############################################################################
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if test "${ac_cv_target+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
+# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
+# product you're building. The target of this build is called "host". Since this is confusing to most people, we
+# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
+# to use the configure naming style.
+
+
+
+
+
+# Check whether --with-target-bits was given.
+if test "${with_target_bits+set}" = set; then :
+ withval=$with_target_bits;
+fi
+
+
+if test "x$with_target_bits" != x && \
+ test "x$with_target_bits" != x32 && \
+ test "x$with_target_bits" != x64 ; then
+ as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
+fi
+# Translate the standard cpu-vendor-kernel-os quadruplets into
+# the new TARGET_.... and BUILD_... and the legacy names used by
+# the openjdk build.
+# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits
+
+ # Expects $host_os $host_cpu $build_os and $build_cpu
+ # and $with_target_bits to have been setup!
+ #
+ # Translate the standard triplet(quadruplet) definition
+ # of the target/build system into
+ # OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
+ # OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
+ # OPENJDK_TARGET_OS_API=posix,winapi
+ #
+ # OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
+ # OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
+ # OPENJDK_TARGET_CPU_BITS=32,64
+ # OPENJDK_TARGET_CPU_ENDIAN=big,little
+ #
+ # The same values are setup for BUILD_...
+ #
+ # And the legacy variables, for controlling the old makefiles.
+ # LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
+ # LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
+ # LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris)
+ # LEGACY_OPENJDK_TARGET_OS_API=solaris,windows
+ #
+ # We also copy the autoconf trip/quadruplet
+ # verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM
+ OPENJDK_TARGET_SYSTEM="$host"
+ OPENJDK_BUILD_SYSTEM="$build"
+
+
+
+
+
+ case "$host_os" in
+ *linux*)
+ VAR_OS=linux
+ VAR_OS_API=posix
+ VAR_OS_FAMILY=gnu
+ ;;
+ *solaris*)
+ VAR_OS=solaris
+ VAR_OS_API=posix
+ VAR_OS_FAMILY=sysv
+ ;;
+ *darwin*)
+ VAR_OS=macosx
+ VAR_OS_API=posix
+ VAR_OS_FAMILY=bsd
+ ;;
+ *bsd*)
+ VAR_OS=bsd
+ VAR_OS_API=posix
+ VAR_OS_FAMILY=bsd
+ ;;
+ *cygwin*|*windows*)
+ VAR_OS=windows
+ VAR_OS_API=winapi
+ VAR_OS_FAMILY=windows
+ ;;
+ *)
+ as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
+ ;;
+ esac
+
+ OPENJDK_TARGET_OS="$VAR_OS"
+ OPENJDK_TARGET_OS_FAMILY="$VAR_OS_FAMILY"
+ OPENJDK_TARGET_OS_API="$VAR_OS_API"
+
+
+
+
+
+ if test "x$OPENJDK_TARGET_OS_API" = xposix; then
+ LEGACY_OPENJDK_TARGET_OS_API="solaris"
+ fi
+ if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
+ LEGACY_OPENJDK_TARGET_OS_API="windows"
+ fi
+
+
+
+
+ # First argument is the cpu name from the trip/quad
+ case "$host_cpu" in
+ x86_64)
+ VAR_CPU=x64
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ VAR_LEGACY_CPU=amd64
+ ;;
+ i?86)
+ VAR_CPU=ia32
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ VAR_LEGACY_CPU=i586
+ ;;
+ alpha*)
+ VAR_CPU=alpha
+ VAR_CPU_ARCH=alpha
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=alpha
+ ;;
+ arm*)
+ VAR_CPU=arm
+ VAR_CPU_ARCH=arm
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ VAR_LEGACY_CPU=arm
+ ;;
+ mips)
+ VAR_CPU=mips
+ VAR_CPU_ARCH=mips
+ VAR_CPU_BITS=woot
+ VAR_CPU_ENDIAN=woot
+ VAR_LEGACY_CPU=mips
+ ;;
+ mipsel)
+ VAR_CPU=mipsel
+ VAR_CPU_ARCH=mips
+ VAR_CPU_BITS=woot
+ VAR_CPU_ENDIAN=woot
+ VAR_LEGACY_CPU=mipsel
+ ;;
+ powerpc)
+ VAR_CPU=ppc
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=ppc
+ ;;
+ powerpc64)
+ VAR_CPU=ppc64
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=ppc64
+ ;;
+ sparc)
+ VAR_CPU=sparc
+ VAR_CPU_ARCH=sparc
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=sparc
+ ;;
+ sparc64)
+ VAR_CPU=sparcv9
+ VAR_CPU_ARCH=sparc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=sparcv9
+ ;;
+ s390)
+ VAR_CPU=s390
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=woot
+ VAR_LEGACY_CPU=s390
+ VAR_LEGACY_CPU=s390
+ ;;
+ s390x)
+ VAR_CPU=s390x
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=woot
+ VAR_LEGACY_CPU=s390x
+ ;;
+ *)
+ as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
+ ;;
+ esac
+
+ # Workaround cygwin not knowing about 64 bit.
+ if test "x$VAR_OS" = "xwindows"; then
+ if test "x$PROCESSOR_IDENTIFIER" != "x"; then
+ PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
+ case "$PROC_ARCH" in
+ intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
+ VAR_CPU=x64
+ VAR_CPU_BITS=64
+ VAR_LEGACY_CPU=amd64
+ ;;
+ esac
+ fi
+ fi
+
+ # on solaris x86...default seems to be 32-bit
+ if test "x$VAR_OS" = "xsolaris" && \
+ test "x$with_target_bits" = "x" && \
+ test "x$VAR_CPU_ARCH" = "xx86"
+ then
+ with_target_bits=32
+ fi
+
+ if test "x$VAR_CPU_ARCH" = "xx86"; then
+ if test "x$with_target_bits" = "x64"; then
+ VAR_CPU=x64
+ VAR_CPU_BITS=64
+ VAR_LEGACY_CPU=amd64
+ fi
+ if test "x$with_target_bits" = "x32"; then
+ VAR_CPU=ia32
+ VAR_CPU_BITS=32
+ VAR_LEGACY_CPU=i586
+ fi
+ fi
+
+ if test "x$VAR_CPU_ARCH" = "xsparc"; then
+ if test "x$with_target_bits" = "x64"; then
+ VAR_CPU=sparcv9
+ VAR_CPU_BITS=64
+ VAR_LEGACY_CPU=sparcv9
+ fi
+ fi
+
+ OPENJDK_TARGET_CPU="$VAR_CPU"
+ OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
+ OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
+ OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+
+
+
+
+
+
+ # Also store the legacy naming of the cpu.
+ # Ie i586 and amd64 instead of ia32 and x64
+ LEGACY_OPENJDK_TARGET_CPU1="$VAR_LEGACY_CPU"
+
+
+ # And the second legacy naming of the cpu.
+ # Ie i386 and amd64 instead of ia32 and x64.
+ LEGACY_OPENJDK_TARGET_CPU2="$LEGACY_OPENJDK_TARGET_CPU1"
+ if test "x$LEGACY_OPENJDK_TARGET_CPU1" = xi586; then
+ LEGACY_OPENJDK_TARGET_CPU2=i386
+ fi
+
+
+ # And the third legacy naming of the cpu.
+ # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
+ LEGACY_OPENJDK_TARGET_CPU3=""
+ if test "x$OPENJDK_TARGET_CPU" = xx64; then
+ LEGACY_OPENJDK_TARGET_CPU3=amd64
+ fi
+ if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
+ LEGACY_OPENJDK_TARGET_CPU3=sparcv9
+ fi
+
+
+
+
+
+ case "$build_os" in
+ *linux*)
+ VAR_OS=linux
+ VAR_OS_API=posix
+ VAR_OS_FAMILY=gnu
+ ;;
+ *solaris*)
+ VAR_OS=solaris
+ VAR_OS_API=posix
+ VAR_OS_FAMILY=sysv
+ ;;
+ *darwin*)
+ VAR_OS=macosx
+ VAR_OS_API=posix
+ VAR_OS_FAMILY=bsd
+ ;;
+ *bsd*)
+ VAR_OS=bsd
+ VAR_OS_API=posix
+ VAR_OS_FAMILY=bsd
+ ;;
+ *cygwin*|*windows*)
+ VAR_OS=windows
+ VAR_OS_API=winapi
+ VAR_OS_FAMILY=windows
+ ;;
+ *)
+ as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
+ ;;
+ esac
+
+ OPENJDK_BUILD_OS="$VAR_OS"
+ OPENJDK_BUILD_OS_FAMILY="$VAR_OS_FAMILY"
+ OPENJDK_BUILD_OS_API="$VAR_OS_API"
+
+
+
+
+
+ if test "x$OPENJDK_BUILD_OS_API" = xposix; then
+ LEGACY_OPENJDK_BUILD_OS_API="solaris"
+ fi
+ if test "x$OPENJDK_BUILD_OS_API" = xwinapi; then
+ LEGACY_OPENJDK_BUILD_OS_API="windows"
+ fi
+
+
+
+
+ # First argument is the cpu name from the trip/quad
+ case "$build_cpu" in
+ x86_64)
+ VAR_CPU=x64
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ VAR_LEGACY_CPU=amd64
+ ;;
+ i?86)
+ VAR_CPU=ia32
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ VAR_LEGACY_CPU=i586
+ ;;
+ alpha*)
+ VAR_CPU=alpha
+ VAR_CPU_ARCH=alpha
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=alpha
+ ;;
+ arm*)
+ VAR_CPU=arm
+ VAR_CPU_ARCH=arm
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ VAR_LEGACY_CPU=arm
+ ;;
+ mips)
+ VAR_CPU=mips
+ VAR_CPU_ARCH=mips
+ VAR_CPU_BITS=woot
+ VAR_CPU_ENDIAN=woot
+ VAR_LEGACY_CPU=mips
+ ;;
+ mipsel)
+ VAR_CPU=mipsel
+ VAR_CPU_ARCH=mips
+ VAR_CPU_BITS=woot
+ VAR_CPU_ENDIAN=woot
+ VAR_LEGACY_CPU=mipsel
+ ;;
+ powerpc)
+ VAR_CPU=ppc
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=ppc
+ ;;
+ powerpc64)
+ VAR_CPU=ppc64
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=ppc64
+ ;;
+ sparc)
+ VAR_CPU=sparc
+ VAR_CPU_ARCH=sparc
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=sparc
+ ;;
+ sparc64)
+ VAR_CPU=sparcv9
+ VAR_CPU_ARCH=sparc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ VAR_LEGACY_CPU=sparcv9
+ ;;
+ s390)
+ VAR_CPU=s390
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=woot
+ VAR_LEGACY_CPU=s390
+ VAR_LEGACY_CPU=s390
+ ;;
+ s390x)
+ VAR_CPU=s390x
+ VAR_CPU_ARCH=s390
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=woot
+ VAR_LEGACY_CPU=s390x
+ ;;
+ *)
+ as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
+ ;;
+ esac
+
+ # Workaround cygwin not knowing about 64 bit.
+ if test "x$VAR_OS" = "xwindows"; then
+ if test "x$PROCESSOR_IDENTIFIER" != "x"; then
+ PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
+ case "$PROC_ARCH" in
+ intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
+ VAR_CPU=x64
+ VAR_CPU_BITS=64
+ VAR_LEGACY_CPU=amd64
+ ;;
+ esac
+ fi
+ fi
+
+ # on solaris x86...default seems to be 32-bit
+ if test "x$VAR_OS" = "xsolaris" && \
+ test "x$with_target_bits" = "x" && \
+ test "x$VAR_CPU_ARCH" = "xx86"
+ then
+ with_target_bits=32
+ fi
+
+ if test "x$VAR_CPU_ARCH" = "xx86"; then
+ if test "x$with_target_bits" = "x64"; then
+ VAR_CPU=x64
+ VAR_CPU_BITS=64
+ VAR_LEGACY_CPU=amd64
+ fi
+ if test "x$with_target_bits" = "x32"; then
+ VAR_CPU=ia32
+ VAR_CPU_BITS=32
+ VAR_LEGACY_CPU=i586
+ fi
+ fi
+
+ if test "x$VAR_CPU_ARCH" = "xsparc"; then
+ if test "x$with_target_bits" = "x64"; then
+ VAR_CPU=sparcv9
+ VAR_CPU_BITS=64
+ VAR_LEGACY_CPU=sparcv9
+ fi
+ fi
+
+ OPENJDK_BUILD_CPU="$VAR_CPU"
+ OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
+ OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
+ OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
+
+
+
+
+
+
+ # Also store the legacy naming of the cpu.
+ # Ie i586 and amd64 instead of ia32 and x64
+ LEGACY_OPENJDK_BUILD_CPU1="$VAR_LEGACY_CPU"
+
+
+ # And the second legacy naming of the cpu.
+ # Ie i386 and amd64 instead of ia32 and x64.
+ LEGACY_OPENJDK_BUILD_CPU2="$LEGACY_OPENJDK_BUILD_CPU1"
+ if test "x$LEGACY_OPENJDK_BUILD_CPU1" = xi586; then
+ LEGACY_OPENJDK_BUILD_CPU2=i386
+ fi
+
+
+ # And the third legacy naming of the cpu.
+ # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
+ LEGACY_OPENJDK_BUILD_CPU3=""
+ if test "x$OPENJDK_BUILD_CPU" = xx64; then
+ LEGACY_OPENJDK_BUILD_CPU3=amd64
+ fi
+ if test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
+ LEGACY_OPENJDK_BUILD_CPU3=sparcv9
+ fi
+
+
+
+ if test "x$OPENJDK_TARGET_OS" != xsolaris; then
+ LEGACY_OPENJDK_TARGET_CPU3=""
+ LEGACY_OPENJDK_BUILD_CPU3=""
+ fi
+
+ # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ...
+ if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then
+ LEGACY_OPENJDK_TARGET_CPU1="x86_64"
+ fi
+
+
+ if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+ REQUIRED_OS_NAME=SunOS
+ REQUIRED_OS_VERSION=5.10
+ fi
+ if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
+ REQUIRED_OS_NAME=Linux
+ REQUIRED_OS_VERSION=2.6
+ fi
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ REQUIRED_OS_NAME=Windows
+ REQUIRED_OS_VERSION=5.1
+ fi
+ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+ REQUIRED_OS_NAME=Darwin
+ REQUIRED_OS_VERSION=11.2
+ fi
+
+
+
+
+
+
+# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR.
+if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then
+ LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}"
+fi
+
+# Now the following vars are defined.
+# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
+# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
+# OPENJDK_TARGET_OS_API=posix,winapi
+#
+# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
+# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
+# OPENJDK_TARGET_CPU_BITS=32,64
+# OPENJDK_TARGET_CPU_ENDIAN=big,little
+#
+# There is also a:
+# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,.... # used to set the old var ARCH
+# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH
+# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
+# There was also a BUILDARCH that had i486,amd64,... but we do not use that
+# in the new build.
+# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots
+
+
+###############################################################################
+
+# Note that this is the build platform OS version!
+
+OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
+OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
+OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
+OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
+
+
+
+
+
+# With knowledge of the build platform, setup more basic things.
+
+# For cygwin we need cygpath first, since it is used everywhere.
+# Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CYGPATH+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CYGPATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CYGPATH=$ac_cv_path_CYGPATH
+if test -n "$CYGPATH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
+$as_echo "$CYGPATH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+PATH_SEP=":"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$CYGPATH" = x; then
+ as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
+ fi
+ PATH_SEP=";"
+fi
+
+
+
+if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
+ # Add extra search paths on solaris for utilities like ar and as etc...
+ PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
+fi
+
+
+###############################################################################
+#
+# Determine OpenJDK variants, options and version numbers.
+#
+###############################################################################
+
+# We need build & target for this.
+
+###############################################################################
+#
+# Check which variant of the JDK that we want to build.
+# Currently we have:
+# normal: standard edition
+# embedded: cut down to a smaller footprint
+#
+# Effectively the JDK variant gives a name to a specific set of
+# modules to compile into the JDK. In the future, these modules
+# might even be Jigsaw modules.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
+$as_echo_n "checking which variant of the JDK to build... " >&6; }
+
+# Check whether --with-jdk-variant was given.
+if test "${with_jdk_variant+set}" = set; then :
+ withval=$with_jdk_variant;
+fi
+
+
+if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
+ JAVASE_EMBEDDED=""
+ MINIMIZE_RAM_USAGE=""
+ JDK_VARIANT="normal"
+elif test "x$with_jdk_variant" = xembedded; then
+ JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
+ MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
+ JDK_VARIANT="embedded"
+else
+ as_fn_error $? "The available JDK variants are: normal, embedded" "$LINENO" 5
+fi
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
+$as_echo "$JDK_VARIANT" >&6; }
+
+
+
+###############################################################################
+#
+# Check which variants of the JVM that we want to build.
+# Currently we have:
+# server: normal interpreter and a tiered C1/C2 compiler
+# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
+# kernel: kernel footprint JVM that passes the TCK without major performance problems,
+# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
+# zero: no machine code interpreter, no compiler
+# zeroshark: zero interpreter and shark/llvm compiler backend
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM that should be built" >&5
+$as_echo_n "checking which variants of the JVM that should be built... " >&6; }
+
+# Check whether --with-jvm-variants was given.
+if test "${with_jvm_variants+set}" = set; then :
+ withval=$with_jvm_variants;
+fi
+
+
+if test "x$with_jvm_variants" = x; then
+ if test "x$JDK_VARIANT" = xembedded; then
+ with_jvm_variants="client"
+ else
+ with_jvm_variants="server"
+ fi
+fi
+
+JVM_VARIANTS=",$with_jvm_variants,"
+TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
+
+if test "x$TEST_VARIANTS" != "x,"; then
+ as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
+$as_echo "$with_jvm_variants" >&6; }
+
+JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
+JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
+JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
+JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
+JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+
+if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
+ fi
+fi
+if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
+ fi
+fi
+
+# Replace the commas with AND for use in the build directory name.
+ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
+COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
+if test "x$COUNT_VARIANTS" != "x,1"; then
+ BUILDING_MULTIPLE_JVM_VARIANTS=yes
+else
+ BUILDING_MULTIPLE_JVM_VARIANTS=no
+fi
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Set the debug level
+# release: no debug information, all optimizations, no asserts.
+# fastdebug: debug information (-g), all optimizations, all asserts
+# slowdebug: debug information (-g), no optimizations, all asserts
+#
+DEBUG_LEVEL="release"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
+$as_echo_n "checking which debug level to use... " >&6; }
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug;
+ ENABLE_DEBUG="${enableval}"
+ DEBUG_LEVEL="fastdebug"
+
+else
+ ENABLE_DEBUG="no"
+fi
+
+
+
+# Check whether --with-debug-level was given.
+if test "${with_debug_level+set}" = set; then :
+ withval=$with_debug_level;
+ DEBUG_LEVEL="${withval}"
+ if test "x$ENABLE_DEBUG" = xyes; then
+ as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
+ fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
+$as_echo "$DEBUG_LEVEL" >&6; }
+
+if test "x$DEBUG_LEVEL" != xrelease && \
+ test "x$DEBUG_LEVEL" != xfastdebug && \
+ test "x$DEBUG_LEVEL" != xslowdebug; then
+ as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
+fi
+
+
+###############################################################################
+#
+# Setup legacy vars/targets and new vars to deal with different debug levels.
+#
+
+case $DEBUG_LEVEL in
+ release )
+ VARIANT="OPT"
+ FASTDEBUG="false"
+ DEBUG_CLASSFILES="false"
+ BUILD_VARIANT_RELEASE=""
+ HOTSPOT_DEBUG_LEVEL="product"
+ HOTSPOT_EXPORT="product"
+ ;;
+ fastdebug )
+ VARIANT="DBG"
+ FASTDEBUG="true"
+ DEBUG_CLASSFILES="true"
+ BUILD_VARIANT_RELEASE="-fastdebug"
+ HOTSPOT_DEBUG_LEVEL="fastdebug"
+ HOTSPOT_EXPORT="fastdebug"
+ ;;
+ slowdebug )
+ VARIANT="DBG"
+ FASTDEBUG="false"
+ DEBUG_CLASSFILES="true"
+ BUILD_VARIANT_RELEASE="-debug"
+ HOTSPOT_DEBUG_LEVEL="jvmg"
+ HOTSPOT_EXPORT="debug"
+ ;;
+esac
+
+#####
+# Generate the legacy makefile targets for hotspot.
+# The hotspot api for selecting the build artifacts, really, needs to be improved.
+#
+HOTSPOT_TARGET=""
+
+if test "x$JVM_VARIANT_SERVER" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
+fi
+
+if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
+fi
+
+if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
+fi
+
+if test "x$JVM_VARIANT_ZERO" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
+fi
+
+if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
+fi
+
+HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
+
+#####
+
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Should we build only OpenJDK even if closed sources are present?
+#
+# Check whether --enable-openjdk-only was given.
+if test "${enable_openjdk_only+set}" = set; then :
+ enableval=$enable_openjdk_only;
+fi
+
+
+if test "x$enable_openjdk_only" = "xyes"; then
+ OPENJDK=true
+elif test "x$enable_openjdk_only" = "xno"; then
+ OPENJDK=false
+elif test -d "$SRC_ROOT/jdk/src/closed"; then
+ OPENJDK=false
+else
+ OPENJDK=true
+fi
+
+if test "x$OPENJDK" = "xtrue"; then
+ SET_OPENJDK=OPENJDK=true
+fi
+
+
+
+###############################################################################
+#
+# JIGSAW or not. The JIGSAW variable is used during the intermediate
+# stage when we are building both the old style JDK and the new style modularized JDK.
+# When the modularized JDK is finalized, this option will go away.
+#
+# Check whether --enable-jigsaw was given.
+if test "${enable_jigsaw+set}" = set; then :
+ enableval=$enable_jigsaw;
+fi
+
+
+if test "x$enable_jigsaw" = "xyes"; then
+ JIGSAW=true
+else
+ JIGSAW=false
+fi
+
+
+###############################################################################
+#
+# Should we build a JDK/JVM with headful support (ie a graphical ui)?
+# We always build headless support.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
+$as_echo_n "checking headful support... " >&6; }
+# Check whether --enable-headful was given.
+if test "${enable_headful+set}" = set; then :
+ enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
+else
+ SUPPORT_HEADFUL=yes
+fi
+
+
+SUPPORT_HEADLESS=yes
+BUILD_HEADLESS="BUILD_HEADLESS:=true"
+
+if test "x$SUPPORT_HEADFUL" = xyes; then
+ # We are building both headful and headless.
+ BUILD_HEADLESS_ONLY=""
+ headful_msg="inlude support for both headful and headless"
+fi
+
+if test "x$SUPPORT_HEADFUL" = xno; then
+ # Thus we are building headless only.
+ BUILD_HEADLESS="BUILD_HEADLESS:=true"
+ BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
+ headful_msg="headless only"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
+$as_echo "$headful_msg" >&6; }
+
+
+
+
+
+
+###############################################################################
+#
+# Should we run the painfully slow javadoc tool?
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
+$as_echo_n "checking whether to build documentation... " >&6; }
+# Check whether --enable-docs was given.
+if test "${enable_docs+set}" = set; then :
+ enableval=$enable_docs; ENABLE_DOCS="${enableval}"
+else
+ ENABLE_DOCS='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DOCS" >&5
+$as_echo "$ENABLE_DOCS" >&6; }
+
+GENERATE_DOCS=false
+if test "x$ENABLE_DOCS" = xyes; then
+ GENERATE_DOCS=true
+fi
+
+
+###############################################################################
+#
+# Should we compile nimbus swing L&F? We can probably remove this option
+# since nimbus is officially part of javax now.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build nimbus L&F" >&5
+$as_echo_n "checking whether to build nimbus L&F... " >&6; }
+# Check whether --enable-nimbus was given.
+if test "${enable_nimbus+set}" = set; then :
+ enableval=$enable_nimbus; ENABLE_NIMBUS="${enableval}"
+else
+ ENABLE_NIMBUS='yes'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_NIMBUS" >&5
+$as_echo "$ENABLE_NIMBUS" >&6; }
+DISABLE_NIMBUS=
+if test "x$ENABLE_NIMBUS" = xno; then
+ DISABLE_NIMBUS=true
+fi
+
+
+# Control wether Hotspot runs Queens test after build.
+# Check whether --enable-hotspot-test-in-build was given.
+if test "${enable_hotspot_test_in_build+set}" = set; then :
+ enableval=$enable_hotspot_test_in_build;
+else
+ enable_hotspot_test_in_build=no
+fi
+
+if test "x$enable_hotspot_test_in_build" = "xyes"; then
+ TEST_IN_BUILD=true
+else
+ TEST_IN_BUILD=false
+fi
+
+
+###############################################################################
+#
+# Choose cacerts source file
+#
+
+# Check whether --with-cacerts-file was given.
+if test "${with_cacerts_file+set}" = set; then :
+ withval=$with_cacerts_file;
+fi
+
+if test "x$with_cacerts_file" != x; then
+ CACERTS_FILE=$with_cacerts_file
+else
+ if test "x$OPENJDK" = "xtrue"; then
+ CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
+ else
+ CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
+ fi
+fi
+
+
+###############################################################################
+#
+# Compress jars
+#
+COMPRESS_JARS=false
+
+# default for embedded is yes...
+if test "x$JDK_VARIANT" = "xembedded"; then
+ COMPRESS_JARS=true
+fi
+
+
+###############################################################################
+#
+# Should we compile JFR
+# default no, except for on closed-jdk and !embedded
+#
+ENABLE_JFR=no
+
+# Is the JFR source present
+
+#
+# For closed && !embedded default is yes if the source is present
+#
+if test "x${OPENJDK}" != "xtrue" && test "x$JDK_VARIANT" != "xembedded" && test -d "$SRC_ROOT/jdk/src/closed/share/native/oracle/jfr"; then
+ ENABLE_JFR=yes
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build jfr" >&5
+$as_echo_n "checking whether to build jfr... " >&6; }
+# Check whether --enable-jfr was given.
+if test "${enable_jfr+set}" = set; then :
+ enableval=$enable_jfr;
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ENABLE_JFR}" >&5
+$as_echo "${ENABLE_JFR}" >&6; }
+
+if test "x$ENABLE_JFR" = "xyes"; then
+ ENABLE_JFR=true
+elif test "x$ENABLE_JFR" = "xno"; then
+ ENABLE_JFR=false
+else
+ as_fn_error $? "Invalid argument to --enable-jfr" "$LINENO" 5
+fi
+
+
+
+
+# Source the version numbers
+. $AUTOCONF_DIR/version.numbers
+if test "x$OPENJDK" = "xfalse"; then
+ . $AUTOCONF_DIR/closed.version.numbers
+fi
+# Now set the JDK version, milestone, build number etc.
+
+
+
+
+
+
+
+
+
+
+
+
+COPYRIGHT_YEAR=`date +'%Y'`
+
+
+RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
+
+
+if test "x$JDK_UPDATE_VERSION" != x; then
+ JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+else
+ JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+fi
+
+
+if test "x$MILESTONE" != x; then
+ RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
+else
+ RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
+fi
+
+
+if test "x$JDK_BUILD_NUMBER" != x; then
+ FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
+else
+ JDK_BUILD_NUMBER=b00
+ BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
+ # Avoid [:alnum:] since it depends on the locale.
+ CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
+ USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
+ FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
+fi
+
+COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+
+
+
+# To properly create a configuration name, we need to have the OpenJDK target
+# and options (variants and debug level) parsed.
+
+
+
+# Check whether --with-conf-name was given.
+if test "${with_conf_name+set}" = set; then :
+ withval=$with_conf_name; CONF_NAME=${with_conf_name}
+fi
+
+
+# Test from where we are running configure, in or outside of src root.
+if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
+ # We are running configure from the src root.
+ # Create a default ./build/target-variant-debuglevel output root.
+ if test "x${CONF_NAME}" = x; then
+ CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
+ fi
+ OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
+ mkdir -p "$OUTPUT_ROOT"
+ if test ! -d "$OUTPUT_ROOT"; then
+ as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
+ fi
+else
+ # We are running configure from outside of the src dir.
+ # Then use the current directory as output dir!
+ # If configuration is situated in normal build directory, just use the build
+ # directory name as configuration name, otherwise use the complete path.
+ if test "x${CONF_NAME}" = x; then
+ CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
+ fi
+ OUTPUT_ROOT="$CURDIR"
+fi
+
+
+ # Fail with message the path to the output root if var OUTPUT_ROOT contains a path with no spaces in it.
+ # Unless on Windows, where we can rewrite the path.
+ HAS_SPACE=`echo "$OUTPUT_ROOT" | grep " "`
+ if test "x$HAS_SPACE" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ OUTPUT_ROOT=`$CYGPATH -s -m -a "$OUTPUT_ROOT"`
+ OUTPUT_ROOT=`$CYGPATH -u "$OUTPUT_ROOT"`
+ else
+ as_fn_error $? "You cannot have spaces in the path to the output root! \"$OUTPUT_ROOT\"" "$LINENO" 5
+ fi
+ fi
+
+
+SPEC=$OUTPUT_ROOT/spec.gmk
+
+CONF_NAME=$CONF_NAME
+
+OUTPUT_ROOT=$OUTPUT_ROOT
+
+
+# Most of the probed defines are put into config.h
+ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
+
+# The spec.gmk file contains all variables for the make system.
+ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
+
+# The spec.sh file contains variables for compare{images|-objects}.sh scrips.
+ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
+
+# The generated Makefile knows where the spec.gmk is and where the source is.
+# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
+# which will look for generated configurations
+ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
+
+
+# Save the arguments given to us
+echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
+
+
+###############################################################################
+#
+# Setup BootJDK, used to bootstrap the build.
+#
+###############################################################################
+
+
+BOOT_JDK_FOUND=no
+
+# Check whether --with-boot-jdk was given.
+if test "${with_boot_jdk+set}" = set; then :
+ withval=$with_boot_jdk;
+fi
+
+
+if test "x$with_boot_jdk" != x; then
+ BOOT_JDK=$with_boot_jdk
+ BOOT_JDK_FOUND=yes
+fi
+if test "x$BOOT_JDK_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_boot-jdk_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_boot-jdk_TARGET_${rewritten_target_var}}
+ fi
+ if test "x$resource" = x; then
+ # Ok, lets instead look for a build specific resource
+ eval resource=\${builddep_boot-jdk_BUILD_${rewritten_build_var}}
+ fi
+ if test "x$resource" = x; then
+ # Ok, lets instead look for a generic resource
+ # (The boot-jdk comes from M4 and not the shell, thus no need for eval here.)
+ resource=${builddep_boot-jdk}
+ fi
+ if test "x$resource" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for boot-jdk" >&5
+$as_echo "$as_me: Using builddeps $resource for boot-jdk" >&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
+
+# boot-jdk 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 boot-jdk from $with_builddeps_server/$resource and installing into $installdir" >&5
+$as_echo "$as_me: Downloading build dependency boot-jdk 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/boot-jdk.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_boot-jdk_ROOT}
+ thecflags=${builddep_boot-jdk_CFLAGS}
+ thelibs=${builddep_boot-jdk_LIBS}
+ if test "x$depdir" = x; then
+ as_fn_error $? "Could not download build dependency boot-jdk" "$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=yes
+ else BOOT_JDK_FOUND=no
+
+ fi
+ else BOOT_JDK_FOUND=no
+
+ fi
+
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+ if test "x$JAVA_HOME" != x; then
+ if test ! -d "$JAVA_HOME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
+$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+ fi
+ # Aha, the user has set a JAVA_HOME
+ # let us use that as the Boot JDK.
+ BOOT_JDK="$JAVA_HOME"
+ BOOT_JDK_FOUND=yes
+ # To be on the safe side, lets check that it is a JDK.
+ if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
+ JAVAC="$BOOT_JDK/bin/javac"
+ JAVA="$BOOT_JDK/bin/java"
+ BOOT_JDK_FOUND=yes
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=$JAVA_HOME" >&5
+$as_echo "$as_me: Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=$JAVA_HOME" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+ fi
+ fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+ # Extract the first word of "javac", so it can be a program name with args.
+set dummy javac; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $JAVAC_CHECK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_JAVAC_CHECK="$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
+JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
+if test -n "$JAVAC_CHECK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
+$as_echo "$JAVAC_CHECK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ # Extract the first word of "java", so it can be a program name with args.
+set dummy java; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $JAVA_CHECK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_JAVA_CHECK="$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
+JAVA_CHECK=$ac_cv_path_JAVA_CHECK
+if test -n "$JAVA_CHECK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
+$as_echo "$JAVA_CHECK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ BINARY="$JAVAC_CHECK"
+ if test "x$JAVAC_CHECK" = x; then
+ BINARY="$JAVA_CHECK"
+ fi
+ if test "x$BINARY" != x; then
+ # So there is a java(c) binary, it might be part of a JDK.
+ # Lets find the JDK/JRE directory by following symbolic links.
+ # Linux/GNU systems often have links from /usr/bin/java to
+ # /etc/alternatives/java to the real JDK binary.
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$BINARY"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$BINARY"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ BINARY="$tmp"
+
+
+ if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ # Follow a chain of symbolic links. Use readlink
+ # where it exists, else fall back to horribly
+ # complicated shell code.
+ # Extract the first word of "readlink", so it can be a program name with args.
+set dummy readlink; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_READLINK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $READLINK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+READLINK=$ac_cv_path_READLINK
+if test -n "$READLINK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
+$as_echo "$READLINK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$READLINK_TESTED" != yes; then
+ # On MacOSX there is a readlink tool with a different
+ # purpose than the GNU readlink tool. Check the found readlink.
+ ISGNU=`$READLINK --help 2>&1 | grep GNU`
+ if test "x$ISGNU" = x; then
+ # A readlink that we do not know how to use.
+ # Are there other non-GNU readlinks out there?
+ READLINK_TESTED=yes
+ READLINK=
+ fi
+ fi
+
+ if test "x$READLINK" != x; then
+ BINARY=`$READLINK -f $BINARY`
+ else
+ STARTDIR=$PWD
+ COUNTER=0
+ DIR=`dirname $BINARY`
+ FIL=`basename $BINARY`
+ while test $COUNTER -lt 20; do
+ ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
+ if test "x$ISLINK" == x; then
+ # This is not a symbolic link! We are done!
+ break
+ fi
+ # The link might be relative! We have to use cd to travel safely.
+ cd $DIR
+ cd `dirname $ISLINK`
+ DIR=`pwd`
+ FIL=`basename $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ BINARY=$DIR/$FIL
+ fi
+ fi
+
+ BOOT_JDK=`dirname $BINARY`
+ BOOT_JDK=`cd $BOOT_JDK/..; pwd`
+ if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
+ JAVAC=$BOOT_JDK/bin/javac
+ JAVA=$BOOT_JDK/bin/java
+ BOOT_JDK_FOUND=yes
+ fi
+ fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+ # Try the MacOSX way.
+ if test -x /usr/libexec/java_home; then
+ BOOT_JDK=`/usr/libexec/java_home`
+ if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
+ JAVAC=$BOOT_JDK/bin/javac
+ JAVA=$BOOT_JDK/bin/java
+ BOOT_JDK_FOUND=yes
+ fi
+ fi
+fi
+
+if test "x$BOOT_JDK_FOUND" = xno; then
+ # Extract the first word of "java", so it can be a program name with args.
+set dummy java; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $JAVA_CHECK in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_JAVA_CHECK="$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
+JAVA_CHECK=$ac_cv_path_JAVA_CHECK
+if test -n "$JAVA_CHECK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
+$as_echo "$JAVA_CHECK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$JAVA_CHECK" != x; then
+ # There is a java in the path. But apparently we have not found a javac
+ # in the path, since that would have been tested earlier.
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ # Now if this is a windows platform. The default installation of a JDK
+ # actually puts the JRE in the path and keeps the JDK out of the path!
+ # Go look in the default installation location.
+ BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
+ if test -d "$BOOT_JDK"; then
+ BOOT_JDK_FOUND=yes
+ fi
+ fi
+ 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: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=openjdk
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG" >&5
+$as_echo "$as_me: Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+ fi
+ else
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=openjdk
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a JDK. $HELP_MSG" >&5
+$as_echo "$as_me: Could not find a JDK. $HELP_MSG" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+ fi
+fi
+
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ # Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CYGPATH+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CYGPATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CYGPATH=$ac_cv_path_CYGPATH
+if test -n "$CYGPATH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
+$as_echo "$CYGPATH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ tmp="$BOOT_JDK"
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ BOOT_JDK="$tmp"
+ fi
+
+
+# Now see if we can find the rt.jar, or its nearest equivalent.
+BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
+
+ # Fail with message the path to the Boot JDK rt.jar (or nearest equivalent) if var BOOT_RTJAR contains a path with no spaces in it.
+ # Unless on Windows, where we can rewrite the path.
+ HAS_SPACE=`echo "$BOOT_RTJAR" | grep " "`
+ if test "x$HAS_SPACE" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ BOOT_RTJAR=`$CYGPATH -s -m -a "$BOOT_RTJAR"`
+ BOOT_RTJAR=`$CYGPATH -u "$BOOT_RTJAR"`
+ else
+ as_fn_error $? "You cannot have spaces in the path to the Boot JDK rt.jar (or nearest equivalent)! \"$BOOT_RTJAR\"" "$LINENO" 5
+ fi
+ fi
+
+
+BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
+
+ # Fail with message the path to the Boot JDK tools.jar (or nearest equivalent) if var BOOT_TOOLSJAR contains a path with no spaces in it.
+ # Unless on Windows, where we can rewrite the path.
+ HAS_SPACE=`echo "$BOOT_TOOLSJAR" | grep " "`
+ if test "x$HAS_SPACE" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ BOOT_TOOLSJAR=`$CYGPATH -s -m -a "$BOOT_TOOLSJAR"`
+ BOOT_TOOLSJAR=`$CYGPATH -u "$BOOT_TOOLSJAR"`
+ else
+ as_fn_error $? "You cannot have spaces in the path to the Boot JDK tools.jar (or nearest equivalent)! \"$BOOT_TOOLSJAR\"" "$LINENO" 5
+ fi
+ fi
+
+
+if test ! -f $BOOT_RTJAR; then
+ # On MacOSX it is called classes.jar
+ BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar
+ if test ! -f $BOOT_RTJAR; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot find the rt.jar or its equivalent!" >&5
+$as_echo "$as_me: Cannot find the rt.jar or its equivalent!" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This typically means that configure failed to automatically find a suitable Boot JDK" >&5
+$as_echo "$as_me: This typically means that configure failed to automatically find a suitable Boot JDK" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+ fi
+ # Remove the ..
+ BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
+ # The tools.jar is part of classes.jar
+ BOOT_TOOLSJAR="$BOOT_RTJAR"
+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 for Boot rt.jar" >&5
+$as_echo_n "checking for Boot rt.jar... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_RTJAR" >&5
+$as_echo "$BOOT_RTJAR" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot tools.jar" >&5
+$as_echo_n "checking for Boot tools.jar... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_TOOLSJAR" >&5
+$as_echo "$BOOT_TOOLSJAR" >&6; }
+
+# Use the java tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
+$as_echo_n "checking for java in Boot JDK... " >&6; }
+JAVA=$BOOT_JDK/bin/java
+if test ! -x $JAVA; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working java" >&5
+$as_echo "$as_me: Could not find a working java" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes $BOOT_JDK_VERSION" >&5
+$as_echo "yes $BOOT_JDK_VERSION" >&6; }
+
+
+# Extra M4 quote needed to protect [] in grep expression.
+FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
+if test "x$FOUND_VERSION_78" = x; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=openjdk
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Your boot-jdk must be version 7 or 8. $HELP_MSG" >&5
+$as_echo "$as_me: Your boot-jdk must be version 7 or 8. $HELP_MSG" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+
+# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
+BOOT_JDK_SOURCETARGET="-source 7 -target 7"
+
+
+# Use the javac tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
+$as_echo_n "checking for javac in Boot JDK... " >&6; }
+JAVAC=$BOOT_JDK/bin/javac
+if test ! -x $JAVAC; then
+ as_fn_error $? "Could not find a working javac" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+
+# Use the javah tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
+$as_echo_n "checking for javah in Boot JDK... " >&6; }
+JAVAH=$BOOT_JDK/bin/javah
+if test ! -x $JAVAH; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working javah" >&5
+$as_echo "$as_me: Could not find a working javah" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+# Use the jar tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
+$as_echo_n "checking for jar in Boot JDK... " >&6; }
+JAR=$BOOT_JDK/bin/jar
+if test ! -x $JAR; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working jar" >&5
+$as_echo "$as_me: Could not find a working jar" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+# Use the rmic tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
+$as_echo_n "checking for rmic in Boot JDK... " >&6; }
+RMIC=$BOOT_JDK/bin/rmic
+if test ! -x $RMIC; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working rmic" >&5
+$as_echo "$as_me: Could not find a working rmic" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+# Use the native2ascii tool from the Boot JDK.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
+$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
+NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
+if test ! -x $NATIVE2ASCII; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a working native2ascii" >&5
+$as_echo "$as_me: Could not find a working native2ascii" >&6;}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
+$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+
+##############################################################################
+#
+# Specify options for anything that is run with the Boot JDK.
+#
+
+# Check whether --with-boot-jdk-jvmargs was given.
+if test "${with_boot_jdk_jvmargs+set}" = set; then :
+ withval=$with_boot_jdk_jvmargs;
+fi
+
+
+if test "x$with_boot_jdk_jvmargs" = x; then
+ # Not all JVM:s accept the same arguments on the command line.
+ # OpenJDK specific increase in thread stack for JDK build,
+ # well more specifically, when running javac.
+ if test "x$BUILD_NUM_BITS" = x32; then
+ STACK_SIZE=768
+ else
+ # Running Javac on a JVM on a 64-bit machine, the stack takes more space
+ # since 64-bit pointers are pushed on the stach. Apparently, we need
+ # to increase the stack space when javacing the JDK....
+ STACK_SIZE=1536
+ fi
+
+ # Minimum amount of heap memory.
+
+ # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -Xms64M to boot_jdk_jvmargs
+ FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
+ fi
+
+ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+ # Why does macosx need more heap? Its the huge JDK batch.
+
+ # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -Xmx1600M to boot_jdk_jvmargs
+ FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
+ fi
+
+ else
+
+ # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -Xmx1100M to boot_jdk_jvmargs
+ FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
+ fi
+
+ fi
+ # When is adding -client something that speeds up the JVM?
+ # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
+
+ # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
+ FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
+ fi
+
+
+ # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
+ FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
+ fi
+
+
+ # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
+ FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
+ fi
+
+ # Disable special log output when a debug build is used as Boot JDK...
+
+ # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
+ FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
+ fi
+
+fi
+
+BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
+
+
+
+###############################################################################
+#
+# Configure the sources to use. We can add or override individual directories.
+#
+###############################################################################
+
+
+
+# Where are the sources. Any of these can be overridden
+# using --with-override-corba and the likes.
+LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
+CORBA_TOPDIR="$SRC_ROOT/corba"
+JAXP_TOPDIR="$SRC_ROOT/jaxp"
+JAXWS_TOPDIR="$SRC_ROOT/jaxws"
+HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
+JDK_TOPDIR="$SRC_ROOT/jdk"
+
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Pickup additional source for a component from outside of the source root
+# or override source for a component.
+#
+
+# Check whether --with-add-source-root was given.
+if test "${with_add_source_root+set}" = set; then :
+ withval=$with_add_source_root;
+fi
+
+
+
+# Check whether --with-override-source-root was given.
+if test "${with_override_source_root+set}" = set; then :
+ withval=$with_override_source_root;
+fi
+
+
+
+# Check whether --with-adds-and-overrides was given.
+if test "${with_adds_and_overrides+set}" = set; then :
+ withval=$with_adds_and_overrides;
+fi
+
+
+if test "x$with_adds_and_overrides" != x; then
+ with_add_source_root="$with_adds_and_overrides/adds"
+ with_override_source_root="$with_adds_and_overrides/overrides"
+fi
+
+if test "x$with_add_source_root" != x; then
+ if ! test -d $with_add_source_root; then
+ as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
+ fi
+ CURDIR="$PWD"
+ cd "$with_add_source_root"
+ ADD_SRC_ROOT="`pwd`"
+ cd "$CURDIR"
+ # Verify that the addon source root does not have any root makefiles.
+ # If it does, then it is usually an error, prevent this.
+ if test -f $with_add_source_root/langtools/makefiles/Makefile || \
+ test -f $with_add_source_root/langtools/make/Makefile; then
+ as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
+ fi
+ if test -f $with_add_source_root/corba/makefiles/Makefile || \
+ test -f $with_add_source_root/corba/make/Makefile; then
+ as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
+ fi
+ if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
+ test -f $with_add_source_root/jaxp/make/Makefile; then
+ as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
+ fi
+ if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
+ test -f $with_add_source_root/jaxws/make/Makefile; then
+ as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
+ fi
+ if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
+ test -f $with_add_source_root/hotspot/make/Makefile; then
+ as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
+ fi
+ if test -f $with_add_source_root/jdk/makefiles/Makefile || \
+ test -f $with_add_source_root/jdk/make/Makefile; then
+ as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
+ fi
+fi
+
+
+if test "x$with_override_source_root" != x; then
+ if ! test -d $with_override_source_root; then
+ as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
+ fi
+ CURDIR="$PWD"
+ cd "$with_override_source_root"
+ OVERRIDE_SRC_ROOT="`pwd`"
+ cd "$CURDIR"
+ if test -f $with_override_source_root/langtools/makefiles/Makefile || \
+ test -f $with_override_source_root/langtools/make/Makefile; then
+ as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
+ fi
+ if test -f $with_override_source_root/corba/makefiles/Makefile || \
+ test -f $with_override_source_root/corba/make/Makefile; then
+ as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
+ fi
+ if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
+ test -f $with_override_source_root/jaxp/make/Makefile; then
+ as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
+ fi
+ if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
+ test -f $with_override_source_root/jaxws/make/Makefile; then
+ as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
+ fi
+ if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
+ test -f $with_override_source_root/hotspot/make/Makefile; then
+ as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
+ fi
+ if test -f $with_override_source_root/jdk/makefiles/Makefile || \
+ test -f $with_override_source_root/jdk/make/Makefile; then
+ as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
+ fi
+fi
+
+
+###############################################################################
+#
+# Override a repo completely, this is used for example when you have 3 small
+# development sandboxes of the langtools sources and want to avoid having 3 full
+# OpenJDK sources checked out on disk.
+#
+# Assuming that the 3 langtools sandboxes are located here:
+# /home/fredrik/sandbox1/langtools
+# /home/fredrik/sandbox2/langtools
+# /home/fredrik/sandbox3/langtools
+#
+# From the source root you create build subdirs manually:
+# mkdir -p build1 build2 build3
+# in each build directory run:
+# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
+# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
+# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
+#
+
+
+# Check whether --with-override-langtools was given.
+if test "${with_override_langtools+set}" = set; then :
+ withval=$with_override_langtools;
+fi
+
+
+
+# Check whether --with-override-corba was given.
+if test "${with_override_corba+set}" = set; then :
+ withval=$with_override_corba;
+fi
+
+
+
+# Check whether --with-override-jaxp was given.
+if test "${with_override_jaxp+set}" = set; then :
+ withval=$with_override_jaxp;
+fi
+
+
+
+# Check whether --with-override-jaxws was given.
+if test "${with_override_jaxws+set}" = set; then :
+ withval=$with_override_jaxws;
+fi
+
+
+
+# Check whether --with-override-hotspot was given.
+if test "${with_override_hotspot+set}" = set; then :
+ withval=$with_override_hotspot;
+fi
+
+
+
+# Check whether --with-override-jdk was given.
+if test "${with_override_jdk+set}" = set; then :
+ withval=$with_override_jdk;
+fi
+
+
+if test "x$with_override_langtools" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_langtools"
+ LANGTOOLS_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
+ as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
+$as_echo_n "checking if langtools should be overridden... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
+$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
+fi
+if test "x$with_override_corba" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_corba"
+ CORBA_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
+ as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
+$as_echo_n "checking if corba should be overridden... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
+$as_echo "yes with $CORBA_TOPDIR" >&6; }
+fi
+if test "x$with_override_jaxp" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_jaxp"
+ JAXP_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
+ as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
+$as_echo_n "checking if jaxp should be overridden... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
+$as_echo "yes with $JAXP_TOPDIR" >&6; }
+fi
+if test "x$with_override_jaxws" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_jaxws"
+ JAXWS_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
+ as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
+$as_echo_n "checking if jaxws should be overridden... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
+$as_echo "yes with $JAXWS_TOPDIR" >&6; }
+fi
+if test "x$with_override_hotspot" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_hotspot"
+ HOTSPOT_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
+ ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
+ as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
+$as_echo_n "checking if hotspot should be overridden... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
+$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
+fi
+if test "x$with_override_jdk" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_jdk"
+ JDK_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
+ as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
+$as_echo_n "checking if JDK should be overridden... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
+$as_echo "yes with $JDK_TOPDIR" >&6; }
+fi
+
+
+
+LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
+CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
+JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
+JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
+HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
+JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
+IMAGES_OUTPUTDIR="$OUTPUT_ROOT/images"
+
+
+
+
+
+
+
+
+
+LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
+CORBA_DIST="$OUTPUT_ROOT/corba/dist"
+JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
+JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
+HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# Setup the toolchain (compilers etc), i.e. the tools that need to be
+# cross-compilation aware.
+#
+###############################################################################
+
+
+###############################################################################
+#
+# Configure the development tool paths and potential sysroot.
+#
+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
+
+DEVKIT=
+SYS_ROOT=/
+
+
+# The option used to specify the target .o,.a or .so file.
+# When compiling, how to specify the to be created object file.
+CC_OUT_OPTION='-o$(SPACE)'
+# When linking, how to specify the to be created executable.
+EXE_OUT_OPTION='-o$(SPACE)'
+# When linking, how to specify the to be created dynamically linkable library.
+LD_OUT_OPTION='-o$(SPACE)'
+# When archiving, how to specify the to be create static archive for object files.
+AR_OUT_OPTION='rcs$(SPACE)'
+
+
+
+
+
+
+
+# Check if the VS env variables were setup prior to running configure.
+# If not, then find vcvarsall.bat and run it automatically, and integrate
+# the set env variables into the spec file.
+SETUPDEVENV="# No special vars"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
+ if test "x$VCINSTALLDIR" != x; then
+ # No further setup is needed. The build will happen from this kind
+ # of shell.
+ SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
+ # Make sure to remind you, if you forget to run make from a cygwin bash shell
+ # that is spawned "bash -l" from a VS command prompt.
+ CHECK_FOR_VCINSTALLDIR=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you are running from within a VS command prompt" >&5
+$as_echo_n "checking if you are running from within a VS command prompt... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
+ if test "x$VS100COMNTOOLS" != x; then
+ VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
+ SEARCH_ROOT="$VS100COMNTOOLS"
+ else
+ VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
+ SEARCH_ROOT="$PROGRAMFILES"
+ fi
+ VCPATH=`dirname "$VARSBAT"`
+ VCPATH=`cygpath -w "$VCPATH"`
+ if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
+$as_echo_n "checking if we can find the VS installation... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
+ fi
+ case "$LEGACY_OPENJDK_TARGET_CPU1" in
+ i?86)
+ VARSBAT_ARCH=x86
+ ;;
+ *)
+ VARSBAT_ARCH=$LEGACY_OPENJDK_TARGET_CPU1
+ ;;
+ esac
+ # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+ cd $OUTPUT_ROOT
+ bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
+ cd $CURDIR
+ if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can extract the needed env variables" >&5
+$as_echo_n "checking if we can extract the needed env variables... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not succesfully extract the env variables needed for the VS setup. Please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
+ fi
+ # Now set all paths and other env variables. This will allow the rest of
+ # the configure script to find and run the compiler in the proper way.
+ . $OUTPUT_ROOT/localdevenv.sh
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can find the VS installation" >&5
+$as_echo_n "checking if we can find the VS installation... " >&6; }
+ if test "x$VCINSTALLDIR" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VCINSTALLDIR" >&5
+$as_echo "$VCINSTALLDIR" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find VS installation. Please install. If you are sure you have installed VS, then please run \"c:\\cygwin\\bin\\bash.exe -l\" from a VS command prompt and then run configure/make from there." "$LINENO" 5
+ fi
+ CHECK_FOR_VCINSTALLDIR=no
+ SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
+$as_echo_n "checking for msvcr100.dll... " >&6; }
+
+# Check whether --with-msvcr100dll was given.
+if test "${with_msvcr100dll+set}" = set; then :
+ withval=$with_msvcr100dll;
+fi
+
+ if test "x$with_msvcr100dll" != x; then
+ MSVCR100DLL="$with_msvcr100dll"
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
+ else
+ MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
+ if test "x$MSVCR100DLL" = x; then
+ MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
+ fi
+ fi
+ fi
+ if test "x$MSVCR100DLL" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR100DLL" >&5
+$as_echo "$MSVCR100DLL" >&6; }
+
+ # Fail with message the path to msvcr100.dll if var MSVCR100DLL contains a path with no spaces in it.
+ # Unless on Windows, where we can rewrite the path.
+ HAS_SPACE=`echo "$MSVCR100DLL" | grep " "`
+ if test "x$HAS_SPACE" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ MSVCR100DLL=`$CYGPATH -s -m -a "$MSVCR100DLL"`
+ MSVCR100DLL=`$CYGPATH -u "$MSVCR100DLL"`
+ else
+ as_fn_error $? "You cannot have spaces in the path to msvcr100.dll! \"$MSVCR100DLL\"" "$LINENO" 5
+ fi
+ fi
+
+ fi
+fi
+
+
+
+
+# Locate the actual tools
+
+# If --build AND --host is set, then the configure script will find any
+# cross compilation tools in the PATH. Cross compilation tools
+# follows the cross compilation standard where they are prefixed with ${host}.
+# For example the binary i686-sun-solaris2.10-gcc
+# will cross compile for i686-sun-solaris2.10
+# If neither of build and host is not set, then build=host and the
+# default compiler found in the path will be used.
+# Setting only --host, does not seem to be really supported.
+# Please set both --build and --host if you want to cross compile.
+
+DEFINE_CROSS_COMPILE_ARCH=""
+HOSTCC=""
+HOSTCXX=""
+HOSTLD=""
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if this is a cross compile" >&5
+$as_echo_n "checking if this is a cross compile... " >&6; }
+if test "x$OPENJDK_BUILD_SYSTEM" != "x$OPENJDK_TARGET_SYSTEM"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, from $OPENJDK_BUILD_SYSTEM to $OPENJDK_TARGET_SYSTEM" >&5
+$as_echo "yes, from $OPENJDK_BUILD_SYSTEM to $OPENJDK_TARGET_SYSTEM" >&6; }
+ # We have detected a cross compile!
+ DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_OPENJDK_TARGET_CPU1"
+ # Now we to find a C/C++ compiler that can build executables for the build
+ # platform. We can't use the AC_PROG_CC macro, since it can only be used
+ # once.
+ for ac_prog in cl cc gcc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_HOSTCC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $HOSTCC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_HOSTCC="$HOSTCC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_HOSTCC="$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
+HOSTCC=$ac_cv_path_HOSTCC
+if test -n "$HOSTCC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTCC" >&5
+$as_echo "$HOSTCC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$HOSTCC" && break
+done
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$HOSTCC"
+ car="${tmp%% *}"
+ tmp="$HOSTCC EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ HOSTCC="$car ${cdr% *}"
+ else
+ HOSTCC="$car"
+ fi
+
+ for ac_prog in cl CC g++
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_HOSTCXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $HOSTCXX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_HOSTCXX="$HOSTCXX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_HOSTCXX="$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
+HOSTCXX=$ac_cv_path_HOSTCXX
+if test -n "$HOSTCXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTCXX" >&5
+$as_echo "$HOSTCXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$HOSTCXX" && break
+done
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$HOSTCXX"
+ car="${tmp%% *}"
+ tmp="$HOSTCXX EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ HOSTCXX="$car ${cdr% *}"
+ else
+ HOSTCXX="$car"
+ fi
+
+ # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_HOSTLD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $HOSTLD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_HOSTLD="$HOSTLD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_HOSTLD="$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
+HOSTLD=$ac_cv_path_HOSTLD
+if test -n "$HOSTLD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HOSTLD" >&5
+$as_echo "$HOSTLD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$HOSTLD"
+ car="${tmp%% *}"
+ tmp="$HOSTLD EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ HOSTLD="$car ${cdr% *}"
+ else
+ HOSTLD="$car"
+ fi
+
+ # Building for the build platform should be easy. Therefore
+ # we do not need any linkers or assemblers etc.
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+# You can force the sys-root if the sys-root encoded into the cross compiler tools
+# is not correct.
+
+# Check whether --with-sys-root was given.
+if test "${with_sys_root+set}" = set; then :
+ withval=$with_sys_root;
+fi
+
+
+if test "x$with_sys_root" != x; then
+ SYS_ROOT=$with_sys_root
+fi
+
+# If a devkit is found on the builddeps server, then prepend its path to the
+# PATH variable. If there are cross compilers available in the devkit, these
+# will be found by AC_PROG_CC et al.
+
+
+ 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_devkit_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_devkit_TARGET_${rewritten_target_var}}
+ fi
+ if test "x$resource" = x; then
+ # Ok, lets instead look for a build specific resource
+ eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
+ fi
+ if test "x$resource" = x; then
+ # Ok, lets instead look for a generic resource
+ # (The devkit comes from M4 and not the shell, thus no need for eval here.)
+ resource=${builddep_devkit}
+ fi
+ if test "x$resource" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
+$as_echo "$as_me: Using builddeps $resource for devkit" >&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
+
+# devkit 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 devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
+$as_echo "$as_me: Downloading build dependency devkit 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/devkit.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_devkit_ROOT}
+ thecflags=${builddep_devkit_CFLAGS}
+ thelibs=${builddep_devkit_LIBS}
+ if test "x$depdir" = x; then
+ as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
+ fi
+ DEVKIT=$depdir
+ if test "x$theroot" != x; then
+ DEVKIT="$theroot"
+ fi
+ if test "x$thecflags" != x; then
+ DEVKIT_CFLAGS="$thecflags"
+ fi
+ if test "x$thelibs" != x; then
+ DEVKIT_LIBS="$thelibs"
+ fi
+ # Found devkit
+ PATH="$DEVKIT/bin:$PATH"
+ SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
+ if test "x$x_includes" = "xNONE"; then
+ x_includes="$SYS_ROOT/usr/include/X11"
+ fi
+ if test "x$x_libraries" = "xNONE"; then
+ x_libraries="$SYS_ROOT/usr/lib"
+ fi
+
+
+ fi
+
+ fi
+
+
+if test "x$SYS_ROOT" != "x/" ; then
+ CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
+ CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
+ OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
+ OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
+ CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
+ LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
+fi
+
+# Store the CFLAGS etal passed to the configure script.
+ORG_CFLAGS="$CFLAGS"
+ORG_CXXFLAGS="$CXXFLAGS"
+ORG_OBJCFLAGS="$OBJCFLAGS"
+
+
+# Check whether --with-tools-dir was given.
+if test "${with_tools_dir+set}" = set; then :
+ withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
+fi
+
+
+
+# Check whether --with-devkit was given.
+if test "${with_devkit+set}" = set; then :
+ withval=$with_devkit;
+ if test "x$with_sys_root" != x; then
+ as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
+ fi
+ if test "x$with_tools_dir" != x; then
+ as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
+ fi
+ TOOLS_DIR=$with_devkit/bin
+ SYS_ROOT=$with_devkit/$host_alias/libc
+
+fi
+
+
+# autoconf magic only relies on PATH, so update it if tools dir is specified
+OLD_PATH="$PATH"
+if test "x$TOOLS_DIR" != x; then
+ PATH=$TOOLS_DIR:$PATH
+fi
+
+# gcc is almost always present, but on Windows we
+# prefer cl.exe and on Solaris we prefer CC.
+# Thus test for them in this order.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl cc gcc
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl cc gcc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+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
+
+if test "x$CC" = x; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # devkit is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=devkit
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ as_fn_error $? "Could not find a compiler. $HELP_MSG" "$LINENO" 5
+fi
+if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ # Do not use cc on MacOSX use gcc instead.
+ CC="gcc"
+fi
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$CC"
+ car="${tmp%% *}"
+ tmp="$CC EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ CC="$car ${cdr% *}"
+ else
+ CC="$car"
+ fi
+
+
+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
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl CC g++
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in cl CC g++
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+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
+
+if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ # The found CC, even though it seems to be a g++ derivate, cannot compile
+ # c++ code. Override.
+ CXX="g++"
+fi
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$CXX"
+ car="${tmp%% *}"
+ tmp="$CXX EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ CXX="$car ${cdr% *}"
+ else
+ CXX="$car"
+ fi
+
+
+if test "x$CXX" = x || test "x$CC" = x; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # devkit is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=devkit
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ as_fn_error $? "Could not find the needed compilers! $HELP_MSG " "$LINENO" 5
+fi
+
+if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in gcc objcc objc cc CC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJC"; then
+ ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJC=$ac_cv_prog_OBJC
+if test -n "$OBJC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
+$as_echo "$OBJC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$OBJC" && break
+ done
+fi
+if test -z "$OBJC"; then
+ ac_ct_OBJC=$OBJC
+ for ac_prog in gcc objcc objc cc CC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJC"; then
+ ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
+if test -n "$ac_ct_OBJC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
+$as_echo "$ac_ct_OBJC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_OBJC" && break
+done
+
+ if test "x$ac_ct_OBJC" = x; then
+ OBJC="gcc"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJC=$ac_ct_OBJC
+ fi
+fi
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
+$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
+if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_objc_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_objc_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
+$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GOBJC=yes
+else
+ GOBJC=
+fi
+ac_test_OBJCFLAGS=${OBJCFLAGS+set}
+ac_save_OBJCFLAGS=$OBJCFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
+$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
+if test "${ac_cv_prog_objc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_objc_werror_flag=$ac_objc_werror_flag
+ ac_objc_werror_flag=yes
+ ac_cv_prog_objc_g=no
+ OBJCFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_objc_try_compile "$LINENO"; then :
+ ac_cv_prog_objc_g=yes
+else
+ OBJCFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_objc_try_compile "$LINENO"; then :
+
+else
+ ac_objc_werror_flag=$ac_save_objc_werror_flag
+ OBJCFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_objc_try_compile "$LINENO"; then :
+ ac_cv_prog_objc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_objc_werror_flag=$ac_save_objc_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
+$as_echo "$ac_cv_prog_objc_g" >&6; }
+if test "$ac_test_OBJCFLAGS" = set; then
+ OBJCFLAGS=$ac_save_OBJCFLAGS
+elif test $ac_cv_prog_objc_g = yes; then
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-g -O2"
+ else
+ OBJCFLAGS="-g"
+ fi
+else
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-O2"
+ else
+ OBJCFLAGS=
+ fi
+fi
+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
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$OBJC"
+ car="${tmp%% *}"
+ tmp="$OBJC EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ OBJC="$car ${cdr% *}"
+ else
+ OBJC="$car"
+ fi
+
+else
+ OBJC=
+fi
+
+# Restore the flags to the user specified values.
+# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
+CFLAGS="$ORG_CFLAGS"
+CXXFLAGS="$ORG_CXXFLAGS"
+OBJCFLAGS="$ORG_OBJCFLAGS"
+
+# If we are not cross compiling, use the same compilers for
+# building the build platform executables.
+if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
+ HOSTCC="$CC"
+ HOSTCXX="$CXX"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ld; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LD"; then
+ ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LD="${ac_tool_prefix}ld"
+ $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
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LD"; then
+ ac_ct_LD=$LD
+ # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LD"; then
+ ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LD="ld"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LD=$ac_cv_prog_ac_ct_LD
+if test -n "$ac_ct_LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
+$as_echo "$ac_ct_LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LD" = x; then
+ LD=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LD=$ac_ct_LD
+ fi
+else
+ LD="$ac_cv_prog_LD"
+fi
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$LD"
+ car="${tmp%% *}"
+ tmp="$LD EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ LD="$car ${cdr% *}"
+ else
+ LD="$car"
+ fi
+
+LD="$CC"
+LDEXE="$CC"
+LDCXX="$CXX"
+LDEXECXX="$CXX"
+# LDEXE is the linker to use, when creating executables.
+
+# Linking C++ libraries.
+
+# Linking C++ executables.
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $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
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$AR"
+ car="${tmp%% *}"
+ tmp="$AR EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ AR="$car ${cdr% *}"
+ else
+ AR="$car"
+ fi
+
+if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ ARFLAGS="-r"
+else
+ ARFLAGS=""
+fi
+
+
+COMPILER_NAME=gcc
+COMPILER_TYPE=CC
+if test "x$OPENJDK_BUILD_OS" = xwindows; then :
+
+ # For now, assume that we are always compiling using cl.exe.
+ CC_OUT_OPTION=-Fo
+ EXE_OUT_OPTION=-out:
+ LD_OUT_OPTION=-out:
+ AR_OUT_OPTION=-out:
+ # On Windows, reject /usr/bin/link, which is a cygwin
+ # program for something completely different.
+ # Extract the first word of "link", so it can be a program name with args.
+set dummy link; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_WINLD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$WINLD"; then
+ ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/link"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_WINLD="link"
+ $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
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_WINLD
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set WINLD to just the basename; use the full file name.
+ shift
+ ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+WINLD=$ac_cv_prog_WINLD
+if test -n "$WINLD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
+$as_echo "$WINLD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ # Since we must ignore the first found link, WINLD will contain
+ # the full path to the link.exe program.
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$WINLD"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$WINLD"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ WINLD="$tmp"
+
+ LD="$WINLD"
+ LDEXE="$WINLD"
+ LDCXX="$WINLD"
+ LDEXECXX="$WINLD"
+ # Set HOSTLD to same as LD until we fully support cross compilation
+ # on windows.
+ HOSTLD="$WINLD"
+
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_MT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MT"; then
+ ac_cv_prog_MT="$MT" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_MT="mt"
+ $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
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_MT
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set MT to just the basename; use the full file name.
+ shift
+ ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+MT=$ac_cv_prog_MT
+if test -n "$MT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
+$as_echo "$MT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$MT"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$MT"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ MT="$tmp"
+
+ # The resource compiler
+ # Extract the first word of "rc", so it can be a program name with args.
+set dummy rc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RC"; then
+ ac_cv_prog_RC="$RC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_RC="rc"
+ $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
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_RC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set RC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+RC=$ac_cv_prog_RC
+if test -n "$RC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
+$as_echo "$RC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$RC"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$RC"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ RC="$tmp"
+
+
+ RC_FLAGS="-nologo /l 0x409 /r"
+ if test "x$VARIANT" = xOPT; then :
+
+ RC_FLAGS="$RC_FLAGS -d NDEBUG"
+
+fi
+ JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
+ if test "x$JDK_UPDATE_VERSION" = x; then :
+
+ JDK_UPDATE_VERSION_NOTNULL=0
+
+fi
+ RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
+
+ # lib.exe is used to create static libraries.
+ # Extract the first word of "lib", so it can be a program name with args.
+set dummy lib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_WINAR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$WINAR"; then
+ ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_WINAR="lib"
+ $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
+WINAR=$ac_cv_prog_WINAR
+if test -n "$WINAR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
+$as_echo "$WINAR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$WINAR"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$WINAR"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ WINAR="$tmp"
+
+ AR="$WINAR"
+ ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
+
+ # Extract the first word of "dumpbin", so it can be a program name with args.
+set dummy dumpbin; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="dumpbin"
+ $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
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$DUMPBIN"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$DUMPBIN"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ DUMPBIN="$tmp"
+
+
+ COMPILER_TYPE=CL
+ CCXXFLAGS="$CCXXFLAGS -nologo"
+
+fi
+
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+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
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$CPP"
+ car="${tmp%% *}"
+ tmp="$CPP EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ CPP="$car ${cdr% *}"
+ else
+ CPP="$car"
+ fi
+
+
+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}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+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
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$CXXCPP"
+ car="${tmp%% *}"
+ tmp="$CXXCPP EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ CXXCPP="$car ${cdr% *}"
+ else
+ CXXCPP="$car"
+ fi
+
+
+# for solaris we really need solaris tools, and not gnu equivalent
+# these seems to normally reside in /usr/ccs/bin so add that to path before
+# starting to probe
+#
+# NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
+# so that it can be overriden --with-tools-dir
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
+fi
+
+# Find the right assembler.
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $AS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_AS="$AS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_AS="$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
+AS=$ac_cv_path_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$AS"
+ car="${tmp%% *}"
+ tmp="$AS EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ AS="$car ${cdr% *}"
+ else
+ AS="$car"
+ fi
+
+ ASFLAGS=" "
+else
+ AS="$CC -c"
+ ASFLAGS=" "
+fi
+
+
+
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ # Extract the first word of "nm", so it can be a program name with args.
+set dummy nm; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $NM in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_NM="$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
+NM=$ac_cv_path_NM
+if test -n "$NM"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
+$as_echo "$NM" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$NM"
+ car="${tmp%% *}"
+ tmp="$NM EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ NM="$car ${cdr% *}"
+ else
+ NM="$car"
+ fi
+
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $STRIP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_STRIP="$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
+STRIP=$ac_cv_path_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$STRIP"
+ car="${tmp%% *}"
+ tmp="$STRIP EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ STRIP="$car ${cdr% *}"
+ else
+ STRIP="$car"
+ fi
+
+ # Extract the first word of "mcs", so it can be a program name with args.
+set dummy mcs; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MCS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MCS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MCS="$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
+MCS=$ac_cv_path_MCS
+if test -n "$MCS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
+$as_echo "$MCS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$MCS"
+ car="${tmp%% *}"
+ tmp="$MCS EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ MCS="$car ${cdr% *}"
+ else
+ MCS="$car"
+ fi
+
+else
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nm; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ ac_cv_prog_NM="$NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NM="${ac_tool_prefix}nm"
+ $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
+NM=$ac_cv_prog_NM
+if test -n "$NM"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
+$as_echo "$NM" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NM"; then
+ ac_ct_NM=$NM
+ # Extract the first word of "nm", so it can be a program name with args.
+set dummy nm; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NM"; then
+ ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NM="nm"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NM=$ac_cv_prog_ac_ct_NM
+if test -n "$ac_ct_NM"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
+$as_echo "$ac_ct_NM" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NM" = x; then
+ NM=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NM=$ac_ct_NM
+ fi
+else
+ NM="$ac_cv_prog_NM"
+fi
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$NM"
+ car="${tmp%% *}"
+ tmp="$NM EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ NM="$car ${cdr% *}"
+ else
+ NM="$car"
+ fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+ # Translate "gcc -E" into "`which gcc` -E" ie
+ # extract the full path to the binary and at the
+ # same time maintain any arguments passed to it.
+ # The command MUST exist in the path, or else!
+ tmp="$STRIP"
+ car="${tmp%% *}"
+ tmp="$STRIP EOL"
+ cdr="${tmp#* }"
+ # On windows we want paths without spaces.
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+
+ # Translate long cygdrive or C:\sdfsf path
+ # into a short mixed mode path that has no
+ # spaces in it.
+ tmp="$car"
+
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ tmp=`$CYGPATH -u "$car"`
+ tmp=`which "$tmp"`
+ # If file exists with .exe appended, that's the real filename
+ # and cygpath needs that to convert to short style path.
+ if test -f "${tmp}.exe"; then
+ tmp="${tmp}.exe"
+ elif test -f "${tmp}.cmd"; then
+ tmp="${tmp}.cmd"
+ fi
+ # Convert to C:/ mixed style path without spaces.
+ tmp=`$CYGPATH -s -m "$tmp"`
+ fi
+ car="$tmp"
+
+ else
+ # "which" is not portable, but is used here
+ # because we know that the command exists!
+ car=`which $car`
+ fi
+ if test "x$cdr" != xEOL; then
+ STRIP="$car ${cdr% *}"
+ else
+ STRIP="$car"
+ fi
+
+fi
+
+###
+#
+# Check for objcopy
+#
+# but search for gobjcopy first...
+# since I on solaris found a broken objcopy...buhh
+#
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gobjcopy", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gobjcopy; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_OBJCOPY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $OBJCOPY in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+OBJCOPY=$ac_cv_path_OBJCOPY
+if test -n "$OBJCOPY"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
+$as_echo "$OBJCOPY" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_OBJCOPY"; then
+ ac_pt_OBJCOPY=$OBJCOPY
+ # Extract the first word of "gobjcopy", so it can be a program name with args.
+set dummy gobjcopy; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_OBJCOPY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_OBJCOPY in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_OBJCOPY="$ac_pt_OBJCOPY" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_OBJCOPY=$ac_cv_path_ac_pt_OBJCOPY
+if test -n "$ac_pt_OBJCOPY"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OBJCOPY" >&5
+$as_echo "$ac_pt_OBJCOPY" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_OBJCOPY" = x; then
+ OBJCOPY=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJCOPY=$ac_pt_OBJCOPY
+ fi
+else
+ OBJCOPY="$ac_cv_path_OBJCOPY"
+fi
+
+if test "x$OBJCOPY" = x; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objcopy; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_OBJCOPY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $OBJCOPY in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+OBJCOPY=$ac_cv_path_OBJCOPY
+if test -n "$OBJCOPY"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
+$as_echo "$OBJCOPY" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_OBJCOPY"; then
+ ac_pt_OBJCOPY=$OBJCOPY
+ # Extract the first word of "objcopy", so it can be a program name with args.
+set dummy objcopy; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_OBJCOPY+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_OBJCOPY in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_OBJCOPY="$ac_pt_OBJCOPY" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_OBJCOPY=$ac_cv_path_ac_pt_OBJCOPY
+if test -n "$ac_pt_OBJCOPY"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_OBJCOPY" >&5
+$as_echo "$ac_pt_OBJCOPY" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_OBJCOPY" = x; then
+ OBJCOPY=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJCOPY=$ac_pt_OBJCOPY
+ fi
+else
+ OBJCOPY="$ac_cv_path_OBJCOPY"
+fi
+
+fi
+
+# Restore old path without tools dir
+PATH="$OLD_PATH"
+
+
+# FIXME: Currently we must test this after paths but before flags. Fix!
+
+# And we can test some aspects on the target using configure macros.
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+#include
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+###############################################################################
+#
+# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
+# (The JVM can use 32 or 64 bit Java pointers but that decision
+# is made at runtime.)
+#
+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"
+if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
+ CXXFLAGS="-m${with_target_bits} $CXXFLAGS"
+fi
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
+$as_echo_n "checking size of int *... " >&6; }
+if test "${ac_cv_sizeof_int_p+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_int_p" = yes; 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 77 "cannot compute sizeof (int *)
+See \`config.log' for more details" "$LINENO" 5 ; }
+ else
+ ac_cv_sizeof_int_p=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
+$as_echo "$ac_cv_sizeof_int_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT_P $ac_cv_sizeof_int_p
+_ACEOF
+
+
+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
+
+
+# keep track of c/cxx flags that we added outselves...
+# to prevent emitting warning...
+ADDED_CFLAGS=
+ADDED_CXXFLAGS=
+ADDED_LDFLAGS=
+
+if test "x$ac_cv_sizeof_int_p" = x0; then
+ # The test failed, lets pick the assumed value.
+ ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS
+else
+ ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
+
+ if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
+ ADDED_CFLAGS=" -m${with_target_bits}"
+ ADDED_CXXFLAGS=" -m${with_target_bits}"
+ ADDED_LDFLAGS=" -m${with_target_bits}"
+
+ CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
+ CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
+ LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
+
+ CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
+ LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
+ fi
+fi
+
+if test "x$ARCH_DATA_MODEL" = x64; then
+ A_LP64="LP64:="
+ ADD_LP64="-D_LP64=1"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
+$as_echo_n "checking for target address size... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH_DATA_MODEL bits" >&5
+$as_echo "$ARCH_DATA_MODEL bits" >&6; }
+LP64=$A_LP64
+
+
+
+if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then
+ as_fn_error $? "The tested number of bits in the target ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
+fi
+
+#
+# NOTE: check for -mstackrealign needs to be below potential addition of -m32
+#
+if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
+ # While waiting for a better solution, the current workaround is to use -mstackrealign.
+ CFLAGS="$CFLAGS -mstackrealign"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
+$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main() { return 0; }
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+###############################################################################
+#
+# Is the target little of big endian?
+#
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+ #include
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+ #include
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ ENDIAN="big";; #(
+ no)
+ ENDIAN="little" ;; #(
+ universal)
+ ENDIAN="universal_endianness"
+ ;; #(
+ *)
+ ENDIAN="unknown" ;;
+ esac
+
+
+if test "x$ENDIAN" = xuniversal_endianness; then
+ as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
+fi
+if test "x$ENDIAN" = xunknown; then
+ ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
+fi
+if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" >&5
+$as_echo "$as_me: WARNING: The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" >&2;}
+ ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
+fi
+
+
+
+# Configure flags for the tools
+
+
+###############################################################################
+#
+# How to compile shared libraries.
+#
+
+if test "x$GCC" = xyes; then
+ COMPILER_NAME=gcc
+ PICFLAG="-fPIC"
+ LIBRARY_PREFIX=lib
+ SHARED_LIBRARY='lib$1.so'
+ STATIC_LIBRARY='lib$1.a'
+ SHARED_LIBRARY_FLAGS="-shared"
+ SHARED_LIBRARY_SUFFIX='.so'
+ STATIC_LIBRARY_SUFFIX='.a'
+ OBJ_SUFFIX='.o'
+ EXE_SUFFIX=''
+ SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
+ SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
+ C_FLAG_REORDER=''
+ CXX_FLAG_REORDER=''
+ SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/$1'
+ LD="$CC"
+ LDEXE="$CC"
+ LDCXX="$CXX"
+ LDEXECXX="$CXX"
+ POST_STRIP_CMD="$STRIP -g"
+ if test "x$JDK_VARIANT" = xembedded; then
+ POST_STRIP_CMD="$STRIP --strip-unneeded"
+ fi
+
+ # Linking is different on MacOSX
+ if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ # Might change in the future to clang.
+ COMPILER_NAME=gcc
+ SHARED_LIBRARY='lib$1.dylib'
+ SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
+ SHARED_LIBRARY_SUFFIX='.dylib'
+ EXE_SUFFIX=''
+ SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
+ SET_SHARED_LIBRARY_MAPFILE=''
+ SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
+ POST_STRIP_CMD="$STRIP -S"
+ fi
+else
+ if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
+ COMPILER_NAME=ossc
+ PICFLAG="-KPIC"
+ LIBRARY_PREFIX=lib
+ SHARED_LIBRARY='lib$1.so'
+ STATIC_LIBRARY='lib$1.a'
+ SHARED_LIBRARY_FLAGS="-z defs -xildoff -ztext -G"
+ SHARED_LIBRARY_SUFFIX='.so'
+ STATIC_LIBRARY_SUFFIX='.a'
+ OBJ_SUFFIX='.o'
+ EXE_SUFFIX=''
+ SET_SHARED_LIBRARY_NAME=''
+ SET_SHARED_LIBRARY_MAPFILE='-M$1'
+ C_FLAG_REORDER='-xF'
+ CXX_FLAG_REORDER='-xF'
+ SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/$1'
+ CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
+ CFLAGS_JDKLIB_EXTRA='-xstrconst'
+ POST_STRIP_CMD="$STRIP -x"
+ POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
+ fi
+ if test "x$OPENJDK_BUILD_OS" = xwindows; then
+ # If it is not gcc, then assume it is the MS Visual Studio compiler
+ COMPILER_NAME=cl
+ PICFLAG=""
+ LIBRARY_PREFIX=
+ SHARED_LIBRARY='$1.dll'
+ STATIC_LIBRARY='$1.lib'
+ SHARED_LIBRARY_FLAGS="-LD"
+ SHARED_LIBRARY_SUFFIX='.dll'
+ STATIC_LIBRARY_SUFFIX='.lib'
+ OBJ_SUFFIX='.obj'
+ EXE_SUFFIX='.exe'
+ SET_SHARED_LIBRARY_NAME=''
+ SET_SHARED_LIBRARY_MAPFILE=''
+ SET_SHARED_LIBRARY_ORIGIN=''
+ fi
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# The (cross) compiler is now configured, we can now test capabilities
+# of the target platform.
+
+
+
+###############################################################################
+#
+# Setup the opt flags for different compilers
+# and different operating systems.
+#
+C_FLAG_DEPS="-MMD -MF"
+CXX_FLAG_DEPS="-MMD -MF"
+
+case $COMPILER_TYPE in
+ CC )
+ D_FLAG="-g"
+ case $COMPILER_NAME in
+ gcc )
+ case $OPENJDK_TARGET_OS in
+ macosx )
+ # On MacOSX we optimize for size, something
+ # we should do for all platforms?
+ C_O_FLAG_HI="-Os"
+ C_O_FLAG_NORM="-Os"
+ C_O_FLAG_NONE=""
+ ;;
+ *)
+ C_O_FLAG_HI="-O3"
+ C_O_FLAG_NORM="-O2"
+ C_O_FLAG_NONE="-O0"
+ CFLAGS_DEBUG_SYMBOLS="-g"
+ CXXFLAGS_DEBUG_SYMBOLS="-g"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
+ CFLAGS_DEBUG_SYMBOLS="-g1"
+ CXXFLAGS_DEBUG_SYMBOLSG="-g1"
+ fi
+ ;;
+ esac
+ CXX_O_FLAG_HI="$C_O_FLAG_HI"
+ CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+ CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+ ;;
+ ossc )
+ #
+ # Forte has different names for this with their C++ compiler...
+ #
+ C_FLAG_DEPS="-xMMD -xMF"
+ CXX_FLAG_DEPS="-xMMD -xMF"
+
+# Extra options used with HIGHEST
+#
+# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
+# done with care, there are some assumptions below that need to
+# be understood about the use of pointers, and IEEE behavior.
+#
+# Use non-standard floating point mode (not IEEE 754)
+CC_HIGHEST="$CC_HIGHEST -fns"
+# Do some simplification of floating point arithmetic (not IEEE 754)
+CC_HIGHEST="$CC_HIGHEST -fsimple"
+# Use single precision floating point with 'float'
+CC_HIGHEST="$CC_HIGHEST -fsingle"
+# Assume memory references via basic pointer types do not alias
+# (Source with excessing pointer casting and data access with mixed
+# pointer types are not recommended)
+CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
+# Use intrinsic or inline versions for math/std functions
+# (If you expect perfect errno behavior, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
+# Loop data dependency optimizations (need -xO3 or higher)
+CC_HIGHEST="$CC_HIGHEST -xdepend"
+# Pointer parameters to functions do not overlap
+# (Similar to -xalias_level=basic usage, but less obvious sometimes.
+# If you pass in multiple pointers to the same data, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xrestrict"
+# Inline some library routines
+# (If you expect perfect errno behavior, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xlibmil"
+# Use optimized math routines
+# (If you expect perfect errno behavior, do not use this)
+# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
+#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
+
+ case $LEGACY_OPENJDK_TARGET_CPU1 in
+ i586)
+ C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
+ C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
+ C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
+ C_O_FLAG_NONE=""
+ CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
+ CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
+ CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
+ CXX_O_FLAG_NONE=""
+ ;;
+ sparc)
+ CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
+ CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+ CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+ C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+ C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+ C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+ C_O_FLAG_NONE=""
+ CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+ CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+ CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+ CXX_O_FLAG_NONE=""
+ ;;
+ esac
+
+ CFLAGS_DEBUG_SYMBOLS="-g -xs"
+ CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
+ esac
+ ;;
+ CL )
+ D_FLAG=
+ C_O_FLAG_HI="-O2"
+ C_O_FLAG_NORM="-O1"
+ C_O_FLAG_NONE="-Od"
+ CXX_O_FLAG_HI="$C_O_FLAG_HI"
+ CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+ CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+ ;;
+esac
+
+if test -z "$C_O_FLAG_HIGHEST"; then
+ C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
+fi
+
+if test -z "$CXX_O_FLAG_HIGHEST"; then
+ CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
+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"
+
+###############################################################################
+#
+# Now setup the CFLAGS and LDFLAGS for the JDK build.
+# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
+#
+case $COMPILER_NAME in
+ gcc )
+ CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
+ -pipe \
+ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+ case $OPENJDK_TARGET_CPU_ARCH in
+ arm )
+ # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
+ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+ ;;
+ ppc )
+ # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
+ ;;
+ * )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
+ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+ ;;
+ esac
+ ;;
+ ossc )
+ CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
+ CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
+ ;;
+ cl )
+ CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+ -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
+ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+ -DWIN32 -DIAL"
+ case $LEGACY_OPENJDK_TARGET_CPU1 in
+ i?86 )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
+ ;;
+ amd64 )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
+ ;;
+ esac
+ ;;
+esac
+
+###############################################################################
+#
+# Cross-compile arch specific flags
+
+#
+if test "x$JDK_VARIANT" = "xembedded"; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DJAVASE_EMBEDDED"
+fi
+
+case $OPENJDK_TARGET_CPU_ARCH in
+arm )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
+ ;;
+ppc )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
+ ;;
+esac
+
+###############################################################################
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
+
+# The package path is used only on macosx?
+PACKAGE_PATH=/opt/local
+
+
+# Sometimes we use a cpu dir (.../lib/amd64/server)
+# Sometimes not (.../lib/server)
+LIBARCHDIR="$LEGACY_OPENJDK_TARGET_CPU2/"
+if test "x$ENDIAN" = xlittle; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
+else
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
+fi
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
+fi
+if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
+fi
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
+fi
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
+ LIBARCHDIR=""
+fi
+if test "x$OPENJDK_TARGET_OS" = xbsd; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
+fi
+if test "x$DEBUG_LEVEL" = xrelease; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
+else
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
+fi
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_OPENJDK_TARGET_CPU1\"' -D$LEGACY_OPENJDK_TARGET_CPU1"
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
+ -I${JDK_OUTPUTDIR}/include \
+ -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
+ -I${JDK_TOPDIR}/src/share/javavm/export \
+ -I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/javavm/export \
+ -I${JDK_TOPDIR}/src/share/native/common \
+ -I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/native/common"
+
+# The shared libraries are compiled using the picflag.
+CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
+
+# Executable flags
+CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
+CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
+
+# Now this is odd. The JDK native libraries have to link against libjvm.so
+# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
+# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
+# is identical for client and server? Yes. Which is picked at runtime (client or server)?
+# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
+# libraries will link to whatever is in memory. Yuck.
+#
+# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
+if test "x$COMPILER_TYPE" = xCL; then
+ LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
+ if test "x$LEGACY_OPENJDK_TARGET_CPU1" = xi586; then
+ LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
+ fi
+ # TODO: make -debug optional "--disable-full-debug-symbols"
+ LDFLAGS_JDK="$LDFLAGS_JDK -debug"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
+ LDFLAGS_JDKLIB_SUFFIX=""
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
+ LDFLAGS_STACK_SIZE=1048576
+ else
+ LDFLAGS_STACK_SIZE=327680
+ fi
+ LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
+else
+ # If this is a --hash-style=gnu system, use --hash-style=both, why?
+ HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
+ if test -n "$HAS_GNU_HASH"; then
+ # And since we now know that the linker is gnu, then add -z defs, to forbid
+ # undefined symbols in object files.
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
+ if test "x$DEBUG_LEVEL" == "xrelease"; then
+ # When building release libraries, tell the linker optimize them.
+ # Should this be supplied to the OSS linker as well?
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
+ fi
+ fi
+
+ LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
+ -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
+ -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
+ -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
+ LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
+ if test "x$COMPILER_NAME" = xossc; then
+ LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
+ fi
+
+ # Only the jli library is explicitly linked when the launchers are built.
+ # The libjvm is then dynamically loaded/linked by the launcher.
+ LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
+ if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
+ LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
+ LDFLAGS_JDKEXE_SUFFIX="-ljli"
+ fi
+fi
+
+# Adjust flags according to debug level.
+case $DEBUG_LEVEL in
+ fastdebug )
+ CFLAGS="$CFLAGS $D_FLAG"
+ JAVAC_FLAGS="$JAVAC_FLAGS -g"
+ ;;
+ slowdebug )
+ CFLAGS="$CFLAGS $D_FLAG"
+ C_O_FLAG_HI="$C_O_FLAG_NONE"
+ C_O_FLAG_NORM="$C_O_FLAG_NONE"
+ CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
+ CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
+ JAVAC_FLAGS="$JAVAC_FLAGS -g"
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# After we have toolchain, we can compile the uncygdrive helper
+
+# When using cygwin, we need a wrapper binary that renames
+# /cygdrive/c/ arguments into c:/ arguments and peeks into
+# @files and rewrites these too! This wrapper binary is
+# called uncygdrive.exe.
+UNCYGDRIVE=
+if test "x$OPENJDK_BUILD_OS" = xwindows; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive can be created" >&5
+$as_echo_n "checking if uncygdrive can be created... " >&6; }
+ UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
+ rm -f $OUTPUT_ROOT/uncygdrive*
+ UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
+ cd $OUTPUT_ROOT
+ $CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
+ cd $CURDIR
+
+ if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ cat $OUTPUT_ROOT/uncygdrive1.log
+ as_fn_error $? "Could not create $OUTPUT_ROOT/uncygdrive.exe" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNCYGDRIVE" >&5
+$as_echo "$UNCYGDRIVE" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if uncygdrive.exe works" >&5
+$as_echo_n "checking if uncygdrive.exe works... " >&6; }
+ cd $OUTPUT_ROOT
+ $UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
+ cd $CURDIR
+ if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ cat $OUTPUT_ROOT/uncygdrive2.log
+ as_fn_error $? "Uncygdrive did not work!" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
+fi
+
+
+
+
+
+# Setup debug symbols (need objcopy from the toolchain for that)
+
+#
+# ENABLE_DEBUG_SYMBOLS
+# This must be done after the toolchain is setup, since we're looking at objcopy.
+#
+ENABLE_DEBUG_SYMBOLS=default
+
+# default on macosx is no...
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ ENABLE_DEBUG_SYMBOLS=no
+fi
+
+# default for embedded is no...
+if test "x$JDK_VARIANT" = "xembedded"; then
+ ENABLE_DEBUG_SYMBOLS=no
+fi
+
+# Check whether --enable-debug-symbols was given.
+if test "${enable_debug_symbols+set}" = set; then :
+ enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
+$as_echo_n "checking if we should generate debug symbols... " >&6; }
+
+if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
+ # explicit enabling of enable-debug-symbols and can't find objcopy
+ # this is an error
+ as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
+fi
+
+if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
+ # Default is on if objcopy is found, otherwise off
+ if test "x$OBJCOPY" != x; then
+ ENABLE_DEBUG_SYMBOLS=yes
+ else
+ ENABLE_DEBUG_SYMBOLS=no
+ fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
+$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
+
+#
+# ZIP_DEBUGINFO_FILES
+#
+ZIP_DEBUGINFO_FILES=yes
+
+# Check whether --enable-zip-debug-info was given.
+if test "${enable_zip_debug_info+set}" = set; then :
+ enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
+$as_echo_n "checking if we should zip debug-info files... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
+$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
+
+# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
+# use that...
+if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
+ ZIP_DEBUGINFO_FILES=1
+else
+ ZIP_DEBUGINFO_FILES=0
+fi
+
+
+
+
+
+
+
+###############################################################################
+#
+# Check dependencies for external and internal libraries.
+#
+###############################################################################
+
+
+
+###############################################################################
+#
+# 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" = 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
+ FREETYPE2_NOT_NEEDED=yes
+ # If the java runtime framework is disabled, then we need X11.
+ # This will be adjusted below.
+ { $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
+ FREETYPE2_NOT_NEEDED=yes
+fi
+
+###############################################################################
+#
+# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
+# that uses this API.
+#
+# Check whether --enable-macosx-runtime-support was given.
+if test "${enable_macosx_runtime_support+set}" = set; then :
+ enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
+else
+ MACOSX_RUNTIME_SUPPORT="no"
+fi
+
+
+USE_MACOSX_RUNTIME_SUPPORT=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
+$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
+if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
+ if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
+ MACOSX_RUNTIME_SUPPORT=yes
+ USE_MACOSX_RUNTIME_SUPPORT=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
+$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
+$as_echo "yes, but explicitly disabled." >&6; }
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
+$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
+ X11_NOT_NEEDED=
+ FREETYPE2_NOT_NEEDED=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
+$as_echo "alsa pulse" >&6; }
+fi
+
+
+
+
+
+###############################################################################
+#
+# Check for X Windows
+#
+
+# 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$SYS_ROOT" != "x/"; then
+ if test "x$x_includes" = xNONE; then
+ if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
+ x_includes="$SYS_ROOT/usr/X11R6/include"
+ fi
+ fi
+ if test "x$x_libraries" = xNONE; then
+ if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
+ x_libraries="$SYS_ROOT/usr/X11R6/lib"
+ fi
+ fi
+fi
+
+# Now let autoconf do it's magic
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then :
+ withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ case $x_includes,$x_libraries in #(
+ *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
+ *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ cat >Imakefile <<'_ACEOF'
+incroot:
+ @echo incroot='${INCROOT}'
+usrlibdir:
+ @echo usrlibdir='${USRLIBDIR}'
+libdir:
+ @echo libdir='${LIBDIR}'
+_ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl dylib la dll; do
+ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+ test -f "$ac_im_libdir/libX11.$ac_extension"; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ac_x_includes= ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /usr/lib64 | /lib | /lib64) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R7/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R7
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R7/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R7
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Xlib.h.
+ # First, try using that file with no special directory specified.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ for ac_dir in $ac_x_header_dirs; do
+ if test -r "$ac_dir/X11/Xlib.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+done
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+ # Check for the libraries.
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+ LIBS="-lX11 $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+XrmInitialize ()
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+ # Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl dylib la dll; do
+ if test -r "$ac_dir/libX11.$ac_extension"; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+ no,* | *,no | *\'*)
+ # Didn't find X, or a directory has "'" in its name.
+ ac_cv_have_x="have_x=no";; #(
+ *)
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$ac_x_includes'\
+ ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+ *) have_x=yes;;
+ esac
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$x_includes'\
+ ac_x_libraries='$x_libraries'"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+if test "$no_x" = yes; then
+ # Not all programs may use this symbol, but it does not hurt to define it.
+
+$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
+
+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+ if test -n "$x_includes"; then
+ X_CFLAGS="$X_CFLAGS -I$x_includes"
+ fi
+
+ # It would also be nice to do this for all -L options, not just this one.
+ if test -n "$x_libraries"; then
+ X_LIBS="$X_LIBS -L$x_libraries"
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space. Words are not sufficient . . . .
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
+$as_echo_n "checking whether -R must be followed by a space... " >&6; }
+ ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+ ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ X_LIBS="$X_LIBS -R$x_libraries"
+else
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ X_LIBS="$X_LIBS -R $x_libraries"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
+$as_echo "neither works" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
+ LIBS=$ac_xsave_LIBS
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn Johnson says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And Karl Berry says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XOpenDisplay ();
+int
+main ()
+{
+return XOpenDisplay ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_dnet_dnet_ntoa=yes
+else
+ ac_cv_lib_dnet_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+ ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$ac_xsave_LIBS"
+
+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # on Irix 5.2, according to T.E. Dickey.
+ # The functions gethostbyname, getservbyname, and inet_addr are
+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+ ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+
+fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+ if test $ac_cv_lib_nsl_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_bsd_gethostbyname=yes
+else
+ ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+ fi
+ fi
+
+ # lieder@skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says Simon Leinen: it contains gethostby*
+ # variants that don't use the name server (or something). -lsocket
+ # must be given before -lnsl if both are needed. We assume that
+ # if connect needs -lnsl, so does gethostbyname.
+ ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = x""yes; then :
+
+fi
+
+ if test $ac_cv_func_connect = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_connect+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_socket_connect=yes
+else
+ ac_cv_lib_socket_connect=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = x""yes; then :
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+ fi
+
+ # Guillermo Gomez says -lposix is necessary on A/UX.
+ ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
+if test "x$ac_cv_func_remove" = x""yes; then :
+
+fi
+
+ if test $ac_cv_func_remove = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
+$as_echo_n "checking for remove in -lposix... " >&6; }
+if test "${ac_cv_lib_posix_remove+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+int
+main ()
+{
+return remove ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_posix_remove=yes
+else
+ ac_cv_lib_posix_remove=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
+$as_echo "$ac_cv_lib_posix_remove" >&6; }
+if test "x$ac_cv_lib_posix_remove" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
+if test "x$ac_cv_func_shmat" = x""yes; then :
+
+fi
+
+ if test $ac_cv_func_shmat = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
+$as_echo_n "checking for shmat in -lipc... " >&6; }
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+int
+main ()
+{
+return shmat ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_ipc_shmat=yes
+else
+ ac_cv_lib_ipc_shmat=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
+$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS=$LDFLAGS
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # John Interrante, Karl Berry
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
+$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char IceConnectionNumber ();
+int
+main ()
+{
+return IceConnectionNumber ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+ ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+ LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+
+if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # x11 is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=x11
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
+fi
+
+# Some of the old makefiles require a setting of OPENWIN_HOME
+# Since the X11R6 directory has disappeared on later Linuxes,
+# we need to probe for it.
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ if test -d "$SYS_ROOT/usr/X11R6"; then
+ OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
+ fi
+ if test -d "$SYS_ROOT/usr/include/X11"; then
+ OPENWIN_HOME="$SYS_ROOT/usr"
+ fi
+fi
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ OPENWIN_HOME="/usr/openwin"
+fi
+
+
+
+#
+# Weird Sol10 something check...TODO change to try compile
+#
+if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
+ if test "`uname -r`" = "5.10"; then
+ if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
+ X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
+ fi
+ fi
+fi
+
+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 $X_CFLAGS"
+for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ X11_A_OK=yes
+else
+ X11_A_OK=no
+fi
+
+done
+
+CFLAGS="$OLD_CFLAGS"
+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
+
+
+if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # x11 is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=x11
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
+fi
+
+
+
+
+
+
+###############################################################################
+#
+# The common unix printing system cups is used to print from java.
+#
+
+# Check whether --with-cups was given.
+if test "${with_cups+set}" = set; then :
+ withval=$with_cups;
+fi
+
+
+# Check whether --with-cups-include was given.
+if test "${with_cups_include+set}" = set; then :
+ withval=$with_cups_include;
+fi
+
+
+# Check whether --with-cups-lib was given.
+if test "${with_cups_lib+set}" = set; then :
+ withval=$with_cups_lib;
+fi
+
+
+if test "x$CUPS_NOT_NEEDED" = xyes; then
+ if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
+$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
+ fi
+ CUPS_CFLAGS=
+ CUPS_LIBS=
+else
+ CUPS_FOUND=no
+
+ if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
+ as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
+ fi
+
+ if test "x${with_cups}" != x; then
+ CUPS_LIBS="-L${with_cups}/lib -lcups"
+ CUPS_CFLAGS="-I${with_cups}/include"
+ CUPS_FOUND=yes
+ fi
+ if test "x${with_cups_include}" != x; then
+ CUPS_CFLAGS="-I${with_cups_include}"
+ CUPS_FOUND=yes
+ fi
+ if test "x${with_cups_lib}" != x; then
+ CUPS_LIBS="-L${with_cups_lib} -lcups"
+ CUPS_FOUND=yes
+ fi
+ if test "x$CUPS_FOUND" = xno; then
+
+
+ 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 :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ CUPS_FOUND=yes
+ CUPS_CFLAGS=
+ CUPS_LIBS="-lcups"
+ DEFAULT_CUPS=yes
+fi
+
+done
+
+ fi
+ if test "x$CUPS_FOUND" = xno; then
+ # Getting nervous now? Lets poke around for standard Solaris third-party
+ # package installation locations.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers and libs" >&5
+$as_echo_n "checking for cups headers and libs... " >&6; }
+ if test -s /opt/sfw/cups/include/cups/cups.h; then
+ # An SFW package seems to be installed!
+ CUPS_FOUND=yes
+ CUPS_CFLAGS="-I/opt/sfw/cups/include"
+ CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
+ elif test -s /opt/csw/include/cups/cups.h; then
+ # A CSW package seems to be installed!
+ CUPS_FOUND=yes
+ CUPS_CFLAGS="-I/opt/csw/include"
+ CUPS_LIBS="-L/opt/csw/lib -lcups"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
+$as_echo "$CUPS_FOUND" >&6; }
+ fi
+ if test "x$CUPS_FOUND" = xno; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # cups is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=cups
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
+ fi
+fi
+
+
+
+
+
+
+
+###############################################################################
+#
+# The ubiquitous freetype2 library is used to render fonts.
+#
+
+# Check whether --with-freetype was given.
+if test "${with_freetype+set}" = set; then :
+ withval=$with_freetype;
+fi
+
+
+# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
+USING_SYSTEM_FT_LIB=false
+
+if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
+ if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != 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;}
+ fi
+ FREETYPE2_CFLAGS=
+ FREETYPE2_LIBS=
+ FREETYPE2_LIB_PATH=
+else
+ FREETYPE2_FOUND=no
+
+ if test "x$with_freetype" != x; then
+
+ # Fail with message the path to freetype if var with_freetype contains a path with no spaces in it.
+ # Unless on Windows, where we can rewrite the path.
+ HAS_SPACE=`echo "$with_freetype" | grep " "`
+ if test "x$HAS_SPACE" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ with_freetype=`$CYGPATH -s -m -a "$with_freetype"`
+ with_freetype=`$CYGPATH -u "$with_freetype"`
+ else
+ as_fn_error $? "You cannot have spaces in the path to freetype! \"$with_freetype\"" "$LINENO" 5
+ fi
+ fi
+
+ FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
+ fi
+ FREETYPE2_LIB_PATH="$with_freetype/lib"
+ FREETYPE2_CFLAGS="-I$with_freetype/include"
+ if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
+ FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
+ fi
+ FREETYPE2_FOUND=yes
+ if test "x$FREETYPE2_FOUND" = xyes; then
+ # Verify that the directories exist
+ if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
+ as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
+ fi
+ # List the contents of the lib.
+ FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
+ if test "x$FREETYPELIB" = x; then
+ as_fn_error $? "Could not find libfreetype.se nor freetype.dll in $with_freetype/lib" "$LINENO" 5
+ fi
+ # Check one h-file
+ if ! test -s "$with_freetype/include/ft2build.h"; then
+ as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
+ fi
+ fi
+ fi
+ if test "x$FREETYPE2_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_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
+ FREETYPE2=$depdir
+ if test "x$theroot" != x; then
+ FREETYPE2="$theroot"
+ fi
+ if test "x$thecflags" != x; then
+ FREETYPE2_CFLAGS="$thecflags"
+ fi
+ if test "x$thelibs" != x; then
+ FREETYPE2_LIBS="$thelibs"
+ fi
+ FREETYPE2_FOUND=yes
+ else FREETYPE2_FOUND=no
+
+ fi
+ else FREETYPE2_FOUND=no
+
+ fi
+
+ USING_SYSTEM_FT_LIB=true
+ fi
+ if test "x$FREETYPE2_FOUND" = xno; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
+$as_echo_n "checking for FREETYPE2... " >&6; }
+
+if test -n "$FREETYPE2_CFLAGS"; then
+ pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$FREETYPE2_LIBS"; then
+ pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 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
+ FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
+ else
+ FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$FREETYPE2_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ FREETYPE2_FOUND=no
+elif test $pkg_failed = untried; then
+ FREETYPE2_FOUND=no
+else
+ FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
+ FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ FREETYPE2_FOUND=yes
+fi
+ USING_SYSTEM_FT_LIB=true
+ fi
+ if test "x$FREETYPE2_FOUND" = xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
+$as_echo_n "checking for freetype in some standard locations... " >&6; }
+
+ if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
+ DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
+ DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
+ fi
+ if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
+ DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
+ DEFAULT_FREETYPE_LIBS="-lfreetype"
+ fi
+
+ PREV_CXXCFLAGS="$CXXFLAGS"
+ PREV_LDFLAGS="$LDFLAGS"
+ CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
+ LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+ #include FT_FREETYPE_H
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+ # Yes, the default cflags and libs did the trick.
+ FREETYPE2_FOUND=yes
+ FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
+ FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
+
+else
+
+ FREETYPE2_FOUND=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CXXCFLAGS="$PREV_CXXFLAGS"
+ LDFLAGS="$PREV_LDFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
+$as_echo "$FREETYPE2_FOUND" >&6; }
+ USING_SYSTEM_FT_LIB=true
+ fi
+ if test "x$FREETYPE2_FOUND" = xno; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=freetype2
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
+ fi
+fi
+
+
+
+
+
+
+
+
+
+###############################################################################
+#
+# 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;
+fi
+
+
+# Check whether --with-alsa-include was given.
+if test "${with_alsa_include+set}" = set; then :
+ withval=$with_alsa_include;
+fi
+
+
+# Check whether --with-alsa-lib was given.
+if test "${with_alsa_lib+set}" = set; then :
+ withval=$with_alsa_lib;
+fi
+
+
+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
+ { $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;}
+ 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
+ as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
+ fi
+
+ if test "x${with_alsa}" != x; then
+ ALSA_LIBS="-L${with_alsa}/lib -lalsa"
+ 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} -lalsa"
+ 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
+ if test "x$ALSA_FOUND" = xno; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
+$as_echo_n "checking for ALSA... " >&6; }
+
+if test -n "$ALSA_CFLAGS"; then
+ pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$ALSA_LIBS"; then
+ pkg_cv_ALSA_LIBS="$ALSA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 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
+ ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
+ else
+ ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ALSA_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ALSA_FOUND=no
+elif test $pkg_failed = untried; then
+ ALSA_FOUND=no
+else
+ ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
+ ALSA_LIBS=$pkg_cv_ALSA_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ ALSA_FOUND=yes
+fi
+ fi
+ if test "x$ALSA_FOUND" = xno; then
+ for ac_header in alsa/asoundlib.h
+do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ALSA_ASOUNDLIB_H 1
+_ACEOF
+ ALSA_FOUND=yes
+ ALSA_CFLAGS=-Iignoreme
+ ALSA_LIBS=-lasound
+ DEFAULT_ALSA=yes
+else
+ ALSA_FOUND=no
+fi
+
+done
+
+ fi
+ if test "x$ALSA_FOUND" = xno; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # alsa is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=alsa
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
+ fi
+fi
+
+
+
+
+
+
+
+###############################################################################
+#
+# Check for the jpeg library
+#
+
+USE_EXTERNAL_LIBJPEG=true
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
+$as_echo_n "checking for main in -ljpeg... " >&6; }
+if test "${ac_cv_lib_jpeg_main+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_jpeg_main=yes
+else
+ ac_cv_lib_jpeg_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
+$as_echo "$ac_cv_lib_jpeg_main" >&6; }
+if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
+ LIBS="-ljpeg $LIBS"
+
+else
+ USE_EXTERNAL_LIBJPEG=false
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
+$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
+
+fi
+
+
+
+###############################################################################
+#
+# Check for the gif library
+#
+
+USE_EXTERNAL_LIBJPEG=true
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
+$as_echo_n "checking for main in -lgif... " >&6; }
+if test "${ac_cv_lib_gif_main+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgif $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_gif_main=yes
+else
+ ac_cv_lib_gif_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
+$as_echo "$ac_cv_lib_gif_main" >&6; }
+if test "x$ac_cv_lib_gif_main" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGIF 1
+_ACEOF
+
+ LIBS="-lgif $LIBS"
+
+else
+ USE_EXTERNAL_LIBGIF=false
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
+$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
+
+fi
+
+
+
+###############################################################################
+#
+# Check for the zlib library
+#
+
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+ withval=$with_zlib;
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
+$as_echo_n "checking for compress in -lz... " >&6; }
+if test "${ac_cv_lib_z_compress+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char compress ();
+int
+main ()
+{
+return compress ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_z_compress=yes
+else
+ ac_cv_lib_z_compress=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
+$as_echo "$ac_cv_lib_z_compress" >&6; }
+if test "x$ac_cv_lib_z_compress" = x""yes; then :
+ ZLIB_FOUND=yes
+else
+ ZLIB_FOUND=no
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
+$as_echo_n "checking for which zlib to use... " >&6; }
+
+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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
+$as_echo "bundled" >&6; }
+elif test "x${with_zlib}" = "xsystem"; then
+ if test "x${ZLIB_FOUND}" = "xyes"; then
+ USE_EXTERNAL_LIBZ=true
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
+$as_echo "system" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
+$as_echo "system not found" >&6; }
+ as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
+ fi
+else
+ as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
+fi
+
+
+
+###############################################################################
+LIBZIP_CAN_USE_MMAP=true
+if test "x$JDK_VARIANT" = "xembedded"; then
+ LIBZIP_CAN_USE_MMAP=false
+fi
+
+
+###############################################################################
+#
+# Check if altzone exists in time.h
+#
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+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
+#
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
+$as_echo_n "checking for cos in -lm... " >&6; }
+if test "${ac_cv_lib_m_cos+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char cos ();
+int
+main ()
+{
+return cos ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_m_cos=yes
+else
+ ac_cv_lib_m_cos=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
+$as_echo "$ac_cv_lib_m_cos" >&6; }
+if test "x$ac_cv_lib_m_cos" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+else
+
+ { $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
+
+save_LIBS="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+fi
+
+LIBDL="$LIBS"
+
+LIBS="$save_LIBS"
+
+
+
+###############################################################################
+#
+# statically link libstdc++ before C++ ABI is stablized on Linux unless
+# dynamic build is configured on command line.
+#
+# Check whether --enable-static-link-stdc++ was given.
+if test "${enable_static_link_stdc__+set}" = set; then :
+ enableval=$enable_static_link_stdc__;
+else
+
+ enable_static_link_stdc__=yes
+
+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_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
+ as_fn_error $? "I cannot link to stdc++! Neither dynamically nor statically." "$LINENO" 5
+ fi
+
+ if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Static linking of libstdc++ was not possible reverting to dynamic linking." >&5
+$as_echo "$as_me: Static linking of libstdc++ was not possible reverting to dynamic linking." >&6;}
+ enable_static_link_stdc__=no
+ fi
+
+ if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Dynamic linking of libstdc++ was not possible reverting to static linking." >&5
+$as_echo "$as_me: Dynamic linking of libstdc++ was not possible reverting to static linking." >&6;}
+ enable_static_link_stdc__=yes
+ 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 test "x$enable_static_link_stdc__" = xyes; then
+ LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+ LDCXX="$CC"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+$as_echo "static" >&6; }
+ else
+ LIBCXX="$LIBCXX -lstdc++"
+ LDCXX="$CXX"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
+$as_echo "dynamic" >&6; }
+ fi
+fi
+
+# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
+ LIBCXX="/usr/lib${LEGACY_OPENJDK_TARGET_CPU3}/libCrun.so.1"
+fi
+
+# TODO better (platform agnostic) test
+if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
+ LIBCXX="-lstdc++"
+fi
+
+
+
+
+
+###############################################################################
+#
+# We need to do some final tweaking, when everything else is done.
+#
+###############################################################################
+
+
+HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
+
+
+# The name of the Service Agent jar.
+SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
+fi
+
+
+
+
+###############################################################################
+#
+# Configure parts of the build that only affect the build performance,
+# not the result.
+#
+###############################################################################
+
+
+# How many cores do we have on this build system?
+
+# Check whether --with-num-cores was given.
+if test "${with_num_cores+set}" = set; then :
+ withval=$with_num_cores;
+fi
+
+if test "x$with_num_cores" = x; then
+ # The number of cores were not specified, try to probe them.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
+$as_echo_n "checking for number of cores... " >&6; }
+ NUM_CORES=1
+ FOUND_CORES=no
+
+ if test -f /proc/cpuinfo; then
+ # Looks like a Linux system
+ NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
+ FOUND_CORES=yes
+ fi
+
+ if test -x /usr/sbin/psrinfo; then
+ # Looks like a Solaris system
+ NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
+ FOUND_CORES=yes
+ fi
+
+ if test -x /usr/sbin/system_profiler; then
+ # Looks like a MacOSX system
+ NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
+ FOUND_CORES=yes
+ fi
+
+ if test "x$build_os" = xwindows; then
+ NUM_CORES=4
+ fi
+
+ # For c/c++ code we run twice as many concurrent build
+ # jobs than we have cores, otherwise we will stall on io.
+ CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
+
+ if test "x$FOUND_CORES" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
+$as_echo "$NUM_CORES" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1!" >&5
+$as_echo "could not detect number of cores, defaulting to 1!" >&6; }
+ fi
+
+
+else
+ NUM_CORES=$with_num_cores
+ CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
+fi
+
+
+
+
+# How much memory do we have on this build system?
+
+# Check whether --with-memory-size was given.
+if test "${with_memory_size+set}" = set; then :
+ withval=$with_memory_size;
+fi
+
+if test "x$with_memory_size" = x; then
+ # The memory size was not specified, try to probe it.
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
+$as_echo_n "checking for memory size... " >&6; }
+ # Default to 1024MB
+ MEMORY_SIZE=1024
+ FOUND_MEM=no
+
+ if test -f /proc/cpuinfo; then
+ # Looks like a Linux system
+ MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
+ MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
+ FOUND_MEM=yes
+ fi
+
+ if test -x /usr/sbin/prtconf; then
+ # Looks like a Solaris system
+ MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
+ FOUND_MEM=yes
+ fi
+
+ if test -x /usr/sbin/system_profiler; then
+ # Looks like a MacOSX system
+ MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'`
+ MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
+ FOUND_MEM=yes
+ fi
+
+ if test "x$build_os" = xwindows; then
+ MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print $4 }' | sed 's/,//'`
+ FOUND_MEM=yes
+ fi
+
+ if test "x$FOUND_MEM" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
+$as_echo "$MEMORY_SIZE MB" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size defaulting to 1024MB!" >&5
+$as_echo "could not detect memory size defaulting to 1024MB!" >&6; }
+ fi
+
+else
+ MEMORY_SIZE=$with_memory_size
+fi
+
+
+
+# Setup smart javac (after cores and memory have been setup)
+
+
+# Check whether --with-server-java was given.
+if test "${with_server_java+set}" = set; then :
+ withval=$with_server_java;
+fi
+
+
+if test "x$with_server_java" != x; then
+ SERVER_JAVA="$with_server_java"
+ FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" = x; then
+ as_fn_error $? "Could not execute server java: $SERVER_JAVA" "$LINENO" 5
+ fi
+else
+ SERVER_JAVA=""
+ # Hotspot specific options.
+
+ # Test if -XX:+UseParallelOldGC is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -XX:+UseParallelOldGC to SERVER_JAVA
+ FOUND_WARN=`$JAVA -XX:+UseParallelOldGC -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -XX:+UseParallelOldGC -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -XX:+UseParallelOldGC"
+ fi
+
+
+ # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -verbosegc to SERVER_JAVA
+ FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -verbosegc"
+ fi
+
+ # JRockit specific options.
+
+ # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
+ # If so, then append -Xverbose:gc to SERVER_JAVA
+ FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xverbose:gc"
+ fi
+
+ SERVER_JAVA="$JAVA $SERVER_JAVA"
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use shared server for javac" >&5
+$as_echo_n "checking whether to use shared server for javac... " >&6; }
+# Check whether --enable-javac-server was given.
+if test "${enable_javac_server+set}" = set; then :
+ enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
+else
+ ENABLE_JAVAC_SERVER='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
+$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
+if test "x$ENABLE_JAVAC_SERVER" = xyes; then
+ JAVAC_USE_REMOTE=true
+ JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
+else
+ JAVAC_USE_REMOTE=false
+ JAVAC_SERVERS=
+fi
+
+
+
+
+# Check whether --with-javac-server-cores was given.
+if test "${with_javac_server_cores+set}" = set; then :
+ withval=$with_javac_server_cores;
+fi
+
+if test "x$with_javac_server_cores" != x; then
+ JAVAC_SERVER_CORES="$with_javac_server_cores"
+else
+ if test "$NUM_CORES" -gt 16; then
+ # We set this arbitrary limit because we want to limit the heap
+ # size of the javac server.
+ # In the future we will make the javac compilers in the server
+ # share more and more state, thus enabling us to use more and
+ # more concurrent threads in the server.
+ JAVAC_SERVER_CORES="16"
+ else
+ JAVAC_SERVER_CORES="$NUM_CORES"
+ fi
+
+ if test "$MEMORY_SIZE" -gt "17000"; then
+ MAX_HEAP_MEM=10000
+
+ # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -d64 to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -d64"
+ fi
+
+
+ # Test if -Xms10G -Xmx10G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xms10G -Xmx10G to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xms10G -Xmx10G"
+ fi
+
+
+ # Test if -Xmn2G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xmn2G to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xmn2G -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xmn2G -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xmn2G"
+ fi
+
+ elif test "$MEMORY_SIZE" -gt "10000"; then
+ MAX_HEAP_MEM=6000
+
+ # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -d64 to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -d64"
+ fi
+
+
+ # Test if -Xms6G -Xmx6G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xms6G -Xmx6G to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xms6G -Xmx6G"
+ fi
+
+
+ # Test if -Xmn1G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xmn1G to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xmn1G -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xmn1G -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xmn1G"
+ fi
+
+ elif test "$MEMORY_SIZE" -gt "5000"; then
+ MAX_HEAP_MEM=3000
+
+ # Test if -d64 is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -d64 to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -d64"
+ fi
+
+
+ # Test if -Xms1G -Xmx3G is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xms1G -Xmx3G to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xms1G -Xmx3G"
+ fi
+
+
+ # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xmn256M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xmn256M"
+ fi
+
+ elif test "$MEMORY_SIZE" -gt "3800"; then
+ MAX_HEAP_MEM=2500
+
+ # Test if -Xms1G -Xmx2500M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xms1G -Xmx2500M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xms1G -Xmx2500M"
+ fi
+
+
+ # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xmn256M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xmn256M"
+ fi
+
+ elif test "$MEMORY_SIZE" -gt "1900"; then
+ MAX_HEAP_MEM=1200
+
+ # Test if -Xms700M -Xmx1200M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xms700M -Xmx1200M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xms700M -Xmx1200M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xms700M -Xmx1200M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xms700M -Xmx1200M"
+ fi
+
+
+ # Test if -Xmn256M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xmn256M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xmn256M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xmn256M"
+ fi
+
+ elif test "$MEMORY_SIZE" -gt "1000"; then
+ MAX_HEAP_MEM=900
+
+ # Test if -Xms400M -Xmx900M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xms400M -Xmx900M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xms400M -Xmx900M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xms400M -Xmx900M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xms400M -Xmx900M"
+ fi
+
+
+ # Test if -Xmn128M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xmn128M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xmn128M"
+ fi
+
+ else
+ MAX_HEAP_MEM=512
+
+ # Test if -Xms256M -Xmx512M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xms256M -Xmx512M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xms256M -Xmx512M"
+ fi
+
+
+ # Test if -Xmn128M is a valid argument to $SERVER_JAVA (often is $JAVA passed as $SERVER_JAVA)
+ # If so, then append -Xmn128M to SERVER_JAVA
+ FOUND_WARN=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep -i warn`
+ FOUND_VERSION=`$SERVER_JAVA -Xmn128M -version 2>&1 | grep " version \""`
+ if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
+ SERVER_JAVA="$SERVER_JAVA -Xmn128M"
+ fi
+
+ fi
+
+ MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
+ if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
+$as_echo_n "checking if number of server cores must be reduced... " >&6; }
+ JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
+$as_echo "yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
+ fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to track dependencies between Java packages" >&5
+$as_echo_n "checking whether to track dependencies between Java packages... " >&6; }
+# Check whether --enable-javac-deps was given.
+if test "${enable_javac_deps+set}" = set; then :
+ enableval=$enable_javac_deps; ENABLE_JAVAC_DEPS="${enableval}"
+else
+ ENABLE_JAVAC_DEPS='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_DEPS" >&5
+$as_echo "$ENABLE_JAVAC_DEPS" >&6; }
+if test "x$ENABLE_JAVAC_DEPS" = xyes; then
+ JAVAC_USE_DEPS=true
+else
+ JAVAC_USE_DEPS=false
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use multiple cores for javac compilation" >&5
+$as_echo_n "checking whether to use multiple cores for javac compilation... " >&6; }
+# Check whether --enable-javac-multi-core was given.
+if test "${enable_javac_multi_core+set}" = set; then :
+ enableval=$enable_javac_multi_core; ENABLE_JAVAC_MULTICORE="${enableval}"
+else
+ ENABLE_JAVAC_MULTICORE='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_MULTICORE" >&5
+$as_echo "$ENABLE_JAVAC_MULTICORE" >&6; }
+if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
+ JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
+else
+ JAVAC_USE_MODE=SINGLE_THREADED_BATCH
+ if test "x$ENABLE_JAVAC_DEPS" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options." >&5
+$as_echo "$as_me: WARNING: Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling dependency tracking for you now." >&5
+$as_echo "$as_me: WARNING: Disabling dependency tracking for you now." >&2;}
+ JAVAC_USE_DEPS=false
+ fi
+ if test "x$ENABLE_JAVAC_SERVER" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options." >&5
+$as_echo "$as_me: WARNING: The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling javac server for you now." >&5
+$as_echo "$as_me: WARNING: Disabling javac server for you now." >&2;}
+ JAVAC_USE_REMOTE=false
+ fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
+$as_echo_n "checking whether to use sjavac... " >&6; }
+# Check whether --enable-sjavac was given.
+if test "${enable_sjavac+set}" = set; then :
+ enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
+else
+ ENABLE_SJAVAC='no'
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
+$as_echo "$ENABLE_SJAVAC" >&6; }
+
+
+
+
+# Can the C/C++ compiler use precompiled headers?
+
+
+###############################################################################
+#
+# Can the C/C++ compiler use precompiled headers?
+#
+# Check whether --enable-precompiled-headers was given.
+if test "${enable_precompiled_headers+set}" = set; then :
+ enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled-headers}
+else
+ ENABLE_PRECOMPH=yes
+fi
+
+
+USE_PRECOMPILED_HEADER=1
+if test "x$ENABLE_PRECOMPH" = xno; then
+ USE_PRECOMPILED_HEADER=0
+fi
+
+if test "x$ENABLE_PRECOMPH" = xyes; then
+ # Check that the compiler actually supports precomp headers.
+ if test "x$GCC" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
+$as_echo_n "checking that precompiled headers work... " >&6; }
+ echo "int alfa();" > conftest.h
+ $CXX -x c++-header conftest.h -o conftest.hpp.gch
+ if test ! -f conftest.hpp.gch; then
+ echo Precompiled header is not working!
+ USE_PRECOMPILED_HEADER=0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ rm -f conftest.h
+ fi
+fi
+
+
+
+
+# Setup use of ccache, if available
+
+ # Check whether --enable-ccache was given.
+if test "${enable_ccache+set}" = set; then :
+ enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
+else
+ ENABLE_CCACHE=yes
+fi
+
+ if test "x$ENABLE_CCACHE" = xyes; then
+ # Extract the first word of "ccache", so it can be a program name with args.
+set dummy ccache; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CCACHE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CCACHE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CCACHE="$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
+CCACHE=$ac_cv_path_CCACHE
+if test -n "$CCACHE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
+$as_echo "$CCACHE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ { $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: explicitly disabled" >&5
+$as_echo "explicitly disabled" >&6; }
+ CCACHE=
+ fi
+
+
+
+# Check whether --with-ccache-dir was given.
+if test "${with_ccache_dir+set}" = set; then :
+ withval=$with_ccache_dir;
+fi
+
+
+ if test "x$with_ccache_dir" != x; then
+ # When using a non home ccache directory, assume the use is to share ccache files
+ # with other users. Thus change the umask.
+ SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
+ fi
+ CCACHE_FOUND=""
+ if test "x$CCACHE" != x; then
+
+ if test "x$CCACHE" != x; then
+ CCACHE_FOUND="true"
+ # Only use ccache if it is 3.1.4 or later, which supports
+ # precompiled headers.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
+$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
+ HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
+ if test "x$HAS_GOOD_CCACHE" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
+$as_echo "no, disabling ccache" >&6; }
+ CCACHE=
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
+$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
+ PUSHED_FLAGS="$CXXFLAGS"
+ CXXFLAGS="-fpch-preprocess $CXXFLAGS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ CC_KNOWS_CCACHE_TRICK=yes
+else
+ CC_KNOWS_CCACHE_TRICK=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CXXFLAGS="$PUSHED_FLAGS"
+ if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
+$as_echo "no, disabling ccaching of precompiled headers" >&6; }
+ CCACHE=
+ fi
+ fi
+ fi
+
+ if test "x$CCACHE" != x; then
+ CCACHE_SLOPPINESS=time_macros
+ CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
+ CCACHE_FLAGS=-fpch-preprocess
+
+ if test "x$SET_CCACHE_DIR" != x; then
+ mkdir -p $CCACHE_DIR > /dev/null 2>&1
+ chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
+ fi
+ fi
+
+ fi
+
+
+###############################################################################
+#
+# And now the finish...
+#
+###############################################################################
+
+# Check for some common pitfalls
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
+$as_echo_n "checking if build directory is on local disk... " >&6; }
+
+ # df -l lists only local disks; if the given directory is not found then
+ # a non-zero exit code is given
+ if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
+ OUTPUT_DIR_IS_LOCAL="yes"
+ else
+ OUTPUT_DIR_IS_LOCAL="no"
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
+$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
+
+# Check if the user has any old-style ALT_ variables set.
+FOUND_ALT_VARIABLES=`env | grep ^ALT_`
+
+# Before generating output files, test if they exist. If they do, this is a reconfigure.
+# Since we can't properly handle the dependencies for this, warn the user about the situation
+if test -e $OUTPUT_ROOT/spec.gmk; then
+ IS_RECONFIGURE=yes
+else
+ IS_RECONFIGURE=no
+fi
+
+if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
+ HIDE_PERFORMANCE_HINTS=yes
+else
+ HIDE_PERFORMANCE_HINTS=no
+ # Hide it the next time around...
+ $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
+fi
+
+
+
+# At the end, call the closed hook. (Dummy macro if no closed sources available)
+
+
+# We're messing a bit with internal autoconf variables to put the config.status
+# in the output directory instead of the current directory.
+CONFIG_STATUS="$OUTPUT_ROOT/config.status"
+# Create the actual output files. Now the main work of configure is done.
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by openjdk $as_me jdk8, which was
+generated by GNU Autoconf 2.67. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to ."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+openjdk config.status jdk8
+configured by $0, generated by GNU Autoconf 2.67,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
+ "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
+ "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
+ "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' >$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' >$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+ ;;
+
+
+ esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+# Finally output some useful information to the user
+
+# Finally output some useful information to the user
+
+if test "x$CCACHE_FOUND" != x; then
+ if test "x$HAS_GOOD_CCACHE" = x; then
+ CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
+ CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
+ else
+ CCACHE_STATUS="installed and in use"
+ fi
+else
+ if test "x$GCC" = xyes; then
+ CCACHE_STATUS="not installed (consider installing)"
+ CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
+ else
+ CCACHE_STATUS="not available for your system"
+ fi
+fi
+
+printf "\n"
+printf "====================================================\n"
+printf "A new configuration has been successfully created in\n"
+printf "$OUTPUT_ROOT\n"
+if test "x$CONFIGURE_COMMAND_LINE" != x; then
+ printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
+else
+ printf "using default settings.\n"
+fi
+
+printf "\n"
+printf "Configuration summary:\n"
+printf "* Debug level: $DEBUG_LEVEL\n"
+printf "* JDK variant: $JDK_VARIANT\n"
+printf "* JVM variants: $with_jvm_variants\n"
+printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+printf "* Boot JDK: $BOOT_JDK\n"
+
+printf "\n"
+printf "Build performance summary:\n"
+printf "* Cores to use: $NUM_CORES\n"
+printf "* Memory limit: $MEMORY_SIZE MB\n"
+printf "* ccache status: $CCACHE_STATUS\n"
+printf "\n"
+
+if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
+ printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
+ printf "$CCACHE_HELP_MSG\n"
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # ccache is the help tag: freetyp2, cups, pulse, alsa etc
+ MISSING_DEPENDENCY=ccache
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ * )
+ break ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+
+ printf "$HELP_MSG\n"
+ printf "\n"
+fi
+
+if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
+ printf "NOTE: You have requested to build more than one version of the JVM, which\n"
+ printf "will result in longer build times.\n"
+ printf "\n"
+fi
+
+if test "x$FOUND_ALT_VARIABLES" != "x"; then
+ printf "WARNING: You have old-style ALT_ environment variables set.\n"
+ printf "These are not respected, and will be ignored. It is recommended\n"
+ printf "that you clean your environment. The following variables are set:\n"
+ printf "$FOUND_ALT_VARIABLES\n"
+ printf "\n"
+fi
+
+if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
+ printf "WARNING: Your build output directory is not on a local disk.\n"
+ printf "This will severely degrade build performance!\n"
+ printf "It is recommended that you create an output directory on a local disk,\n"
+ printf "and run the configure script again from that directory.\n"
+ printf "\n"
+fi
+
+if test "x$IS_RECONFIGURE" = "xyes"; then
+ printf "WARNING: The result of this configuration has overridden an older\n"
+ printf "configuration. You *should* run 'make clean' to make sure you get a\n"
+ printf "proper build. Failure to do so might result in strange build problems.\n"
+ printf "\n"
+fi
+
diff --git a/common/autoconf/help.m4 b/common/autoconf/help.m4
index 6f74b5e65e9..01b48172dae 100644
--- a/common/autoconf/help.m4
+++ b/common/autoconf/help.m4
@@ -23,11 +23,13 @@
# questions.
#
-function prepare_help_system {
+AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
+[
AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
-}
-
-function help_on_build_dependency {
+])
+
+AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
+[
# Print a helpful message on how to acquire the necessary build dependency.
# $1 is the help tag: freetyp2, cups, pulse, alsa etc
MISSING_DEPENDENCY=$1
@@ -51,9 +53,9 @@ function help_on_build_dependency {
if test "x$PKGHANDLER_COMMAND" != x; then
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
fi
-}
+])
-function apt_help {
+apt_help() {
case $1 in
devkit)
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
@@ -76,7 +78,7 @@ function apt_help {
esac
}
-function yum_help {
+yum_help() {
case $1 in
devkit)
PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
@@ -99,14 +101,97 @@ function yum_help {
esac
}
-function port_help {
+port_help() {
PKGHANDLER_COMMAND=""
}
-function pkgutil_help {
+pkgutil_help() {
PKGHANDLER_COMMAND=""
}
-function pkgadd_help {
+pkgadd_help() {
PKGHANDLER_COMMAND=""
}
+
+AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
+[
+# Finally output some useful information to the user
+
+if test "x$CCACHE_FOUND" != x; then
+ if test "x$HAS_GOOD_CCACHE" = x; then
+ CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
+ CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
+ else
+ CCACHE_STATUS="installed and in use"
+ fi
+else
+ if test "x$GCC" = xyes; then
+ CCACHE_STATUS="not installed (consider installing)"
+ CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
+ else
+ CCACHE_STATUS="not available for your system"
+ fi
+fi
+
+printf "\n"
+printf "====================================================\n"
+printf "A new configuration has been successfully created in\n"
+printf "$OUTPUT_ROOT\n"
+if test "x$CONFIGURE_COMMAND_LINE" != x; then
+ printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
+else
+ printf "using default settings.\n"
+fi
+
+printf "\n"
+printf "Configuration summary:\n"
+printf "* Debug level: $DEBUG_LEVEL\n"
+printf "* JDK variant: $JDK_VARIANT\n"
+printf "* JVM variants: $with_jvm_variants\n"
+printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
+printf "* Boot JDK: $BOOT_JDK\n"
+
+printf "\n"
+printf "Build performance summary:\n"
+printf "* Cores to use: $NUM_CORES\n"
+printf "* Memory limit: $MEMORY_SIZE MB\n"
+printf "* ccache status: $CCACHE_STATUS\n"
+printf "\n"
+
+if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
+ printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
+ printf "$CCACHE_HELP_MSG\n"
+ HELP_MSG_MISSING_DEPENDENCY([ccache])
+ printf "$HELP_MSG\n"
+ printf "\n"
+fi
+
+if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
+ printf "NOTE: You have requested to build more than one version of the JVM, which\n"
+ printf "will result in longer build times.\n"
+ printf "\n"
+fi
+
+if test "x$FOUND_ALT_VARIABLES" != "x"; then
+ printf "WARNING: You have old-style ALT_ environment variables set.\n"
+ printf "These are not respected, and will be ignored. It is recommended\n"
+ printf "that you clean your environment. The following variables are set:\n"
+ printf "$FOUND_ALT_VARIABLES\n"
+ printf "\n"
+fi
+
+if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
+ printf "WARNING: Your build output directory is not on a local disk.\n"
+ printf "This will severely degrade build performance!\n"
+ printf "It is recommended that you create an output directory on a local disk,\n"
+ printf "and run the configure script again from that directory.\n"
+ printf "\n"
+fi
+
+if test "x$IS_RECONFIGURE" = "xyes"; then
+ printf "WARNING: The result of this configuration has overridden an older\n"
+ printf "configuration. You *should* run 'make clean' to make sure you get a\n"
+ printf "proper build. Failure to do so might result in strange build problems.\n"
+ printf "\n"
+fi
+])
diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4
new file mode 100644
index 00000000000..28266251f99
--- /dev/null
+++ b/common/autoconf/jdk-options.m4
@@ -0,0 +1,551 @@
+#
+# 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([JDKOPT_SETUP_JDK_VARIANT],
+[
+###############################################################################
+#
+# Check which variant of the JDK that we want to build.
+# Currently we have:
+# normal: standard edition
+# embedded: cut down to a smaller footprint
+#
+# Effectively the JDK variant gives a name to a specific set of
+# modules to compile into the JDK. In the future, these modules
+# might even be Jigsaw modules.
+#
+AC_MSG_CHECKING([which variant of the JDK to build])
+AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
+ [JDK variant to build (normal, embedded) @<:@normal@:>@])])
+
+if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
+ JAVASE_EMBEDDED=""
+ MINIMIZE_RAM_USAGE=""
+ JDK_VARIANT="normal"
+elif test "x$with_jdk_variant" = xembedded; then
+ JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
+ MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
+ JDK_VARIANT="embedded"
+else
+ AC_MSG_ERROR([The available JDK variants are: normal, embedded])
+fi
+
+AC_SUBST(JAVASE_EMBEDDED)
+AC_SUBST(MINIMIZE_RAM_USAGE)
+AC_SUBST(JDK_VARIANT)
+
+AC_MSG_RESULT([$JDK_VARIANT])
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
+[
+
+###############################################################################
+#
+# Check which variants of the JVM that we want to build.
+# Currently we have:
+# server: normal interpreter and a tiered C1/C2 compiler
+# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
+# kernel: kernel footprint JVM that passes the TCK without major performance problems,
+# ie normal interpreter and C1, only the serial GC, kernel jvmti etc
+# zero: no machine code interpreter, no compiler
+# zeroshark: zero interpreter and shark/llvm compiler backend
+AC_MSG_CHECKING([which variants of the JVM that should be built])
+AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
+ [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
+
+if test "x$with_jvm_variants" = x; then
+ if test "x$JDK_VARIANT" = xembedded; then
+ with_jvm_variants="client"
+ else
+ with_jvm_variants="server"
+ fi
+fi
+
+JVM_VARIANTS=",$with_jvm_variants,"
+TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
+
+if test "x$TEST_VARIANTS" != "x,"; then
+ AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark])
+fi
+AC_MSG_RESULT([$with_jvm_variants])
+
+JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
+JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
+JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
+JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
+JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+
+if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
+ fi
+fi
+if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
+ fi
+fi
+
+# Replace the commas with AND for use in the build directory name.
+ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
+COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
+if test "x$COUNT_VARIANTS" != "x,1"; then
+ BUILDING_MULTIPLE_JVM_VARIANTS=yes
+else
+ BUILDING_MULTIPLE_JVM_VARIANTS=no
+fi
+
+AC_SUBST(JVM_VARIANTS)
+AC_SUBST(JVM_VARIANT_SERVER)
+AC_SUBST(JVM_VARIANT_CLIENT)
+AC_SUBST(JVM_VARIANT_KERNEL)
+AC_SUBST(JVM_VARIANT_ZERO)
+AC_SUBST(JVM_VARIANT_ZEROSHARK)
+
+
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
+[
+###############################################################################
+#
+# Set the debug level
+# release: no debug information, all optimizations, no asserts.
+# fastdebug: debug information (-g), all optimizations, all asserts
+# slowdebug: debug information (-g), no optimizations, all asserts
+#
+DEBUG_LEVEL="release"
+AC_MSG_CHECKING([which debug level to use])
+AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
+ [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
+ [
+ ENABLE_DEBUG="${enableval}"
+ DEBUG_LEVEL="fastdebug"
+ ], [ENABLE_DEBUG="no"])
+
+AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
+ [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
+ [
+ DEBUG_LEVEL="${withval}"
+ if test "x$ENABLE_DEBUG" = xyes; then
+ AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
+ fi
+ ])
+AC_MSG_RESULT([$DEBUG_LEVEL])
+
+if test "x$DEBUG_LEVEL" != xrelease && \
+ test "x$DEBUG_LEVEL" != xfastdebug && \
+ test "x$DEBUG_LEVEL" != xslowdebug; then
+ AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
+fi
+
+
+###############################################################################
+#
+# Setup legacy vars/targets and new vars to deal with different debug levels.
+#
+
+case $DEBUG_LEVEL in
+ release )
+ VARIANT="OPT"
+ FASTDEBUG="false"
+ DEBUG_CLASSFILES="false"
+ BUILD_VARIANT_RELEASE=""
+ HOTSPOT_DEBUG_LEVEL="product"
+ HOTSPOT_EXPORT="product"
+ ;;
+ fastdebug )
+ VARIANT="DBG"
+ FASTDEBUG="true"
+ DEBUG_CLASSFILES="true"
+ BUILD_VARIANT_RELEASE="-fastdebug"
+ HOTSPOT_DEBUG_LEVEL="fastdebug"
+ HOTSPOT_EXPORT="fastdebug"
+ ;;
+ slowdebug )
+ VARIANT="DBG"
+ FASTDEBUG="false"
+ DEBUG_CLASSFILES="true"
+ BUILD_VARIANT_RELEASE="-debug"
+ HOTSPOT_DEBUG_LEVEL="jvmg"
+ HOTSPOT_EXPORT="debug"
+ ;;
+esac
+
+#####
+# Generate the legacy makefile targets for hotspot.
+# The hotspot api for selecting the build artifacts, really, needs to be improved.
+#
+HOTSPOT_TARGET=""
+
+if test "x$JVM_VARIANT_SERVER" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
+fi
+
+if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
+fi
+
+if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
+fi
+
+if test "x$JVM_VARIANT_ZERO" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
+fi
+
+if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
+ HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
+fi
+
+HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
+
+#####
+
+AC_SUBST(DEBUG_LEVEL)
+AC_SUBST(VARIANT)
+AC_SUBST(FASTDEBUG)
+AC_SUBST(DEBUG_CLASSFILES)
+AC_SUBST(BUILD_VARIANT_RELEASE)
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
+[
+
+###############################################################################
+#
+# Should we build only OpenJDK even if closed sources are present?
+#
+AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
+ [build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,)
+
+if test "x$enable_openjdk_only" = "xyes"; then
+ OPENJDK=true
+elif test "x$enable_openjdk_only" = "xno"; then
+ OPENJDK=false
+elif test -d "$SRC_ROOT/jdk/src/closed"; then
+ OPENJDK=false
+else
+ OPENJDK=true
+fi
+
+if test "x$OPENJDK" = "xtrue"; then
+ SET_OPENJDK=OPENJDK=true
+fi
+
+AC_SUBST(SET_OPENJDK)
+
+###############################################################################
+#
+# JIGSAW or not. The JIGSAW variable is used during the intermediate
+# stage when we are building both the old style JDK and the new style modularized JDK.
+# When the modularized JDK is finalized, this option will go away.
+#
+AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
+ [build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
+
+if test "x$enable_jigsaw" = "xyes"; then
+ JIGSAW=true
+else
+ JIGSAW=false
+fi
+AC_SUBST(JIGSAW)
+
+###############################################################################
+#
+# Should we build a JDK/JVM with headful support (ie a graphical ui)?
+# We always build headless support.
+#
+AC_MSG_CHECKING([headful support])
+AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
+ [build headful support (graphical UI support) @<:@enabled@:>@])],
+ [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
+
+SUPPORT_HEADLESS=yes
+BUILD_HEADLESS="BUILD_HEADLESS:=true"
+
+if test "x$SUPPORT_HEADFUL" = xyes; then
+ # We are building both headful and headless.
+ BUILD_HEADLESS_ONLY=""
+ headful_msg="inlude support for both headful and headless"
+fi
+
+if test "x$SUPPORT_HEADFUL" = xno; then
+ # Thus we are building headless only.
+ BUILD_HEADLESS="BUILD_HEADLESS:=true"
+ BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
+ headful_msg="headless only"
+fi
+
+AC_MSG_RESULT([$headful_msg])
+
+AC_SUBST(SUPPORT_HEADLESS)
+AC_SUBST(SUPPORT_HEADFUL)
+AC_SUBST(BUILD_HEADLESS)
+AC_SUBST(BUILD_HEADLESS_ONLY)
+
+###############################################################################
+#
+# Should we run the painfully slow javadoc tool?
+#
+AC_MSG_CHECKING([whether to build documentation])
+AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs],
+ [enable generation of Javadoc documentation @<:@disabled@:>@])],
+ [ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no'])
+AC_MSG_RESULT([$ENABLE_DOCS])
+AC_SUBST(ENABLE_DOCS)
+GENERATE_DOCS=false
+if test "x$ENABLE_DOCS" = xyes; then
+ GENERATE_DOCS=true
+fi
+AC_SUBST(GENERATE_DOCS)
+
+###############################################################################
+#
+# Should we compile nimbus swing L&F? We can probably remove this option
+# since nimbus is officially part of javax now.
+#
+AC_MSG_CHECKING([whether to build nimbus L&F])
+AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
+ [disable Nimbus L&F @<:@enabled@:>@])],
+ [ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
+AC_MSG_RESULT([$ENABLE_NIMBUS])
+DISABLE_NIMBUS=
+if test "x$ENABLE_NIMBUS" = xno; then
+ DISABLE_NIMBUS=true
+fi
+AC_SUBST(DISABLE_NIMBUS)
+
+# Control wether Hotspot runs Queens test after build.
+AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
+ [enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],,
+ [enable_hotspot_test_in_build=no])
+if test "x$enable_hotspot_test_in_build" = "xyes"; then
+ TEST_IN_BUILD=true
+else
+ TEST_IN_BUILD=false
+fi
+AC_SUBST(TEST_IN_BUILD)
+
+###############################################################################
+#
+# Choose cacerts source file
+#
+AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
+ [specify alternative cacerts file])])
+if test "x$with_cacerts_file" != x; then
+ CACERTS_FILE=$with_cacerts_file
+else
+ if test "x$OPENJDK" = "xtrue"; then
+ CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
+ else
+ CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
+ fi
+fi
+AC_SUBST(CACERTS_FILE)
+
+###############################################################################
+#
+# Compress jars
+#
+COMPRESS_JARS=false
+
+# default for embedded is yes...
+if test "x$JDK_VARIANT" = "xembedded"; then
+ COMPRESS_JARS=true
+fi
+AC_SUBST(COMPRESS_JARS)
+
+###############################################################################
+#
+# Should we compile JFR
+# default no, except for on closed-jdk and !embedded
+#
+ENABLE_JFR=no
+
+# Is the JFR source present
+
+#
+# For closed && !embedded default is yes if the source is present
+#
+if test "x${OPENJDK}" != "xtrue" && test "x$JDK_VARIANT" != "xembedded" && test -d "$SRC_ROOT/jdk/src/closed/share/native/oracle/jfr"; then
+ ENABLE_JFR=yes
+fi
+
+AC_MSG_CHECKING([whether to build jfr])
+AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr],
+ [enable jfr (default is no)])]
+ [ENABLE_JFR="${enableval}"])
+AC_MSG_RESULT([${ENABLE_JFR}])
+
+if test "x$ENABLE_JFR" = "xyes"; then
+ ENABLE_JFR=true
+elif test "x$ENABLE_JFR" = "xno"; then
+ ENABLE_JFR=false
+else
+ AC_MSG_ERROR([Invalid argument to --enable-jfr])
+fi
+
+AC_SUBST(ENABLE_JFR)
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
+[
+# Source the version numbers
+. $AUTOCONF_DIR/version.numbers
+if test "x$OPENJDK" = "xfalse"; then
+ . $AUTOCONF_DIR/closed.version.numbers
+fi
+# Now set the JDK version, milestone, build number etc.
+AC_SUBST(JDK_MAJOR_VERSION)
+AC_SUBST(JDK_MINOR_VERSION)
+AC_SUBST(JDK_MICRO_VERSION)
+AC_SUBST(JDK_UPDATE_VERSION)
+AC_SUBST(JDK_BUILD_NUMBER)
+AC_SUBST(MILESTONE)
+AC_SUBST(LAUNCHER_NAME)
+AC_SUBST(PRODUCT_NAME)
+AC_SUBST(PRODUCT_SUFFIX)
+AC_SUBST(JDK_RC_PLATFORM_NAME)
+AC_SUBST(COMPANY_NAME)
+
+COPYRIGHT_YEAR=`date +'%Y'`
+AC_SUBST(COPYRIGHT_YEAR)
+
+RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
+AC_SUBST(RUNTIME_NAME)
+
+if test "x$JDK_UPDATE_VERSION" != x; then
+ JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
+else
+ JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
+fi
+AC_SUBST(JDK_VERSION)
+
+if test "x$MILESTONE" != x; then
+ RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
+else
+ RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
+fi
+AC_SUBST(RELEASE)
+
+if test "x$JDK_BUILD_NUMBER" != x; then
+ FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
+else
+ JDK_BUILD_NUMBER=b00
+ BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
+ # Avoid [:alnum:] since it depends on the locale.
+ CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
+ USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'`
+ FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
+fi
+AC_SUBST(FULL_VERSION)
+COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
+AC_SUBST(COOKED_BUILD_NUMBER)
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
+[
+HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET"
+AC_SUBST(HOTSPOT_MAKE_ARGS)
+
+# The name of the Service Agent jar.
+SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
+if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
+fi
+AC_SUBST(SALIB_NAME)
+
+])
+
+AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
+[
+#
+# ENABLE_DEBUG_SYMBOLS
+# This must be done after the toolchain is setup, since we're looking at objcopy.
+#
+ENABLE_DEBUG_SYMBOLS=default
+
+# default on macosx is no...
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ ENABLE_DEBUG_SYMBOLS=no
+fi
+
+# default for embedded is no...
+if test "x$JDK_VARIANT" = "xembedded"; then
+ ENABLE_DEBUG_SYMBOLS=no
+fi
+
+AC_ARG_ENABLE([debug-symbols],
+ [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])],
+ [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
+)
+
+AC_MSG_CHECKING([if we should generate debug symbols])
+
+if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
+ # explicit enabling of enable-debug-symbols and can't find objcopy
+ # this is an error
+ AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
+fi
+
+if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
+ # Default is on if objcopy is found, otherwise off
+ if test "x$OBJCOPY" != x; then
+ ENABLE_DEBUG_SYMBOLS=yes
+ else
+ ENABLE_DEBUG_SYMBOLS=no
+ fi
+fi
+
+AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
+
+#
+# ZIP_DEBUGINFO_FILES
+#
+ZIP_DEBUGINFO_FILES=yes
+
+AC_ARG_ENABLE([zip-debug-info],
+ [AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])],
+ [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
+)
+
+AC_MSG_CHECKING([if we should zip debug-info files])
+AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
+
+# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
+# use that...
+if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
+ ZIP_DEBUGINFO_FILES=1
+else
+ ZIP_DEBUGINFO_FILES=0
+fi
+
+AC_SUBST(ENABLE_DEBUG_SYMBOLS)
+AC_SUBST(ZIP_DEBUGINFO_FILES)
+AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
+AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
+])
diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
new file mode 100644
index 00000000000..e6364a6dc9d
--- /dev/null
+++ b/common/autoconf/libraries.m4
@@ -0,0 +1,642 @@
+#
+# 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([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" = 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
+ FREETYPE2_NOT_NEEDED=yes
+ # If the java runtime framework is disabled, then we need X11.
+ # This will be adjusted below.
+ 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
+ FREETYPE2_NOT_NEEDED=yes
+fi
+
+###############################################################################
+#
+# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
+# that uses this API.
+#
+AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
+ [disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
+ [MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
+
+USE_MACOSX_RUNTIME_SUPPORT=no
+AC_MSG_CHECKING([for explicit Java runtime support in the OS])
+if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
+ if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
+ MACOSX_RUNTIME_SUPPORT=yes
+ USE_MACOSX_RUNTIME_SUPPORT=yes
+ AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
+ else
+ AC_MSG_RESULT([yes, but explicitly disabled.])
+ fi
+else
+ AC_MSG_RESULT([no])
+fi
+
+if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
+ AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
+ X11_NOT_NEEDED=
+ FREETYPE2_NOT_NEEDED=
+ AC_MSG_RESULT([alsa pulse])
+fi
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_X11],
+[
+
+###############################################################################
+#
+# Check for X Windows
+#
+
+# 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$SYS_ROOT" != "x/"; then
+ if test "x$x_includes" = xNONE; then
+ if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
+ x_includes="$SYS_ROOT/usr/X11R6/include"
+ fi
+ fi
+ if test "x$x_libraries" = xNONE; then
+ if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
+ x_libraries="$SYS_ROOT/usr/X11R6/lib"
+ fi
+ fi
+fi
+
+# Now let autoconf do it's magic
+AC_PATH_X
+AC_PATH_XTRA
+
+if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
+ HELP_MSG_MISSING_DEPENDENCY([x11])
+ AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
+fi
+
+# Some of the old makefiles require a setting of OPENWIN_HOME
+# Since the X11R6 directory has disappeared on later Linuxes,
+# we need to probe for it.
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ if test -d "$SYS_ROOT/usr/X11R6"; then
+ OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
+ fi
+ if test -d "$SYS_ROOT/usr/include/X11"; then
+ OPENWIN_HOME="$SYS_ROOT/usr"
+ fi
+fi
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ OPENWIN_HOME="/usr/openwin"
+fi
+AC_SUBST(OPENWIN_HOME)
+
+
+#
+# Weird Sol10 something check...TODO change to try compile
+#
+if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
+ if test "`uname -r`" = "5.10"; then
+ if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
+ X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
+ fi
+ fi
+fi
+
+AC_LANG_PUSH(C)
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $X_CFLAGS"
+AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
+ [X11_A_OK=yes],
+ [X11_A_OK=no])
+CFLAGS="$OLD_CFLAGS"
+AC_LANG_POP(C)
+
+if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
+ HELP_MSG_MISSING_DEPENDENCY([x11])
+ AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG])
+fi
+
+AC_SUBST(X_CFLAGS)
+AC_SUBST(X_LIBS)
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_CUPS],
+[
+
+###############################################################################
+#
+# 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 libraries under PATH/lib and the headers under PATH/include)])])
+AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
+ [specify directory for the cups include files])])
+AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib],
+ [specify directory for the cups library])])
+
+if test "x$CUPS_NOT_NEEDED" = xyes; then
+ if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then
+ AC_MSG_WARN([cups not used, so --with-cups is ignored])
+ fi
+ CUPS_CFLAGS=
+ CUPS_LIBS=
+else
+ CUPS_FOUND=no
+
+ if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then
+ 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_LIBS="-L${with_cups}/lib -lcups"
+ 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${with_cups_lib}" != x; then
+ CUPS_LIBS="-L${with_cups_lib} -lcups"
+ 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=
+ CUPS_LIBS="-lcups"
+ 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 and libs])
+ if test -s /opt/sfw/cups/include/cups/cups.h; then
+ # An SFW package seems to be installed!
+ CUPS_FOUND=yes
+ CUPS_CFLAGS="-I/opt/sfw/cups/include"
+ CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
+ elif test -s /opt/csw/include/cups/cups.h; then
+ # A CSW package seems to be installed!
+ CUPS_FOUND=yes
+ CUPS_CFLAGS="-I/opt/csw/include"
+ CUPS_LIBS="-L/opt/csw/lib -lcups"
+ fi
+ 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)
+AC_SUBST(CUPS_LIBS)
+
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
+[
+
+###############################################################################
+#
+# The ubiquitous freetype2 library is used to render fonts.
+#
+AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
+ [specify prefix directory for the freetype2 package
+ (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+
+# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
+USING_SYSTEM_FT_LIB=false
+
+if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
+ if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
+ AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
+ fi
+ FREETYPE2_CFLAGS=
+ FREETYPE2_LIBS=
+ FREETYPE2_LIB_PATH=
+else
+ FREETYPE2_FOUND=no
+
+ if test "x$with_freetype" != x; then
+ SPACESAFE(with_freetype,[the path to freetype])
+ FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
+ fi
+ FREETYPE2_LIB_PATH="$with_freetype/lib"
+ FREETYPE2_CFLAGS="-I$with_freetype/include"
+ if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
+ FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
+ fi
+ FREETYPE2_FOUND=yes
+ if test "x$FREETYPE2_FOUND" = xyes; then
+ # Verify that the directories exist
+ if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
+ AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
+ fi
+ # List the contents of the lib.
+ FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
+ if test "x$FREETYPELIB" = x; then
+ AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib])
+ fi
+ # Check one h-file
+ if ! test -s "$with_freetype/include/ft2build.h"; then
+ AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
+ fi
+ fi
+ fi
+ if test "x$FREETYPE2_FOUND" = xno; then
+ BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
+ USING_SYSTEM_FT_LIB=true
+ fi
+ if test "x$FREETYPE2_FOUND" = xno; then
+ PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
+ USING_SYSTEM_FT_LIB=true
+ fi
+ if test "x$FREETYPE2_FOUND" = xno; then
+ AC_MSG_CHECKING([for freetype in some standard locations])
+
+ if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
+ DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
+ DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
+ fi
+ if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
+ DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
+ DEFAULT_FREETYPE_LIBS="-lfreetype"
+ fi
+
+ PREV_CXXCFLAGS="$CXXFLAGS"
+ PREV_LDFLAGS="$LDFLAGS"
+ CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
+ LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[#include
+ #include FT_FREETYPE_H
+ int main() { return 0; }
+ ]])],
+ [
+ # Yes, the default cflags and libs did the trick.
+ FREETYPE2_FOUND=yes
+ FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
+ FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
+ ],
+ [
+ FREETYPE2_FOUND=no
+ ])
+ CXXCFLAGS="$PREV_CXXFLAGS"
+ LDFLAGS="$PREV_LDFLAGS"
+ AC_MSG_RESULT([$FREETYPE2_FOUND])
+ USING_SYSTEM_FT_LIB=true
+ fi
+ if test "x$FREETYPE2_FOUND" = xno; then
+ HELP_MSG_MISSING_DEPENDENCY([freetype2])
+ AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
+ fi
+fi
+
+AC_SUBST(USING_SYSTEM_FT_LIB)
+AC_SUBST(FREETYPE2_LIB_PATH)
+AC_SUBST(FREETYPE2_CFLAGS)
+AC_SUBST(FREETYPE2_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 -lalsa"
+ 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} -lalsa"
+ ALSA_FOUND=yes
+ fi
+ if test "x$ALSA_FOUND" = xno; then
+ BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
+ fi
+ if test "x$ALSA_FOUND" = xno; then
+ PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
+ 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)
+
+])
+
+AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
+[
+
+###############################################################################
+#
+# Check for the jpeg library
+#
+
+USE_EXTERNAL_LIBJPEG=true
+AC_CHECK_LIB(jpeg, main, [],
+ [ USE_EXTERNAL_LIBJPEG=false
+ AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
+ ])
+AC_SUBST(USE_EXTERNAL_LIBJPEG)
+
+###############################################################################
+#
+# Check for the gif library
+#
+
+USE_EXTERNAL_LIBJPEG=true
+AC_CHECK_LIB(gif, main, [],
+ [ USE_EXTERNAL_LIBGIF=false
+ AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source])
+ ])
+AC_SUBST(USE_EXTERNAL_LIBGIF)
+
+###############################################################################
+#
+# 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
+if test "x$JDK_VARIANT" = "xembedded"; then
+ LIBZIP_CAN_USE_MMAP=false
+fi
+AC_SUBST(LIBZIP_CAN_USE_MMAP)
+
+###############################################################################
+#
+# Check if altzone exists in time.h
+#
+
+AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [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_ENABLE([static-link-stdc++], [AS_HELP_STRING([--disable-static-link-stdc++],
+ [disable static linking of the C++ runtime on Linux @<:@enabled@:>@])],,
+ [
+ enable_static_link_stdc__=yes
+ ])
+
+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_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then
+ AC_MSG_ERROR([I cannot link to stdc++! Neither dynamically nor statically.])
+ fi
+
+ if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then
+ AC_MSG_NOTICE([Static linking of libstdc++ was not possible reverting to dynamic linking.])
+ enable_static_link_stdc__=no
+ fi
+
+ if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then
+ AC_MSG_NOTICE([Dynamic linking of libstdc++ was not possible reverting to static linking.])
+ enable_static_link_stdc__=yes
+ fi
+
+ AC_MSG_CHECKING([how to link with libstdc++])
+ if test "x$enable_static_link_stdc__" = xyes; then
+ LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
+ LDCXX="$CC"
+ AC_MSG_RESULT([static])
+ else
+ LIBCXX="$LIBCXX -lstdc++"
+ LDCXX="$CXX"
+ AC_MSG_RESULT([dynamic])
+ fi
+fi
+
+# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
+ LIBCXX="/usr/lib${LEGACY_OPENJDK_TARGET_CPU3}/libCrun.so.1"
+fi
+
+# TODO better (platform agnostic) test
+if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
+ LIBCXX="-lstdc++"
+fi
+
+AC_SUBST(LIBCXX)
+
+])
diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4
index adfae47e3b8..5135c7c6a61 100644
--- a/common/autoconf/platform.m4
+++ b/common/autoconf/platform.m4
@@ -23,272 +23,59 @@
# questions.
#
-AC_DEFUN([CHECK_FIND_DELETE],
-[
- # Test if find supports -delete
- AC_MSG_CHECKING([if find supports -delete])
- FIND_DELETE="-delete"
-
- DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
-
- echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
-
- TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
- if test -f $DELETEDIR/TestIfFindSupportsDelete; then
- # No, it does not.
- rm $DELETEDIR/TestIfFindSupportsDelete
- FIND_DELETE="-exec rm \{\} \+"
- AC_MSG_RESULT([no])
- else
- AC_MSG_RESULT([yes])
- fi
- rmdir $DELETEDIR
-])
-
-AC_DEFUN([CHECK_NONEMPTY],
-[
- # Test that variable $1 is not empty.
- if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi
-])
-
-AC_DEFUN([ADD_JVM_ARG_IF_OK],
-[
- # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
- # If so, then append $1 to $2
- FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn`
- FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""`
- if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
- $2="[$]$2 $1"
- fi
-])
-
-AC_DEFUN([WHICHCMD],
-[
- # Translate "gcc -E" into "`which gcc` -E" ie
- # extract the full path to the binary and at the
- # same time maintain any arguments passed to it.
- # The command MUST exist in the path, or else!
- tmp="[$]$1"
- car="${tmp%% *}"
- tmp="[$]$1 EOL"
- cdr="${tmp#* }"
- # On windows we want paths without spaces.
- if test "x$BUILD_OS" = "xwindows"; then
- WHICHCMD_SPACESAFE(car)
- else
- # "which" is not portable, but is used here
- # because we know that the command exists!
- car=`which $car`
- fi
- if test "x$cdr" != xEOL; then
- $1="$car ${cdr% *}"
- else
- $1="$car"
- fi
-])
-
-AC_DEFUN([SPACESAFE],
-[
- # Fail with message $2 if var $1 contains a path with no spaces in it.
- # Unless on Windows, where we can rewrite the path.
- HAS_SPACE=`echo "[$]$1" | grep " "`
- if test "x$HAS_SPACE" != x; then
- if test "x$BUILD_OS" = "xwindows"; then
- $1=`$CYGPATH -s -m -a "[$]$1"`
- $1=`$CYGPATH -u "[$]$1"`
- else
- AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
- fi
- fi
-])
-
-AC_DEFUN([WHICHCMD_SPACESAFE],
-[
- # Translate long cygdrive or C:\sdfsf path
- # into a short mixed mode path that has no
- # spaces in it.
- tmp="[$]$1"
- if test "x$BUILD_OS" = "xwindows"; then
- tmp=`$CYGPATH -u "[$]$1"`
- tmp=`which "$tmp"`
- # If file exists with .exe appended, that's the real filename
- # and cygpath needs that to convert to short style path.
- if test -f "${tmp}.exe"; then
- tmp="${tmp}.exe"
- elif test -f "${tmp}.cmd"; then
- tmp="${tmp}.cmd"
- fi
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- fi
- $1="$tmp"
-])
-
-AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
-[
- if test "x$BUILD_OS" != xwindows; then
- # Follow a chain of symbolic links. Use readlink
- # where it exists, else fall back to horribly
- # complicated shell code.
- AC_PATH_PROG(READLINK, readlink)
- if test "x$READLINK_TESTED" != yes; then
- # On MacOSX there is a readlink tool with a different
- # purpose than the GNU readlink tool. Check the found readlink.
- ISGNU=`$READLINK --help 2>&1 | grep GNU`
- if test "x$ISGNU" = x; then
- # A readlink that we do not know how to use.
- # Are there other non-GNU readlinks out there?
- READLINK_TESTED=yes
- READLINK=
- fi
- fi
-
- if test "x$READLINK" != x; then
- $1=`$READLINK -f [$]$1`
- else
- STARTDIR=$PWD
- COUNTER=0
- DIR=`dirname [$]$1`
- FIL=`basename [$]$1`
- while test $COUNTER -lt 20; do
- ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
- if test "x$ISLINK" == x; then
- # This is not a symbolic link! We are done!
- break
- fi
- # The link might be relative! We have to use cd to travel safely.
- cd $DIR
- cd `dirname $ISLINK`
- DIR=`pwd`
- FIL=`basename $ISLINK`
- let COUNTER=COUNTER+1
- done
- cd $STARTDIR
- $1=$DIR/$FIL
- fi
- fi
-])
-
-AC_DEFUN([TESTFOR_PROG_CCACHE],
-[
- AC_ARG_ENABLE([ccache],
- [AS_HELP_STRING([--disable-ccache],
- [use ccache to speed up recompilations @<:@enabled@:>@])],
- [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
- if test "x$ENABLE_CCACHE" = xyes; then
- AC_PATH_PROG(CCACHE, ccache)
- else
- AC_MSG_CHECKING([for ccache])
- AC_MSG_RESULT([explicitly disabled])
- CCACHE=
- fi
- AC_SUBST(CCACHE)
-
- AC_ARG_WITH([ccache-dir],
- [AS_HELP_STRING([--with-ccache-dir],
- [where to store ccache files @<:@~/.ccache@:>@])])
-
- if test "x$with_ccache_dir" != x; then
- # When using a non home ccache directory, assume the use is to share ccache files
- # with other users. Thus change the umask.
- SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
- fi
- CCACHE_FOUND=""
- if test "x$CCACHE" != x; then
- SETUP_CCACHE_USAGE
- fi
-])
-
-AC_DEFUN([SETUP_CCACHE_USAGE],
-[
- if test "x$CCACHE" != x; then
- CCACHE_FOUND="true"
- # Only use ccache if it is 3.1.4 or later, which supports
- # precompiled headers.
- AC_MSG_CHECKING([if ccache supports precompiled headers])
- HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
- if test "x$HAS_GOOD_CCACHE" = x; then
- AC_MSG_RESULT([no, disabling ccache])
- CCACHE=
- else
- AC_MSG_RESULT([yes])
- AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
- PUSHED_FLAGS="$CXXFLAGS"
- CXXFLAGS="-fpch-preprocess $CXXFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
- CXXFLAGS="$PUSHED_FLAGS"
- if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
- CCACHE=
- fi
- fi
- fi
-
- if test "x$CCACHE" != x; then
- CCACHE_SLOPPINESS=time_macros
- CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
- CCACHE_FLAGS=-fpch-preprocess
-
- if test "x$SET_CCACHE_DIR" != x; then
- mkdir -p $CCACHE_DIR > /dev/null 2>&1
- chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
- fi
- fi
-])
-
-AC_DEFUN([EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS],
+AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS],
[
# Expects $host_os $host_cpu $build_os and $build_cpu
- # and $with_data_model to have been setup!
+ # and $with_target_bits to have been setup!
#
# Translate the standard triplet(quadruplet) definition
- # of the host/build system into
- # HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
- # HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
- # HOST_OS_API=posix,winapi
+ # of the target/build system into
+ # OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
+ # OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
+ # OPENJDK_TARGET_OS_API=posix,winapi
#
- # HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
- # HOST_CPU_ARCH=x86,sparc,pcc,arm
- # HOST_CPU_BITS=32,64
- # HOST_CPU_ENDIAN=big,little
+ # OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
+ # OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
+ # OPENJDK_TARGET_CPU_BITS=32,64
+ # OPENJDK_TARGET_CPU_ENDIAN=big,little
#
# The same values are setup for BUILD_...
#
# And the legacy variables, for controlling the old makefiles.
- # LEGACY_HOST_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
- # LEGACY_HOST_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
- # LEGACY_HOST_CPU3=sparcv9,amd64 (but only on solaris)
- # LEGACY_HOST_OS_API=solaris,windows
+ # LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
+ # LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
+ # LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris)
+ # LEGACY_OPENJDK_TARGET_OS_API=solaris,windows
#
# We also copy the autoconf trip/quadruplet
- # verbatim to HOST and BUILD
- AC_SUBST(HOST, ${host})
- AC_SUBST(BUILD, ${build})
+ # verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM
+ OPENJDK_TARGET_SYSTEM="$host"
+ OPENJDK_BUILD_SYSTEM="$build"
+ AC_SUBST(OPENJDK_TARGET_SYSTEM)
+ AC_SUBST(OPENJDK_BUILD_SYSTEM)
- EXTRACT_VARS_FROM_OS_TO(HOST,$host_os)
- EXTRACT_VARS_FROM_CPU_TO(HOST,$host_cpu)
+ PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_TARGET,$host_os)
+ PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_TARGET,$host_cpu)
- EXTRACT_VARS_FROM_OS_TO(BUILD,$build_os)
- EXTRACT_VARS_FROM_CPU_TO(BUILD,$build_cpu)
+ PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_BUILD,$build_os)
+ PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_BUILD,$build_cpu)
- if test "x$HOST_OS" != xsolaris; then
- LEGACY_HOST_CPU3=""
- LEGACY_BUILD_CPU3=""
+ if test "x$OPENJDK_TARGET_OS" != xsolaris; then
+ LEGACY_OPENJDK_TARGET_CPU3=""
+ LEGACY_OPENJDK_BUILD_CPU3=""
fi
- # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_HOST_CPU1) ...
- if test "x$HOST_OS" = xmacosx && test "x$HOST_CPU" = xx64; then
- LEGACY_HOST_CPU1="x86_64"
+ # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ...
+ if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then
+ LEGACY_OPENJDK_TARGET_CPU1="x86_64"
fi
- SET_RELEASE_FILE_OS_VALUES()
+ PLATFORM_SET_RELEASE_FILE_OS_VALUES
])
-AC_DEFUN([EXTRACT_VARS_FROM_OS_TO],
+AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS_TO],
[
- EXTRACT_VARS_FROM_OS($2)
+ PLATFORM_EXTRACT_VARS_FROM_OS($2)
$1_OS="$VAR_OS"
$1_OS_FAMILY="$VAR_OS_FAMILY"
$1_OS_API="$VAR_OS_API"
@@ -306,9 +93,9 @@ AC_DEFUN([EXTRACT_VARS_FROM_OS_TO],
AC_SUBST(LEGACY_$1_OS_API)
])
-AC_DEFUN([EXTRACT_VARS_FROM_CPU_TO],
+AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU_TO],
[
- EXTRACT_VARS_FROM_CPU($2)
+ PLATFORM_EXTRACT_VARS_FROM_CPU($2)
$1_CPU="$VAR_CPU"
$1_CPU_ARCH="$VAR_CPU_ARCH"
$1_CPU_BITS="$VAR_CPU_BITS"
@@ -339,12 +126,12 @@ AC_DEFUN([EXTRACT_VARS_FROM_CPU_TO],
LEGACY_$1_CPU3=amd64
fi
if test "x$$1_CPU" = xsparcv9; then
- LEGACY_$1_CPU3=sparvc9
+ LEGACY_$1_CPU3=sparcv9
fi
AC_SUBST(LEGACY_$1_CPU3)
])
-AC_DEFUN([EXTRACT_VARS_FROM_CPU],
+AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
[
# First argument is the cpu name from the trip/quad
case "$1" in
@@ -372,8 +159,8 @@ AC_DEFUN([EXTRACT_VARS_FROM_CPU],
arm*)
VAR_CPU=arm
VAR_CPU_ARCH=arm
- VAR_CPU_BITS=3264
- VAR_CPU_ENDIAN=big
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
VAR_LEGACY_CPU=arm
;;
mips)
@@ -401,7 +188,7 @@ AC_DEFUN([EXTRACT_VARS_FROM_CPU],
VAR_CPU=ppc64
VAR_CPU_ARCH=ppc
VAR_CPU_BITS=64
- VAR_CPU_ENDIAN=32
+ VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=ppc64
;;
sparc)
@@ -416,7 +203,7 @@ AC_DEFUN([EXTRACT_VARS_FROM_CPU],
VAR_CPU_ARCH=sparc
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
- VAR_LEGACY_CPU=sparc_sparcv9
+ VAR_LEGACY_CPU=sparcv9
;;
s390)
VAR_CPU=s390
@@ -452,21 +239,37 @@ AC_DEFUN([EXTRACT_VARS_FROM_CPU],
fi
fi
+ # on solaris x86...default seems to be 32-bit
+ if test "x$VAR_OS" = "xsolaris" && \
+ test "x$with_target_bits" = "x" && \
+ test "x$VAR_CPU_ARCH" = "xx86"
+ then
+ with_target_bits=32
+ fi
+
if test "x$VAR_CPU_ARCH" = "xx86"; then
- if test "x$with_data_model" = "x64"; then
+ if test "x$with_target_bits" = "x64"; then
VAR_CPU=x64
VAR_CPU_BITS=64
VAR_LEGACY_CPU=amd64
fi
- if test "x$with_data_model" = "x32"; then
+ if test "x$with_target_bits" = "x32"; then
VAR_CPU=ia32
VAR_CPU_BITS=32
VAR_LEGACY_CPU=i586
fi
fi
+
+ if test "x$VAR_CPU_ARCH" = "xsparc"; then
+ if test "x$with_target_bits" = "x64"; then
+ VAR_CPU=sparcv9
+ VAR_CPU_BITS=64
+ VAR_LEGACY_CPU=sparcv9
+ fi
+ fi
])
-AC_DEFUN([EXTRACT_VARS_FROM_OS],
+AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
[
case "$1" in
*linux*)
@@ -495,49 +298,26 @@ AC_DEFUN([EXTRACT_VARS_FROM_OS],
VAR_OS_FAMILY=windows
;;
*)
- AC_MSG_ERROR([unsupported host operating system $1])
+ AC_MSG_ERROR([unsupported operating system $1])
;;
esac
])
-AC_DEFUN([CHECK_COMPILER_VERSION],
+AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
[
- # Test the compilers that their versions are new enough.
-# AC_MSG_CHECKING([version of GCC])
- gcc_ver=`${CC} -dumpversion`
- gcc_major_ver=`echo ${gcc_ver}|cut -d'.' -f1`
- gcc_minor_ver=`echo ${gcc_ver}|cut -d'.' -f2`
-# AM_CONDITIONAL(GCC_OLD, test ! ${gcc_major_ver} -ge 4 -a ${gcc_minor_ver} -ge 3)
-# AC_MSG_RESULT([${gcc_ver} (major version ${gcc_major_ver}, minor version ${gcc_minor_ver})])
-])
-
-# Fixes paths on windows hosts to be mixed mode short.
-AC_DEFUN([WIN_FIX_PATH],
-[
- if test "x$BUILD_OS" = "xwindows"; then
- AC_PATH_PROG(CYGPATH, cygpath)
- tmp="[$]$1"
- # Convert to C:/ mixed style path without spaces.
- tmp=`$CYGPATH -s -m "$tmp"`
- $1="$tmp"
- fi
-])
-
-AC_DEFUN([SET_RELEASE_FILE_OS_VALUES],
-[
- if test "x$HOST_OS" = "xsolaris"; then
+ if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
REQUIRED_OS_NAME=SunOS
REQUIRED_OS_VERSION=5.10
fi
- if test "x$HOST_OS" = "xlinux"; then
+ if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
REQUIRED_OS_NAME=Linux
REQUIRED_OS_VERSION=2.6
fi
- if test "x$HOST_OS" = "xwindows"; then
+ if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
REQUIRED_OS_NAME=Windows
REQUIRED_OS_VERSION=5.1
fi
- if test "x$HOST_OS" = "xmacosx"; then
+ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
REQUIRED_OS_NAME=Darwin
REQUIRED_OS_VERSION=11.2
fi
@@ -545,3 +325,174 @@ AC_DEFUN([SET_RELEASE_FILE_OS_VALUES],
AC_SUBST(REQUIRED_OS_NAME)
AC_SUBST(REQUIRED_OS_VERSION)
])
+
+#%%% Build and target systems %%%
+AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
+[
+# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
+# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
+# product you're building. The target of this build is called "host". Since this is confusing to most people, we
+# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
+# to use the configure naming style.
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
+AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
+ [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
+
+if test "x$with_target_bits" != x && \
+ test "x$with_target_bits" != x32 && \
+ test "x$with_target_bits" != x64 ; then
+ AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!])
+fi
+# Translate the standard cpu-vendor-kernel-os quadruplets into
+# the new TARGET_.... and BUILD_... and the legacy names used by
+# the openjdk build.
+# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits
+PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS
+
+# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR.
+if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then
+ LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}"
+fi
+
+# Now the following vars are defined.
+# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
+# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
+# OPENJDK_TARGET_OS_API=posix,winapi
+#
+# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
+# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
+# OPENJDK_TARGET_CPU_BITS=32,64
+# OPENJDK_TARGET_CPU_ENDIAN=big,little
+#
+# There is also a:
+# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,.... # used to set the old var ARCH
+# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH
+# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
+# There was also a BUILDARCH that had i486,amd64,... but we do not use that
+# in the new build.
+# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots
+])
+
+AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
+[
+###############################################################################
+
+# Note that this is the build platform OS version!
+
+OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
+OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
+OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
+OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
+AC_SUBST(OS_VERSION_MAJOR)
+AC_SUBST(OS_VERSION_MINOR)
+AC_SUBST(OS_VERSION_MICRO)
+])
+
+AC_DEFUN_ONCE([PLATFORM_TEST_OPENJDK_TARGET_BITS],
+[
+###############################################################################
+#
+# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
+# (The JVM can use 32 or 64 bit Java pointers but that decision
+# is made at runtime.)
+#
+AC_LANG_PUSH(C++)
+OLD_CXXFLAGS="$CXXFLAGS"
+if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
+ CXXFLAGS="-m${with_target_bits} $CXXFLAGS"
+fi
+AC_CHECK_SIZEOF([int *], [1111])
+CXXFLAGS="$OLD_CXXFLAGS"
+AC_LANG_POP(C++)
+
+# keep track of c/cxx flags that we added outselves...
+# to prevent emitting warning...
+ADDED_CFLAGS=
+ADDED_CXXFLAGS=
+ADDED_LDFLAGS=
+
+if test "x$ac_cv_sizeof_int_p" = x0; then
+ # The test failed, lets pick the assumed value.
+ ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS
+else
+ ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
+
+ if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
+ ADDED_CFLAGS=" -m${with_target_bits}"
+ ADDED_CXXFLAGS=" -m${with_target_bits}"
+ ADDED_LDFLAGS=" -m${with_target_bits}"
+
+ CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
+ CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
+ LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
+
+ CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
+ LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
+ fi
+fi
+
+if test "x$ARCH_DATA_MODEL" = x64; then
+ A_LP64="LP64:="
+ ADD_LP64="-D_LP64=1"
+fi
+AC_MSG_CHECKING([for target address size])
+AC_MSG_RESULT([$ARCH_DATA_MODEL bits])
+AC_SUBST(LP64,$A_LP64)
+AC_SUBST(ARCH_DATA_MODEL)
+
+if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then
+ AC_MSG_ERROR([The tested number of bits in the target ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
+fi
+
+#
+# NOTE: check for -mstackrealign needs to be below potential addition of -m32
+#
+if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
+ # While waiting for a better solution, the current workaround is to use -mstackrealign.
+ CFLAGS="$CFLAGS -mstackrealign"
+ AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
+ [
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
+ ])
+fi
+])
+
+AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
+[
+###############################################################################
+#
+# Is the target little of big endian?
+#
+AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
+
+if test "x$ENDIAN" = xuniversal_endianness; then
+ AC_MSG_ERROR([Building with both big and little endianness is not supported])
+fi
+if test "x$ENDIAN" = xunknown; then
+ ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
+fi
+if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
+ AC_MSG_WARN([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
+ ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
+fi
+AC_SUBST(ENDIAN)
+])
+
+AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ISADIR],
+[
+###############################################################################
+#
+# Could someone enlighten this configure script with a comment about libCrun?
+#
+#
+])
diff --git a/common/autoconf/source-dirs.m4 b/common/autoconf/source-dirs.m4
new file mode 100644
index 00000000000..2eeb3831176
--- /dev/null
+++ b/common/autoconf/source-dirs.m4
@@ -0,0 +1,280 @@
+#
+# 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([SRCDIRS_SETUP_TOPDIRS],
+[
+
+# Where are the sources. Any of these can be overridden
+# using --with-override-corba and the likes.
+LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
+CORBA_TOPDIR="$SRC_ROOT/corba"
+JAXP_TOPDIR="$SRC_ROOT/jaxp"
+JAXWS_TOPDIR="$SRC_ROOT/jaxws"
+HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
+JDK_TOPDIR="$SRC_ROOT/jdk"
+AC_SUBST(LANGTOOLS_TOPDIR)
+AC_SUBST(CORBA_TOPDIR)
+AC_SUBST(JAXP_TOPDIR)
+AC_SUBST(JAXWS_TOPDIR)
+AC_SUBST(HOTSPOT_TOPDIR)
+AC_SUBST(JDK_TOPDIR)
+])
+
+
+AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
+[
+
+###############################################################################
+#
+# Pickup additional source for a component from outside of the source root
+# or override source for a component.
+#
+AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
+ [for each and every source directory, look in this additional source root for
+ the same directory; if it exists and have files in it, include it in the build])])
+
+AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
+ [for each and every source directory, look in this override source root for
+ the same directory; if it exists, use that directory instead and
+ ignore the directory in the original source root])])
+
+AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
+ [use the subdirs 'adds' and 'overrides' in the specified directory as
+ add-source-root and override-source-root])])
+
+if test "x$with_adds_and_overrides" != x; then
+ with_add_source_root="$with_adds_and_overrides/adds"
+ with_override_source_root="$with_adds_and_overrides/overrides"
+fi
+
+if test "x$with_add_source_root" != x; then
+ if ! test -d $with_add_source_root; then
+ AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
+ fi
+ CURDIR="$PWD"
+ cd "$with_add_source_root"
+ ADD_SRC_ROOT="`pwd`"
+ cd "$CURDIR"
+ # Verify that the addon source root does not have any root makefiles.
+ # If it does, then it is usually an error, prevent this.
+ if test -f $with_add_source_root/langtools/makefiles/Makefile || \
+ test -f $with_add_source_root/langtools/make/Makefile; then
+ AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
+ fi
+ if test -f $with_add_source_root/corba/makefiles/Makefile || \
+ test -f $with_add_source_root/corba/make/Makefile; then
+ AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
+ fi
+ if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
+ test -f $with_add_source_root/jaxp/make/Makefile; then
+ AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
+ fi
+ if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
+ test -f $with_add_source_root/jaxws/make/Makefile; then
+ AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
+ fi
+ if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
+ test -f $with_add_source_root/hotspot/make/Makefile; then
+ AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
+ fi
+ if test -f $with_add_source_root/jdk/makefiles/Makefile || \
+ test -f $with_add_source_root/jdk/make/Makefile; then
+ AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
+ fi
+fi
+AC_SUBST(ADD_SRC_ROOT)
+
+if test "x$with_override_source_root" != x; then
+ if ! test -d $with_override_source_root; then
+ AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
+ fi
+ CURDIR="$PWD"
+ cd "$with_override_source_root"
+ OVERRIDE_SRC_ROOT="`pwd`"
+ cd "$CURDIR"
+ if test -f $with_override_source_root/langtools/makefiles/Makefile || \
+ test -f $with_override_source_root/langtools/make/Makefile; then
+ AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
+ fi
+ if test -f $with_override_source_root/corba/makefiles/Makefile || \
+ test -f $with_override_source_root/corba/make/Makefile; then
+ AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
+ fi
+ if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
+ test -f $with_override_source_root/jaxp/make/Makefile; then
+ AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
+ fi
+ if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
+ test -f $with_override_source_root/jaxws/make/Makefile; then
+ AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
+ fi
+ if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
+ test -f $with_override_source_root/hotspot/make/Makefile; then
+ AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
+ fi
+ if test -f $with_override_source_root/jdk/makefiles/Makefile || \
+ test -f $with_override_source_root/jdk/make/Makefile; then
+ AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
+ fi
+fi
+AC_SUBST(OVERRIDE_SRC_ROOT)
+
+###############################################################################
+#
+# Override a repo completely, this is used for example when you have 3 small
+# development sandboxes of the langtools sources and want to avoid having 3 full
+# OpenJDK sources checked out on disk.
+#
+# Assuming that the 3 langtools sandboxes are located here:
+# /home/fredrik/sandbox1/langtools
+# /home/fredrik/sandbox2/langtools
+# /home/fredrik/sandbox3/langtools
+#
+# From the source root you create build subdirs manually:
+# mkdir -p build1 build2 build3
+# in each build directory run:
+# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
+# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
+# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
+#
+
+AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
+ [use this langtools dir for the build])])
+
+AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
+ [use this corba dir for the build])])
+
+AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
+ [use this jaxp dir for the build])])
+
+AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
+ [use this jaxws dir for the build])])
+
+AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
+ [use this hotspot dir for the build])])
+
+AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
+ [use this jdk dir for the build])])
+
+if test "x$with_override_langtools" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_langtools"
+ LANGTOOLS_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
+ AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
+ fi
+ AC_MSG_CHECKING([if langtools should be overridden])
+ AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
+fi
+if test "x$with_override_corba" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_corba"
+ CORBA_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
+ AC_MSG_ERROR([You have to override corba with a full corba repo!])
+ fi
+ AC_MSG_CHECKING([if corba should be overridden])
+ AC_MSG_RESULT([yes with $CORBA_TOPDIR])
+fi
+if test "x$with_override_jaxp" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_jaxp"
+ JAXP_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
+ AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
+ fi
+ AC_MSG_CHECKING([if jaxp should be overridden])
+ AC_MSG_RESULT([yes with $JAXP_TOPDIR])
+fi
+if test "x$with_override_jaxws" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_jaxws"
+ JAXWS_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
+ AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
+ fi
+ AC_MSG_CHECKING([if jaxws should be overridden])
+ AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
+fi
+if test "x$with_override_hotspot" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_hotspot"
+ HOTSPOT_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
+ ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
+ AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
+ fi
+ AC_MSG_CHECKING([if hotspot should be overridden])
+ AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
+fi
+if test "x$with_override_jdk" != x; then
+ CURDIR="$PWD"
+ cd "$with_override_jdk"
+ JDK_TOPDIR="`pwd`"
+ cd "$CURDIR"
+ if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
+ AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
+ fi
+ AC_MSG_CHECKING([if JDK should be overridden])
+ AC_MSG_RESULT([yes with $JDK_TOPDIR])
+fi
+
+])
+
+AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
+[
+LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools"
+CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba"
+JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
+JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
+HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
+JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
+IMAGES_OUTPUTDIR="$OUTPUT_ROOT/images"
+
+AC_SUBST(LANGTOOLS_OUTPUTDIR)
+AC_SUBST(CORBA_OUTPUTDIR)
+AC_SUBST(JAXP_OUTPUTDIR)
+AC_SUBST(JAXWS_OUTPUTDIR)
+AC_SUBST(HOTSPOT_OUTPUTDIR)
+AC_SUBST(JDK_OUTPUTDIR)
+AC_SUBST(IMAGES_OUTPUTDIR)
+
+LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
+CORBA_DIST="$OUTPUT_ROOT/corba/dist"
+JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
+JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
+HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
+
+AC_SUBST(LANGTOOLS_DIST)
+AC_SUBST(CORBA_DIST)
+AC_SUBST(JAXP_DIST)
+AC_SUBST(JAXWS_DIST)
+AC_SUBST(HOTSPOT_DIST)
+])
diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
index 28e248b019c..5c2e43c2fed 100644
--- a/common/autoconf/spec.gmk.in
+++ b/common/autoconf/spec.gmk.in
@@ -23,8 +23,8 @@
# questions.
#
-# Configured @DATE_WHEN_CONFIGURED@ to build for a @HOST@ system,
-# using ./configure @CONFIGURE_COMMAND_LINE@
+# Configured @DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
+# using 'configure @CONFIGURE_COMMAND_LINE@'
# When calling macros, the spaces between arguments are
# often semantically important! Sometimes we need to subst
@@ -67,48 +67,50 @@ SPEC:=@SPEC@
# The "human readable" name of this configuration
CONF_NAME:=@CONF_NAME@
-# The built jdk will run in this host system.
-HOST:=@HOST@
-HOST_OS:=@HOST_OS@
-HOST_OS_FAMILY:=@HOST_OS_FAMILY@
-HOST_OS_API:=@HOST_OS_API@
+# The built jdk will run in this target system.
+OPENJDK_TARGET_SYSTEM:=@OPENJDK_TARGET_SYSTEM@
-HOST_CPU:=@HOST_CPU@
-HOST_CPU_ARCH:=@HOST_CPU_ARCH@
-HOST_CPU_BITS:=@HOST_CPU_BITS@
-HOST_CPU_ENDIAN:=@HOST_CPU_ENDIAN@
+OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
+OPENJDK_TARGET_OS_FAMILY:=@OPENJDK_TARGET_OS_FAMILY@
+OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
+
+OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
+OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
+OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
+OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
# We are building on this build system.
-# When not cross-compiling, it is the same as the host.
-BUILD:=@BUILD@
-BUILD_OS:=@BUILD_OS@
-BUILD_OS_FAMILY:=@BUILD_OS_FAMILY@
-BUILD_OS_API:=@BUILD_OS_API@
+# When not cross-compiling, it is the same as the target.
+OPENJDK_BUILD_SYSTEM:=@OPENJDK_BUILD_SYSTEM@
-BUILD_CPU:=@BUILD_CPU@
-BUILD_CPU_ARCH:=@BUILD_CPU_ARCH@
-BUILD_CPU_BITS:=@BUILD_CPU_BITS@
-BUILD_CPU_ENDIAN:=@BUILD_CPU_ENDIAN@
+OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
+OPENJDK_BUILD_OS_FAMILY:=@OPENJDK_BUILD_OS_FAMILY@
+OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
+
+OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
+OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
+OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
+OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
# Legacy OS values for use in release file.
REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
-# Old name for HOST_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
-PLATFORM:=@HOST_OS@
-# Old name for HOST_CPU, uses i586 and amd64, instead of ia32 and x64.
-ARCH:=@LEGACY_HOST_CPU1@
+# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
+PLATFORM:=@OPENJDK_TARGET_OS@
+# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
+ARCH:=@LEGACY_OPENJDK_TARGET_CPU1@
# Yet another name for arch used for an extra subdir below the jvm lib.
# Uses i386 and amd64, instead of ia32 and x64.
-LIBARCH:=@LEGACY_HOST_CPU2@
+LIBARCH:=@LEGACY_OPENJDK_TARGET_CPU2@
# Use to switch between solaris and windows subdirs in the jdk.
-LEGACY_HOST_OS_API:=@LEGACY_HOST_OS_API@
+LEGACY_OPENJDK_TARGET_OS_API:=@LEGACY_OPENJDK_TARGET_OS_API@
# 32 or 64 bit
-ARCH_DATA_MODEL:=@HOST_CPU_BITS@
+ARCH_DATA_MODEL:=@OPENJDK_TARGET_CPU_BITS@
# Legacy setting for building for a 64 bit machine.
# If yes then this expands to _LP64:=1
@LP64@
-ENDIAN:=@HOST_CPU_ENDIAN@
+ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
@SET_OPENJDK@
JIGSAW:=@JIGSAW@
LIBM:=-lm
@@ -185,7 +187,6 @@ SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
# The java launcher uses the default.
# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
# on the java launcher command line.
-DEFAULT_JVM_VARIANT:=@DEFAULT_JVM_VARIANT@
JVM_VARIANTS:=@JVM_VARIANTS@
JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
@@ -202,53 +203,42 @@ DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@
# Legacy setting: -debug or -fastdebug
BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
-LANGTOOLS_OUTPUTDIR:=@OUTPUT_ROOT@/langtools
-LANGTOOLS_DIST:=@OUTPUT_ROOT@/langtools/dist
-LANGTOOLS_MAKE_ARGS:=@LANGTOOLS_MAKE_ARGS@
-
-CORBA_OUTPUTDIR:=@OUTPUT_ROOT@/corba
-CORBA_DIST:=@OUTPUT_ROOT@/corba/dist
-CORBA_MAKE_ARGS:=@CORBA_MAKE_ARGS@
-
-JAXP_OUTPUTDIR:=@OUTPUT_ROOT@/jaxp
-JAXP_DIST:=@OUTPUT_ROOT@/jaxp/dist
-JAXP_MAKE_ARGS:=@JAXP_MAKE_ARGS@
-
-JAXWS_OUTPUTDIR:=@OUTPUT_ROOT@/jaxws
-JAXWS_DIST:=@OUTPUT_ROOT@/jaxws/dist
-JAXWS_MAKE_ARGS:=@JAXWS_MAKE_ARGS@
-
-HOTSPOT_OUTPUTDIR:=@OUTPUT_ROOT@/hotspot
-HOTSPOT_DIST:=@OUTPUT_ROOT@/hotspot/dist
-HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@
+LANGTOOLS_OUTPUTDIR:=@LANGTOOLS_OUTPUTDIR@
+CORBA_OUTPUTDIR:=@CORBA_OUTPUTDIR@
+JAXP_OUTPUTDIR:=@JAXP_OUTPUTDIR@
+JAXWS_OUTPUTDIR:=@JAXWS_OUTPUTDIR@
+HOTSPOT_OUTPUTDIR:=@HOTSPOT_OUTPUTDIR@
# This where a working jvm is built.
# You can run $(JDK_OUTPUTDIR)/bin/java
# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
# yet the same as a default installation.
-HOTSPOT_IMPORT_PATH:=@OUTPUT_ROOT@/hotspot/dist
JDK_OUTPUTDIR:=@OUTPUT_ROOT@/jdk
-JDK_MAKE_ARGS:=@JDK_MAKE_ARGS@
# When you run "make install" it will create the standardized
# layout for the jdk and the jre inside the images subdir.
# Then it will copy the contents of the jdk into the installation
# directory.
IMAGES_OUTPUTDIR:=@OUTPUT_ROOT@/images
-IMAGES_MAKE_ARGS:=@IMAGES_MAKE_ARGS@
+
+LANGTOOLS_DIST:=@LANGTOOLS_DIST@
+CORBA_DIST:=@CORBA_DIST@
+JAXP_DIST:=@JAXP_DIST@
+JAXWS_DIST:=@JAXWS_DIST@
+HOTSPOT_DIST:=@HOTSPOT_DIST@
+
# Legacy variables used by Release.gmk
JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image
JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image
# Can be /sparcv9 or /amd64 on Solaris
-ISA_DIR:=@LEGACY_HOST_CPU3@
+ISA_DIR:=@LEGACY_OPENJDK_TARGET_CPU3@
BINDIR:=$(JDK_OUTPUTDIR)/bin$(ISA_DIR)
# The boot jdk to use
ALT_BOOTDIR:=@BOOT_JDK@
BOOT_JDK:=@BOOT_JDK@
BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
-BOOT_JAVAC_ARGS:=@BOOT_JAVAC_ARGS@
BOOT_RTJAR:=@BOOT_RTJAR@
BOOT_TOOLSJAR:=@BOOT_TOOLSJAR@
@@ -258,8 +248,6 @@ BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
# Information about the build system
NUM_CORES:=@NUM_CORES@
-# This is used from the libjvm build for C/C++ code.
-HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
# This is used from the jdk build for C/C++ code.
PARALLEL_COMPILE_JOBS:=@CONCURRENT_BUILD_JOBS@
# Store javac server synchronization files here, and
@@ -282,6 +270,8 @@ JAVAC_SERVER_CORES:=@JAVAC_SERVER_CORES@
JAVAC_USE_DEPS:=@JAVAC_USE_DEPS@
# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
JAVAC_USE_MODE:=@JAVAC_USE_MODE@
+# Enable not yet complete sjavac support.
+ENABLE_SJAVAC:=@ENABLE_SJAVAC@
# The OpenJDK makefiles should be changed to using the standard
# configure output ..._CFLAGS and ..._LIBS. In the meantime we
@@ -375,22 +365,24 @@ LDEXECXX:=@UNCYGDRIVE@ @LDEXECXX@
@DEFINE_CROSS_COMPILE_ARCH@
# The HOSTCC should really be named BUILDCC, ie build executable for
# the build platform. Same as CC when not cross compiling.
-HOSTCC:=@HOSTCC@
-HOSTCXX:=@HOSTCXX@
+HOSTCC:=@UNCYGDRIVE@ @HOSTCC@
+HOSTCXX:=@UNCYGDRIVE@ @HOSTCXX@
# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC
-HOST_CC:=@HOSTCC@
-NIO_CC:=@HOSTCC@
+HOST_CC:=@UNCYGDRIVE@ @HOSTCC@
+NIO_CC:=@UNCYGDRIVE@ @HOSTCC@
-AS:=@AS@
+HOST_LD:=@UNCYGDRIVE@ @HOSTLD@
+
+AS:=@UNCYGDRIVE@ @AS@
ASFLAGS:=@ASFLAGS@
# AR is used to create a static library (is ar in posix, lib.exe in winapi)
AR:=@UNCYGDRIVE@ @AR@
ARFLAGS:=@ARFLAGS@
-NM:=@NM@
-STRIP:=@STRIP@
-MCS:=@MCS@
+NM:=@UNCYGDRIVE@ @NM@
+STRIP:=@UNCYGDRIVE@ @STRIP@
+MCS:=@UNCYGDRIVE@ @MCS@
# Command to create a shared library
SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
@@ -404,6 +396,17 @@ SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
C_FLAG_REORDER:=@C_FLAG_REORDER@
CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
+#
+# Options for generating debug symbols
+ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
+CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
+CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
+ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@
+
+#
+# Compress (or not) jars
+COMPRESS_JARS=@COMPRESS_JARS@
+
# Options to linker to specify the library name.
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
@@ -507,23 +510,28 @@ READELF:=@READELF@
EXPR:=@EXPR@
FILE:=@FILE@
HG:=@HG@
+OBJCOPY:=@OBJCOPY@
UNCYGDRIVE:=@UNCYGDRIVE@
# Where the build output is stored for your convenience.
BUILD_LOG:=@BUILD_LOG@
+BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
# Build setup
ENABLE_DOCS:=@ENABLE_DOCS@
GENERATE_DOCS:=@ENABLE_DOCS@
DISABLE_NIMBUS:=@DISABLE_NIMBUS@
+ENABLE_JFR=@ENABLE_JFR@
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
+LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
CHECK_FOR_VCINSTALLDIR=@CHECK_FOR_VCINSTALLDIR@
MSVCRNN_DLL:=@MSVCR100DLL@
+
# ADD_SRCS takes a single argument with source roots
# and appends any corresponding source roots found
# below --with-add-source-root and below
@@ -551,6 +559,17 @@ else
OVR_SRCS:=
endif
+####################################################
+#
+# Legacy Hotspot support
+
+HOTSPOT_DIST:=@HOTSPOT_DIST@
+HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@
+# This is used from the libjvm build for C/C++ code.
+HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
+# Control wether Hotspot runs Queens test after building
+TEST_IN_BUILD=@TEST_IN_BUILD@
+
####################################################
#
# INSTALLATION
@@ -611,10 +630,9 @@ INSTALL_SYSCONFDIR=@sysconfdir@
# Name of Service Agent library
SALIB_NAME=@SALIB_NAME@
-# Control wether Hotspot runs Queens test after building
-TEST_IN_BUILD=@TEST_IN_BUILD@
-
OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
OS_VERSION_MINOR:=@OS_VERSION_MINOR@
OS_VERSION_MICRO:=@OS_VERSION_MICRO@
+# Include the closed-spec.gmk file if it exists
+-include $(dir @SPEC@)/closed-spec.gmk
diff --git a/common/autoconf/spec.sh.in b/common/autoconf/spec.sh.in
new file mode 100644
index 00000000000..a1d1c07ef1b
--- /dev/null
+++ b/common/autoconf/spec.sh.in
@@ -0,0 +1,527 @@
+#
+# 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.
+#
+
+# Configured"@DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
+# using 'configure @CONFIGURE_COMMAND_LINE@'
+
+# The "human readable" name of this configuration
+CONF_NAME="@CONF_NAME@"
+
+# The built jdk will run in this target system.
+OPENJDK_TARGET_SYSTEM="@OPENJDK_TARGET_SYSTEM@"
+
+OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
+OPENJDK_TARGET_OS_FAMILY="@OPENJDK_TARGET_OS_FAMILY@"
+OPENJDK_TARGET_OS_API="@OPENJDK_TARGET_OS_API@"
+
+OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
+OPENJDK_TARGET_CPU_ARCH="@OPENJDK_TARGET_CPU_ARCH@"
+OPENJDK_TARGET_CPU_BITS="@OPENJDK_TARGET_CPU_BITS@"
+OPENJDK_TARGET_CPU_ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
+
+# We are building on this build system.
+# When not cross-compiling, it is the same as the target.
+OPENJDK_BUILD_SYSTEM="@OPENJDK_BUILD_SYSTEM@"
+
+OPENJDK_BUILD_OS="@OPENJDK_BUILD_OS@"
+OPENJDK_BUILD_OS_FAMILY="@OPENJDK_BUILD_OS_FAMILY@"
+OPENJDK_BUILD_OS_API="@OPENJDK_BUILD_OS_API@"
+
+OPENJDK_BUILD_CPU="@OPENJDK_BUILD_CPU@"
+OPENJDK_BUILD_CPU_ARCH="@OPENJDK_BUILD_CPU_ARCH@"
+OPENJDK_BUILD_CPU_BITS="@OPENJDK_BUILD_CPU_BITS@"
+OPENJDK_BUILD_CPU_ENDIAN="@OPENJDK_BUILD_CPU_ENDIAN@"
+
+# Legacy OS values for use in release file.
+REQUIRED_OS_NAME="@REQUIRED_OS_NAME@"
+REQUIRED_OS_VERSION="@REQUIRED_OS_VERSION@"
+
+# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
+PLATFORM="@OPENJDK_TARGET_OS@"
+# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
+ARCH="@LEGACY_OPENJDK_TARGET_CPU1@"
+# Yet another name for arch used for an extra subdir below the jvm lib.
+# Uses i386 and amd64, instead of ia32 and x64.
+LIBARCH="@LEGACY_OPENJDK_TARGET_CPU2@"
+# Use to switch between solaris and windows subdirs in the jdk.
+LEGACY_OPENJDK_TARGET_OS_API="@LEGACY_OPENJDK_TARGET_OS_API@"
+# 32 or 64 bit
+ARCH_DATA_MODEL="@OPENJDK_TARGET_CPU_BITS@"
+# Legacy setting for building for a 64 bit machine.
+# If yes then this expands to _LP64=1
+ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
+JIGSAW="@JIGSAW@"
+LIBM=-lm
+LIBDL="@LIBDL@"
+
+# colon or semicolon
+PATH_SEP="@PATH_SEP@"
+
+# The sys root where standard headers and libraries are found.
+# Usually not needed since the configure script should have
+# taken it into account already when setting CFLAGS et al.
+SYS_ROOT="@SYS_ROOT@"
+
+# Paths to the source code
+SRC_ROOT="@SRC_ROOT@"
+ADD_SRC_ROOT="@ADD_SRC_ROOT@"
+OVERRIDE_SRC_ROOT="@OVERRIDE_SRC_ROOT@"
+TOPDIR="@SRC_ROOT@"
+OUTPUT_ROOT="@OUTPUT_ROOT@"
+JDK_MAKE_SHARED_DIR="@JDK_TOPDIR@"/makefiles/common/shared
+JDK_TOPDIR="@JDK_TOPDIR@"
+LANGTOOLS_TOPDIR="@LANGTOOLS_TOPDIR@"
+CORBA_TOPDIR="@CORBA_TOPDIR@"
+JAXP_TOPDIR="@JAXP_TOPDIR@"
+JAXWS_TOPDIR="@JAXWS_TOPDIR@"
+HOTSPOT_TOPDIR="@HOTSPOT_TOPDIR@"
+COPYRIGHT_YEAR="@COPYRIGHT_YEAR@"
+
+# Information gathered from the version.numbers file.
+JDK_MAJOR_VERSION="@JDK_MAJOR_VERSION@"
+JDK_MINOR_VERSION="@JDK_MINOR_VERSION@"
+JDK_MICRO_VERSION="@JDK_MICRO_VERSION@"
+JDK_UPDATE_VERSION="@JDK_UPDATE_VERSION@"
+JDK_BUILD_NUMBER="@JDK_BUILD_NUMBER@"
+MILESTONE="@MILESTONE@"
+LAUNCHER_NAME="@LAUNCHER_NAME@"
+PRODUCT_NAME="@PRODUCT_NAME@"
+PRODUCT_SUFFIX="@PRODUCT_SUFFIX@"
+JDK_RC_PLATFORM_NAME="@JDK_RC_PLATFORM_NAME@"
+COMPANY_NAME="@COMPANY_NAME@"
+
+# Different version strings generated from the above information.
+JDK_VERSION="@JDK_VERSION@"
+RUNTIME_NAME="@RUNTIME_NAME@"
+FULL_VERSION="@FULL_VERSION@"
+JRE_RELEASE_VERSION="@FULL_VERSION@"
+RELEASE="@RELEASE@"
+COOKED_BUILD_NUMBER="@COOKED_BUILD_NUMBER@"
+
+# How to compile the code: release, fastdebug or slowdebug
+DEBUG_LEVEL="@DEBUG_LEVEL@"
+
+# This is the JDK variant to build.
+# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
+JDK_VARIANT="@JDK_VARIANT@"
+
+# Should we compile support for running with a graphical UI? (ie headful)
+# Should we compile support for running without? (ie headless)
+SUPPORT_HEADFUL="@SUPPORT_HEADFUL@"
+SUPPORT_HEADLESS="@SUPPORT_HEADLESS@"
+
+# These are the libjvms that we want to build.
+# The java launcher uses the default.
+# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
+# on the java launcher command line.
+JVM_VARIANTS="@JVM_VARIANTS@"
+JVM_VARIANT_SERVER="@JVM_VARIANT_SERVER@"
+JVM_VARIANT_CLIENT="@JVM_VARIANT_CLIENT@"
+JVM_VARIANT_KERNEL="@JVM_VARIANT_KERNEL@"
+JVM_VARIANT_ZERO="@JVM_VARIANT_ZERO@"
+JVM_VARIANT_ZEROSHARK="@JVM_VARIANT_ZEROSHARK@"
+
+# Legacy setting: OPT or DBG
+VARIANT="@VARIANT@"
+# Legacy setting: true or false
+FASTDEBUG="@FASTDEBUG@"
+# Legacy setting: debugging the class files?
+DEBUG_CLASSFILES="@DEBUG_CLASSFILES@"
+# Legacy setting: -debug or -fastdebug
+BUILD_VARIANT_RELEASE="@BUILD_VARIANT_RELEASE@"
+
+LANGTOOLS_OUTPUTDIR="@LANGTOOLS_OUTPUTDIR@"
+CORBA_OUTPUTDIR="@CORBA_OUTPUTDIR@"
+JAXP_OUTPUTDIR="@JAXP_OUTPUTDIR@"
+JAXWS_OUTPUTDIR="@JAXWS_OUTPUTDIR@"
+HOTSPOT_OUTPUTDIR="@HOTSPOT_OUTPUTDIR@"
+
+# This where a working jvm is built.
+# You can run ${JDK_OUTPUTDIR}/bin/java
+# Though the layout of the contents of ${JDK_OUTPUTDIR} is not
+# yet the same as a default installation.
+JDK_OUTPUTDIR="@OUTPUT_ROOT@"/jdk
+
+# When you run "make install" it will create the standardized
+# layout for the jdk and the jre inside the images subdir.
+# Then it will copy the contents of the jdk into the installation
+# directory.
+IMAGES_OUTPUTDIR="@OUTPUT_ROOT@"/images
+
+LANGTOOLS_DIST="@LANGTOOLS_DIST@"
+CORBA_DIST="@CORBA_DIST@"
+JAXP_DIST="@JAXP_DIST@"
+JAXWS_DIST="@JAXWS_DIST@"
+HOTSPOT_DIST="@HOTSPOT_DIST@"
+
+# Legacy variables used by Release.gmk
+JDK_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2sdk-image
+JRE_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2re-image
+
+# Can be /sparcv9 or /amd64 on Solaris
+ISA_DIR="@LEGACY_OPENJDK_TARGET_CPU3@"
+BINDIR="${JDK_OUTPUTDIR}/bin${ISA_DIR}"
+
+# The boot jdk to use
+ALT_BOOTDIR="@BOOT_JDK@"
+BOOT_JDK="@BOOT_JDK@"
+BOOT_JDK_JVMARGS="@BOOT_JDK_JVMARGS@"
+BOOT_RTJAR="@BOOT_RTJAR@"
+BOOT_TOOLSJAR="@BOOT_TOOLSJAR@"
+
+# When compiling Java source to be run by the boot jdk
+# use these extra flags, eg -source 6 -target 6
+BOOT_JDK_SOURCETARGET="@BOOT_JDK_SOURCETARGET@"
+
+# Information about the build system
+NUM_CORES="@NUM_CORES@"
+# This is used from the jdk build for C/C++ code.
+PARALLEL_COMPILE_JOBS="@CONCURRENT_BUILD_JOBS@"
+# Store javac server synchronization files here, and
+# the javac server log files.
+JAVAC_SERVERS="@JAVAC_SERVERS@"
+# Should we use a javac server or not? The javac server gives
+# an enormous performance improvement since it reduces the
+# startup costs of javac and reuses as much as possible of intermediate
+# compilation work. But if we want to compile with a non-Java
+# javac compiler, like gcj. Then we cannot use javac server and
+# this variable is set to false.
+JAVAC_USE_REMOTE="@JAVAC_USE_REMOTE@"
+# We can block the Javac server to never use more cores than this.
+# This is not for performance reasons, but for memory usage, since each
+# core requires its own JavaCompiler. We might have 64 cores and 4GB
+# of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
+# Since there is no sharing of data between the JavaCompilers.
+JAVAC_SERVER_CORES="@JAVAC_SERVER_CORES@"
+# Should we use dependency tracking between Java packages? true or false.
+JAVAC_USE_DEPS="@JAVAC_USE_DEPS@"
+# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
+JAVAC_USE_MODE="@JAVAC_USE_MODE@"
+# Enable not yet complete sjavac support.
+ENABLE_SJAVAC="@ENABLE_SJAVAC@"
+
+# The OpenJDK makefiles should be changed to using the standard
+# configure output ..._CFLAGS and ..._LIBS. In the meantime we
+# extract the information here.
+FREETYPE2_LIB_PATH="@FREETYPE2_LIB_PATH@"
+FREETYPE2_LIBS="@FREETYPE2_LIBS@"
+FREETYPE2_CFLAGS="@FREETYPE2_CFLAGS@"
+USING_SYSTEM_FT_LIB="@USING_SYSTEM_FT_LIB@"
+CUPS_CFLAGS="@CUPS_CFLAGS@"
+
+PACKAGE_PATH="@PACKAGE_PATH@"
+
+# Source file for cacerts
+CACERTS_FILE="@CACERTS_FILE@"
+
+#MOZILLA_HEADERS_PATH=
+
+# Necessary additional compiler flags to compile X11
+X_CFLAGS="@X_CFLAGS@"
+X_LIBS="@X_LIBS@"
+OPENWIN_HOME="@OPENWIN_HOME@"
+
+# There are two types: CC or CL
+# CC is gcc and others behaving reasonably similar.
+# CL is cl.exe only.
+COMPILER_TYPE="@COMPILER_TYPE@"
+
+# Flags used for overriding the default opt setting for a C/C++ source file.
+C_O_FLAG_HIGHEST="@C_O_FLAG_HIGHEST@"
+C_O_FLAG_HI="@C_O_FLAG_HI@"
+C_O_FLAG_NORM="@C_O_FLAG_NORM@"
+C_O_FLAG_NONE="@C_O_FLAG_NONE@"
+CXX_O_FLAG_HIGHEST="@CXX_O_FLAG_HIGHEST@"
+CXX_O_FLAG_HI="@CXX_O_FLAG_HI@"
+CXX_O_FLAG_NORM="@CXX_O_FLAG_NORM@"
+CXX_O_FLAG_NONE="@CXX_O_FLAG_NONE@"
+
+C_FLAG_DEPS="@C_FLAG_DEPS@"
+CXX_FLAG_DEPS="@CXX_FLAG_DEPS@"
+
+# Tools that potentially need to be cross compilation aware.
+CC="@UNCYGDRIVE@ @CCACHE@ @CC@"
+
+# CFLAGS used to compile the jdk native libraries (C-code)
+CFLAGS_JDKLIB="@CFLAGS_JDKLIB@"
+CXXFLAGS_JDKLIB="@CXXFLAGS_JDKLIB@"
+
+# CFLAGS used to compile the jdk native launchers (C-code)
+CFLAGS_JDKEXE="@CFLAGS_JDKEXE@"
+CXXFLAGS_JDKEXE="@CXXFLAGS_JDKEXE@"
+
+CXX="@UNCYGDRIVE@ @CCACHE@ @CXX@"
+#CXXFLAGS="@CXXFLAGS@"
+
+OBJC="@CCACHE@ @OBJC@"
+#OBJCFLAGS="@OBJCFLAGS@"
+
+CPP="@UNCYGDRIVE@ @CPP@"
+#CPPFLAGS="@CPPFLAGS@"
+
+# The linker can be gcc or ld on posix systems, or link.exe on winapi systems.
+LD="@UNCYGDRIVE@ @LD@"
+
+# LDFLAGS used to link the jdk native libraries (C-code)
+LDFLAGS_JDKLIB="@LDFLAGS_JDKLIB@"
+LDFLAGS_JDKLIB_SUFFIX="@LDFLAGS_JDKLIB_SUFFIX@"
+
+# On some platforms the linker cannot be used to create executables, thus
+# the need for a separate LDEXE command.
+LDEXE="@UNCYGDRIVE@ @LDEXE@"
+
+# LDFLAGS used to link the jdk native launchers (C-code)
+LDFLAGS_JDKEXE="@LDFLAGS_JDKEXE@"
+LDFLAGS_JDKEXE_SUFFIX="@LDFLAGS_JDKEXE_SUFFIX@"
+
+# Sometimes a different linker is needed for c++ libs
+LDCXX="@UNCYGDRIVE@ @LDCXX@"
+# The flags for linking libstdc++ linker.
+LIBCXX="@LIBCXX@"
+
+# Sometimes a different linker is needed for c++ executables
+LDEXECXX="@UNCYGDRIVE@ @LDEXECXX@"
+
+# If cross compiling, then define CROSS_COMPILE_ARCH=cpu_name here.
+# The HOSTCC should really be named BUILDCC, ie build executable for
+# the build platform. Same as CC when not cross compiling.
+HOSTCC="@HOSTCC@"
+HOSTCXX="@HOSTCXX@"
+# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC
+HOST_CC="@HOSTCC@"
+NIO_CC="@HOSTCC@"
+
+AS="@AS@"
+ASFLAGS="@ASFLAGS@"
+
+# AR is used to create a static library (is ar in posix, lib.exe in winapi)
+AR="@UNCYGDRIVE@ @AR@"
+ARFLAGS="@ARFLAGS@"
+
+NM="@NM@"
+STRIP="@STRIP@"
+MCS="@MCS@"
+
+# Command to create a shared library
+SHARED_LIBRARY_FLAGS="@SHARED_LIBRARY_FLAGS@"
+
+# Options to linker to specify a mapfile.
+# (Note absence of = assignment, because we do not want to evaluate the macro body here)
+SET_SHARED_LIBRARY_MAPFILE="@SET_SHARED_LIBRARY_MAPFILE@"
+
+# Options for C/CXX compiler to be used if linking is performed
+# using reorder file
+C_FLAG_REORDER="@C_FLAG_REORDER@"
+CXX_FLAG_REORDER="@CXX_FLAG_REORDER@"
+
+#
+# Options for generating debug symbols
+ENABLE_DEBUG_SYMBOLS="@ENABLE_DEBUG_SYMBOLS@"
+CFLAGS_DEBUG_SYMBOLS="@CFLAGS_DEBUG_SYMBOLS@"
+CXXFLAGS_DEBUG_SYMBOLS="@CXXFLAGS_DEBUG_SYMBOLS@"
+ZIP_DEBUGINFO_FILES="@ZIP_DEBUGINFO_FILES@"
+
+# Options to linker to specify the library name.
+# (Note absence of = assignment, because we do not want to evaluate the macro body here)
+SET_SHARED_LIBRARY_NAME="@SET_SHARED_LIBRARY_NAME@"
+
+# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
+# (Note absence of = assignment, because we do not want to evaluate the macro body here)
+SET_SHARED_LIBRARY_ORIGIN="@SET_SHARED_LIBRARY_ORIGIN@"
+
+# Different OS:es have different ways of naming shared libraries.
+# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
+# "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
+# (Note absence of = assignment, because we do not want to evaluate the macro body here)
+SHARED_LIBRARY="@SHARED_LIBRARY@"
+STATIC_LIBRARY="@STATIC_LIBRARY@"
+LIBRARY_PREFIX="@LIBRARY_PREFIX@"
+SHARED_LIBRARY_SUFFIX="@SHARED_LIBRARY_SUFFIX@"
+STATIC_LIBRARY_SUFFIX="@STATIC_LIBRARY_SUFFIX@"
+EXE_SUFFIX="@EXE_SUFFIX@"
+OBJ_SUFFIX="@OBJ_SUFFIX@"
+
+POST_STRIP_CMD="@POST_STRIP_CMD@"
+POST_MCS_CMD='@POST_MCS_CMD@'
+
+JAVA_FLAGS="@BOOT_JDK_JVMARGS@"
+
+JAVA="@UNCYGDRIVE@ @JAVA@ ${JAVA_FLAGS}"
+
+JAVAC="@UNCYGDRIVE@ @JAVAC@"
+JAVAC_FLAGS="@JAVAC_FLAGS@"
+
+JAVAH="@UNCYGDRIVE@ @JAVAH@"
+
+JAR="@UNCYGDRIVE@ @JAR@"
+
+RMIC="@UNCYGDRIVE@ @RMIC@"
+
+NATIVE2ASCII="@UNCYGDRIVE@ @NATIVE2ASCII@"
+
+BOOT_JAR_CMD="@UNCYGDRIVE@ @JAR@"
+BOOT_JAR_JFLAGS=
+
+# Tools adhering to a minimal and common standard of posix compliance.
+AWK="@AWK@"
+CAT="@CAT@"
+CCACHE="@CCACHE@"
+# CD is going away, but remains to cater for legacy makefiles.
+CD=cd
+CHMOD="@CHMOD@"
+CP="@CP@"
+CPIO="@CPIO@"
+CUT="@CUT@"
+DATE="@DATE@"
+DF="@DF@"
+DIFF="@DIFF@"
+FIND="@FIND@"
+FIND_DELETE="@FIND_DELETE@"
+ECHO="@ECHO@"
+EGREP="@EGREP@"
+FGREP="@FGREP@"
+GREP="@GREP@"
+HEAD="@HEAD@"
+LS="@LS@"
+LN="@LN@"
+MKDIR="@MKDIR@"
+MV="@MV@"
+NAWK="@NAWK@"
+PRINTF="@PRINTF@"
+PWD="@THEPWDCMD@"
+RM="@RM@"
+SED="@SED@"
+SH="@SH@"
+SORT="@SORT@"
+TAR="@TAR@"
+TAIL="@TAIL@"
+TEE="@TEE@"
+TR="@TR@"
+TOUCH="@TOUCH@"
+WC="@WC@"
+XARGS="@XARGS@"
+ZIPEXE="@ZIP@"
+ZIP="@ZIP@"
+UNZIP="@UNZIP@"
+MT="@UNCYGDRIVE@ @MT@"
+RC="@UNCYGDRIVE@ @RC@"
+DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@"
+CYGPATH="@CYGPATH@"
+LDD="@LDD@"
+OTOOL="@OTOOL@"
+READELF="@READELF@"
+EXPR="@EXPR@"
+FILE="@FILE@"
+HG="@HG@"
+OBJCOPY="@OBJCOPY@"
+
+UNCYGDRIVE="@UNCYGDRIVE@"
+
+# Build setup
+ENABLE_DOCS="@ENABLE_DOCS@"
+GENERATE_DOCS="@ENABLE_DOCS@"
+DISABLE_NIMBUS="@DISABLE_NIMBUS@"
+USE_EXTERNAL_LIBJPEG="@USE_EXTERNAL_LIBJPEG@"
+USE_EXTERNAL_LIBGIF="@USE_EXTERNAL_LIBGIF@"
+USE_EXTERNAL_LIBZ="@USE_EXTERNAL_LIBZ@"
+LIBZIP_CAN_USE_MMAP="@LIBZIP_CAN_USE_MMAP@"
+CHECK_FOR_VCINSTALLDIR="@CHECK_FOR_VCINSTALLDIR@"
+MSVCRNN_DLL="@MSVCR100DLL@"
+
+
+####################################################
+#
+# Legacy Hotspot support
+
+HOTSPOT_DIST="@HOTSPOT_DIST@"
+HOTSPOT_MAKE_ARGS="@HOTSPOT_MAKE_ARGS@"
+# This is used from the libjvm build for C/C++ code.
+HOTSPOT_BUILD_JOBS="@CONCURRENT_BUILD_JOBS@"
+# Control wether Hotspot runs Queens test after building
+TEST_IN_BUILD="@TEST_IN_BUILD@"
+
+####################################################
+#
+# INSTALLATION
+#
+
+# Common prefix for all installed files. Defaults to /usr/local,
+# but /opt/myjdk is another common version.
+INSTALL_PREFIX="@prefix@"
+
+# Directories containing architecture-dependent files should be relative to exec_prefix
+INSTALL_EXECPREFIX="@exec_prefix@"
+
+# java,javac,javah,javap etc are installed here.
+INSTALL_BINDIR="@bindir@"
+
+# Read only architecture-independent data
+INSTALL_DATADIR="@datadir@"
+
+# Root of above.
+INSTALL_DATAROOTDIR="@datarootdir@"
+
+# Doc files, other than info and man.
+INSTALL_DOCDIR="@docdir@"
+
+# Html documentation
+INSTALL_HTMLDIR="@htmldir@"
+
+# Installing C header files, JNI headers for example.
+INSTALL_INCLUDEDIR="@includedir@"
+
+# Installing library files....
+INSTALL_INCLUDEDIR="@libdir@"
+
+# Executables that other programs run.
+INSTALL_LIBEXECDIR="@libexecdir@"
+
+# Locale-dependent but architecture-independent data, such as message catalogs.
+INSTALL_LOCALEDIR="@localedir@"
+
+# Modifiable single-machine data
+INSTALL_LOCALSTATEDIR="@localstatedir@"
+
+# Man pages
+INSTALL_MANDIR="@mandir@"
+
+# Modifiable architecture-independent data.
+INSTALL_SHAREDSTATEDIR="@sharedstatedir@"
+
+# Read-only single-machine data
+INSTALL_SYSCONFDIR="@sysconfdir@"
+
+
+####################################################
+#
+# Misc
+#
+
+# Name of Service Agent library
+SALIB_NAME="@SALIB_NAME@"
+
+OS_VERSION_MAJOR="@OS_VERSION_MAJOR@"
+OS_VERSION_MINOR="@OS_VERSION_MINOR@"
+OS_VERSION_MICRO="@OS_VERSION_MICRO@"
diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
new file mode 100644
index 00000000000..252e06af4d0
--- /dev/null
+++ b/common/autoconf/toolchain.m4
@@ -0,0 +1,908 @@
+#
+# 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([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
+[
+
+# Check if the VS env variables were setup prior to running configure.
+# If not, then find vcvarsall.bat and run it automatically, and integrate
+# the set env variables into the spec file.
+SETUPDEVENV="# No special vars"
+if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ # If vcvarsall.bat has been run, then VCINSTALLDIR is set.
+ if test "x$VCINSTALLDIR" != x; then
+ # No further setup is needed. The build will happen from this kind
+ # of shell.
+ SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt."
+ # Make sure to remind you, if you forget to run make from a cygwin bash shell
+ # that is spawned "bash -l" from a VS command prompt.
+ CHECK_FOR_VCINSTALLDIR=yes
+ AC_MSG_CHECKING([if you are running from within a VS command prompt])
+ AC_MSG_RESULT([yes])
+ else
+ # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it.
+ if test "x$VS100COMNTOOLS" != x; then
+ VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat`
+ SEARCH_ROOT="$VS100COMNTOOLS"
+ else
+ VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat`
+ SEARCH_ROOT="$PROGRAMFILES"
+ fi
+ VCPATH=`dirname "$VARSBAT"`
+ VCPATH=`cygpath -w "$VCPATH"`
+ if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then
+ AC_MSG_CHECKING([if we can find the VS installation])
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
+ fi
+ case "$LEGACY_OPENJDK_TARGET_CPU1" in
+ i?86)
+ VARSBAT_ARCH=x86
+ ;;
+ *)
+ VARSBAT_ARCH=$LEGACY_OPENJDK_TARGET_CPU1
+ ;;
+ esac
+ # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+ cd $OUTPUT_ROOT
+ bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH"
+ cd $CURDIR
+ if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then
+ AC_MSG_CHECKING([if we can extract the needed env variables])
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Could not succesfully extract the env variables needed for the VS setup. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
+ fi
+ # Now set all paths and other env variables. This will allow the rest of
+ # the configure script to find and run the compiler in the proper way.
+ . $OUTPUT_ROOT/localdevenv.sh
+ AC_MSG_CHECKING([if we can find the VS installation])
+ if test "x$VCINSTALLDIR" != x; then
+ AC_MSG_RESULT([$VCINSTALLDIR])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Could not find VS installation. Please install. If you are sure you have installed VS, then please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.])
+ fi
+ CHECK_FOR_VCINSTALLDIR=no
+ SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk"
+
+ AC_MSG_CHECKING([for msvcr100.dll])
+ AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll],
+ [copy this msvcr100.dll into the built JDK])])
+ if test "x$with_msvcr100dll" != x; then
+ MSVCR100DLL="$with_msvcr100dll"
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1`
+ else
+ MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
+ if test "x$MSVCR100DLL" = x; then
+ MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1`
+ fi
+ fi
+ fi
+ if test "x$MSVCR100DLL" = x; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Could not find msvcr100.dll !])
+ fi
+ AC_MSG_RESULT([$MSVCR100DLL])
+ SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll])
+ fi
+fi
+AC_SUBST(SETUPDEVENV)
+AC_SUBST(CHECK_FOR_VCINSTALLDIR)
+AC_SUBST(MSVCR100DLL)
+])
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS],
+[
+###############################################################################
+#
+# Configure the development tool paths and potential sysroot.
+#
+AC_LANG(C++)
+DEVKIT=
+SYS_ROOT=/
+AC_SUBST(SYS_ROOT)
+
+# The option used to specify the target .o,.a or .so file.
+# When compiling, how to specify the to be created object file.
+CC_OUT_OPTION='-o$(SPACE)'
+# When linking, how to specify the to be created executable.
+EXE_OUT_OPTION='-o$(SPACE)'
+# When linking, how to specify the to be created dynamically linkable library.
+LD_OUT_OPTION='-o$(SPACE)'
+# When archiving, how to specify the to be create static archive for object files.
+AR_OUT_OPTION='rcs$(SPACE)'
+AC_SUBST(CC_OUT_OPTION)
+AC_SUBST(EXE_OUT_OPTION)
+AC_SUBST(LD_OUT_OPTION)
+AC_SUBST(AR_OUT_OPTION)
+])
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_PATHS],
+[
+# If --build AND --host is set, then the configure script will find any
+# cross compilation tools in the PATH. Cross compilation tools
+# follows the cross compilation standard where they are prefixed with ${host}.
+# For example the binary i686-sun-solaris2.10-gcc
+# will cross compile for i686-sun-solaris2.10
+# If neither of build and host is not set, then build=host and the
+# default compiler found in the path will be used.
+# Setting only --host, does not seem to be really supported.
+# Please set both --build and --host if you want to cross compile.
+
+DEFINE_CROSS_COMPILE_ARCH=""
+HOSTCC=""
+HOSTCXX=""
+HOSTLD=""
+AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
+AC_MSG_CHECKING([if this is a cross compile])
+if test "x$OPENJDK_BUILD_SYSTEM" != "x$OPENJDK_TARGET_SYSTEM"; then
+ AC_MSG_RESULT([yes, from $OPENJDK_BUILD_SYSTEM to $OPENJDK_TARGET_SYSTEM])
+ # We have detected a cross compile!
+ DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_OPENJDK_TARGET_CPU1"
+ # Now we to find a C/C++ compiler that can build executables for the build
+ # platform. We can't use the AC_PROG_CC macro, since it can only be used
+ # once.
+ AC_PATH_PROGS(HOSTCC, [cl cc gcc])
+ WHICHCMD(HOSTCC)
+ AC_PATH_PROGS(HOSTCXX, [cl CC g++])
+ WHICHCMD(HOSTCXX)
+ AC_PATH_PROG(HOSTLD, ld)
+ WHICHCMD(HOSTLD)
+ # Building for the build platform should be easy. Therefore
+ # we do not need any linkers or assemblers etc.
+else
+ AC_MSG_RESULT([no])
+fi
+
+# You can force the sys-root if the sys-root encoded into the cross compiler tools
+# is not correct.
+AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
+ [pass this sys-root to the compilers and linker (useful if the sys-root encoded in
+ the cross compiler tools is incorrect)])])
+
+if test "x$with_sys_root" != x; then
+ SYS_ROOT=$with_sys_root
+fi
+
+# If a devkit is found on the builddeps server, then prepend its path to the
+# PATH variable. If there are cross compilers available in the devkit, these
+# will be found by AC_PROG_CC et al.
+BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
+ [# Found devkit
+ PATH="$DEVKIT/bin:$PATH"
+ SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
+ if test "x$x_includes" = "xNONE"; then
+ x_includes="$SYS_ROOT/usr/include/X11"
+ fi
+ if test "x$x_libraries" = "xNONE"; then
+ x_libraries="$SYS_ROOT/usr/lib"
+ fi
+ ],
+ [])
+
+if test "x$SYS_ROOT" != "x/" ; then
+ CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
+ CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
+ OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
+ OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
+ CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
+ LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
+fi
+
+# Store the CFLAGS etal passed to the configure script.
+ORG_CFLAGS="$CFLAGS"
+ORG_CXXFLAGS="$CXXFLAGS"
+ORG_OBJCFLAGS="$OBJCFLAGS"
+
+AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
+ [search this directory for compilers and tools])], [TOOLS_DIR=$with_tools_dir])
+
+AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
+ [use this directory as base for tools-dir and sys-root])], [
+ if test "x$with_sys_root" != x; then
+ AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
+ fi
+ if test "x$with_tools_dir" != x; then
+ AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
+ fi
+ TOOLS_DIR=$with_devkit/bin
+ SYS_ROOT=$with_devkit/$host_alias/libc
+ ])
+
+# autoconf magic only relies on PATH, so update it if tools dir is specified
+OLD_PATH="$PATH"
+if test "x$TOOLS_DIR" != x; then
+ PATH=$TOOLS_DIR:$PATH
+fi
+
+# gcc is almost always present, but on Windows we
+# prefer cl.exe and on Solaris we prefer CC.
+# Thus test for them in this order.
+AC_PROG_CC([cl cc gcc])
+if test "x$CC" = x; then
+ HELP_MSG_MISSING_DEPENDENCY([devkit])
+ AC_MSG_ERROR([Could not find a compiler. $HELP_MSG])
+fi
+if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ # Do not use cc on MacOSX use gcc instead.
+ CC="gcc"
+fi
+WHICHCMD(CC)
+
+AC_PROG_CXX([cl CC g++])
+if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ # The found CC, even though it seems to be a g++ derivate, cannot compile
+ # c++ code. Override.
+ CXX="g++"
+fi
+WHICHCMD(CXX)
+
+if test "x$CXX" = x || test "x$CC" = x; then
+ HELP_MSG_MISSING_DEPENDENCY([devkit])
+ AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ])
+fi
+
+if test "x$OPENJDK_BUILD_OS" != xwindows; then
+ AC_PROG_OBJC
+ WHICHCMD(OBJC)
+else
+ OBJC=
+fi
+
+# Restore the flags to the user specified values.
+# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
+CFLAGS="$ORG_CFLAGS"
+CXXFLAGS="$ORG_CXXFLAGS"
+OBJCFLAGS="$ORG_OBJCFLAGS"
+
+# If we are not cross compiling, use the same compilers for
+# building the build platform executables.
+if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then
+ HOSTCC="$CC"
+ HOSTCXX="$CXX"
+fi
+
+AC_CHECK_TOOL(LD, ld)
+WHICHCMD(LD)
+LD="$CC"
+LDEXE="$CC"
+LDCXX="$CXX"
+LDEXECXX="$CXX"
+# LDEXE is the linker to use, when creating executables.
+AC_SUBST(LDEXE)
+# Linking C++ libraries.
+AC_SUBST(LDCXX)
+# Linking C++ executables.
+AC_SUBST(LDEXECXX)
+
+AC_CHECK_TOOL(AR, ar)
+WHICHCMD(AR)
+if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ ARFLAGS="-r"
+else
+ ARFLAGS=""
+fi
+AC_SUBST(ARFLAGS)
+
+COMPILER_NAME=gcc
+COMPILER_TYPE=CC
+AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [
+ # For now, assume that we are always compiling using cl.exe.
+ CC_OUT_OPTION=-Fo
+ EXE_OUT_OPTION=-out:
+ LD_OUT_OPTION=-out:
+ AR_OUT_OPTION=-out:
+ # On Windows, reject /usr/bin/link, which is a cygwin
+ # program for something completely different.
+ AC_CHECK_PROG([WINLD], [link],[link],,, [/usr/bin/link])
+ # Since we must ignore the first found link, WINLD will contain
+ # the full path to the link.exe program.
+ WHICHCMD_SPACESAFE([WINLD])
+ LD="$WINLD"
+ LDEXE="$WINLD"
+ LDCXX="$WINLD"
+ LDEXECXX="$WINLD"
+ # Set HOSTLD to same as LD until we fully support cross compilation
+ # on windows.
+ HOSTLD="$WINLD"
+
+ AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
+ WHICHCMD_SPACESAFE([MT])
+ # The resource compiler
+ AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
+ WHICHCMD_SPACESAFE([RC])
+
+ RC_FLAGS="-nologo /l 0x409 /r"
+ AS_IF([test "x$VARIANT" = xOPT], [
+ RC_FLAGS="$RC_FLAGS -d NDEBUG"
+ ])
+ JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
+ AS_IF([test "x$JDK_UPDATE_VERSION" = x], [
+ JDK_UPDATE_VERSION_NOTNULL=0
+ ])
+ RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
+ RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
+
+ # lib.exe is used to create static libraries.
+ AC_CHECK_PROG([WINAR], [lib],[lib],,,)
+ WHICHCMD_SPACESAFE([WINAR])
+ AR="$WINAR"
+ ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
+
+ AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
+ WHICHCMD_SPACESAFE([DUMPBIN])
+
+ COMPILER_TYPE=CL
+ CCXXFLAGS="$CCXXFLAGS -nologo"
+])
+AC_SUBST(RC_FLAGS)
+AC_SUBST(COMPILER_TYPE)
+
+AC_PROG_CPP
+WHICHCMD(CPP)
+
+AC_PROG_CXXCPP
+WHICHCMD(CXXCPP)
+
+# for solaris we really need solaris tools, and not gnu equivalent
+# these seems to normally reside in /usr/ccs/bin so add that to path before
+# starting to probe
+#
+# NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
+# so that it can be overriden --with-tools-dir
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
+fi
+
+# Find the right assembler.
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ AC_PATH_PROG(AS, as)
+ WHICHCMD(AS)
+ ASFLAGS=" "
+else
+ AS="$CC -c"
+ ASFLAGS=" "
+fi
+AC_SUBST(AS)
+AC_SUBST(ASFLAGS)
+
+if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ AC_PATH_PROG(NM, nm)
+ WHICHCMD(NM)
+ AC_PATH_PROG(STRIP, strip)
+ WHICHCMD(STRIP)
+ AC_PATH_PROG(MCS, mcs)
+ WHICHCMD(MCS)
+else
+ AC_CHECK_TOOL(NM, nm)
+ WHICHCMD(NM)
+ AC_CHECK_TOOL(STRIP, strip)
+ WHICHCMD(STRIP)
+fi
+
+###
+#
+# Check for objcopy
+#
+# but search for gobjcopy first...
+# since I on solaris found a broken objcopy...buhh
+#
+AC_PATH_TOOL(OBJCOPY, gobjcopy)
+if test "x$OBJCOPY" = x; then
+ AC_PATH_TOOL(OBJCOPY, objcopy)
+fi
+
+# Restore old path without tools dir
+PATH="$OLD_PATH"
+])
+
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS],
+[
+
+###############################################################################
+#
+# How to compile shared libraries.
+#
+
+if test "x$GCC" = xyes; then
+ COMPILER_NAME=gcc
+ PICFLAG="-fPIC"
+ LIBRARY_PREFIX=lib
+ SHARED_LIBRARY='lib[$]1.so'
+ STATIC_LIBRARY='lib[$]1.a'
+ SHARED_LIBRARY_FLAGS="-shared"
+ SHARED_LIBRARY_SUFFIX='.so'
+ STATIC_LIBRARY_SUFFIX='.a'
+ OBJ_SUFFIX='.o'
+ EXE_SUFFIX=''
+ SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1'
+ SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1'
+ C_FLAG_REORDER=''
+ CXX_FLAG_REORDER=''
+ SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/[$]1'
+ LD="$CC"
+ LDEXE="$CC"
+ LDCXX="$CXX"
+ LDEXECXX="$CXX"
+ POST_STRIP_CMD="$STRIP -g"
+ if test "x$JDK_VARIANT" = xembedded; then
+ POST_STRIP_CMD="$STRIP --strip-unneeded"
+ fi
+
+ # Linking is different on MacOSX
+ if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ # Might change in the future to clang.
+ COMPILER_NAME=gcc
+ SHARED_LIBRARY='lib[$]1.dylib'
+ SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
+ SHARED_LIBRARY_SUFFIX='.dylib'
+ EXE_SUFFIX=''
+ SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
+ SET_SHARED_LIBRARY_MAPFILE=''
+ SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
+ POST_STRIP_CMD="$STRIP -S"
+ fi
+else
+ if test "x$OPENJDK_BUILD_OS" = xsolaris; then
+ # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
+ COMPILER_NAME=ossc
+ PICFLAG="-KPIC"
+ LIBRARY_PREFIX=lib
+ SHARED_LIBRARY='lib[$]1.so'
+ STATIC_LIBRARY='lib[$]1.a'
+ SHARED_LIBRARY_FLAGS="-z defs -xildoff -ztext -G"
+ SHARED_LIBRARY_SUFFIX='.so'
+ STATIC_LIBRARY_SUFFIX='.a'
+ OBJ_SUFFIX='.o'
+ EXE_SUFFIX=''
+ SET_SHARED_LIBRARY_NAME=''
+ SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
+ C_FLAG_REORDER='-xF'
+ CXX_FLAG_REORDER='-xF'
+ SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/[$]1'
+ CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
+ CFLAGS_JDKLIB_EXTRA='-xstrconst'
+ POST_STRIP_CMD="$STRIP -x"
+ POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
+ fi
+ if test "x$OPENJDK_BUILD_OS" = xwindows; then
+ # If it is not gcc, then assume it is the MS Visual Studio compiler
+ COMPILER_NAME=cl
+ PICFLAG=""
+ LIBRARY_PREFIX=
+ SHARED_LIBRARY='[$]1.dll'
+ STATIC_LIBRARY='[$]1.lib'
+ SHARED_LIBRARY_FLAGS="-LD"
+ SHARED_LIBRARY_SUFFIX='.dll'
+ STATIC_LIBRARY_SUFFIX='.lib'
+ OBJ_SUFFIX='.obj'
+ EXE_SUFFIX='.exe'
+ SET_SHARED_LIBRARY_NAME=''
+ SET_SHARED_LIBRARY_MAPFILE=''
+ SET_SHARED_LIBRARY_ORIGIN=''
+ fi
+fi
+
+AC_SUBST(OBJ_SUFFIX)
+AC_SUBST(SHARED_LIBRARY)
+AC_SUBST(STATIC_LIBRARY)
+AC_SUBST(LIBRARY_PREFIX)
+AC_SUBST(SHARED_LIBRARY_SUFFIX)
+AC_SUBST(STATIC_LIBRARY_SUFFIX)
+AC_SUBST(EXE_SUFFIX)
+AC_SUBST(SHARED_LIBRARY_FLAGS)
+AC_SUBST(SET_SHARED_LIBRARY_NAME)
+AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
+AC_SUBST(C_FLAG_REORDER)
+AC_SUBST(CXX_FLAG_REORDER)
+AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
+AC_SUBST(POST_STRIP_CMD)
+AC_SUBST(POST_MCS_CMD)
+
+# The (cross) compiler is now configured, we can now test capabilities
+# of the target platform.
+])
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
+[
+
+###############################################################################
+#
+# Setup the opt flags for different compilers
+# and different operating systems.
+#
+C_FLAG_DEPS="-MMD -MF"
+CXX_FLAG_DEPS="-MMD -MF"
+
+case $COMPILER_TYPE in
+ CC )
+ D_FLAG="-g"
+ case $COMPILER_NAME in
+ gcc )
+ case $OPENJDK_TARGET_OS in
+ macosx )
+ # On MacOSX we optimize for size, something
+ # we should do for all platforms?
+ C_O_FLAG_HI="-Os"
+ C_O_FLAG_NORM="-Os"
+ C_O_FLAG_NONE=""
+ ;;
+ *)
+ C_O_FLAG_HI="-O3"
+ C_O_FLAG_NORM="-O2"
+ C_O_FLAG_NONE="-O0"
+ CFLAGS_DEBUG_SYMBOLS="-g"
+ CXXFLAGS_DEBUG_SYMBOLS="-g"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
+ CFLAGS_DEBUG_SYMBOLS="-g1"
+ CXXFLAGS_DEBUG_SYMBOLSG="-g1"
+ fi
+ ;;
+ esac
+ CXX_O_FLAG_HI="$C_O_FLAG_HI"
+ CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+ CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+ ;;
+ ossc )
+ #
+ # Forte has different names for this with their C++ compiler...
+ #
+ C_FLAG_DEPS="-xMMD -xMF"
+ CXX_FLAG_DEPS="-xMMD -xMF"
+
+# Extra options used with HIGHEST
+#
+# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
+# done with care, there are some assumptions below that need to
+# be understood about the use of pointers, and IEEE behavior.
+#
+# Use non-standard floating point mode (not IEEE 754)
+CC_HIGHEST="$CC_HIGHEST -fns"
+# Do some simplification of floating point arithmetic (not IEEE 754)
+CC_HIGHEST="$CC_HIGHEST -fsimple"
+# Use single precision floating point with 'float'
+CC_HIGHEST="$CC_HIGHEST -fsingle"
+# Assume memory references via basic pointer types do not alias
+# (Source with excessing pointer casting and data access with mixed
+# pointer types are not recommended)
+CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
+# Use intrinsic or inline versions for math/std functions
+# (If you expect perfect errno behavior, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
+# Loop data dependency optimizations (need -xO3 or higher)
+CC_HIGHEST="$CC_HIGHEST -xdepend"
+# Pointer parameters to functions do not overlap
+# (Similar to -xalias_level=basic usage, but less obvious sometimes.
+# If you pass in multiple pointers to the same data, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xrestrict"
+# Inline some library routines
+# (If you expect perfect errno behavior, do not use this)
+CC_HIGHEST="$CC_HIGHEST -xlibmil"
+# Use optimized math routines
+# (If you expect perfect errno behavior, do not use this)
+# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
+#CC_HIGHEST="$CC_HIGHEST -xlibmopt"
+
+ case $LEGACY_OPENJDK_TARGET_CPU1 in
+ i586)
+ C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium"
+ C_O_FLAG_HI="-xO4 -Wu,-O4~yz"
+ C_O_FLAG_NORM="-xO2 -Wu,-O2~yz"
+ C_O_FLAG_NONE=""
+ CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium"
+ CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz"
+ CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz"
+ CXX_O_FLAG_NONE=""
+ ;;
+ sparc)
+ CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
+ CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
+ CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+ CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
+ C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+ C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+ C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
+ C_O_FLAG_NONE=""
+ CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
+ CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+ CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
+ CXX_O_FLAG_NONE=""
+ ;;
+ esac
+
+ CFLAGS_DEBUG_SYMBOLS="-g -xs"
+ CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
+ esac
+ ;;
+ CL )
+ D_FLAG=
+ C_O_FLAG_HI="-O2"
+ C_O_FLAG_NORM="-O1"
+ C_O_FLAG_NONE="-Od"
+ CXX_O_FLAG_HI="$C_O_FLAG_HI"
+ CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
+ CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
+ ;;
+esac
+
+if test -z "$C_O_FLAG_HIGHEST"; then
+ C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
+fi
+
+if test -z "$CXX_O_FLAG_HIGHEST"; then
+ CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
+fi
+
+AC_SUBST(C_O_FLAG_HIGHEST)
+AC_SUBST(C_O_FLAG_HI)
+AC_SUBST(C_O_FLAG_NORM)
+AC_SUBST(C_O_FLAG_NONE)
+AC_SUBST(CXX_O_FLAG_HIGHEST)
+AC_SUBST(CXX_O_FLAG_HI)
+AC_SUBST(CXX_O_FLAG_NORM)
+AC_SUBST(CXX_O_FLAG_NONE)
+AC_SUBST(C_FLAG_DEPS)
+AC_SUBST(CXX_FLAG_DEPS)
+])
+
+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
+[
+
+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"
+
+###############################################################################
+#
+# Now setup the CFLAGS and LDFLAGS for the JDK build.
+# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
+#
+case $COMPILER_NAME in
+ gcc )
+ CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
+ -pipe \
+ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+ case $OPENJDK_TARGET_CPU_ARCH in
+ arm )
+ # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
+ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+ ;;
+ ppc )
+ # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
+ ;;
+ * )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
+ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+ ;;
+ esac
+ ;;
+ ossc )
+ CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib"
+ CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX"
+ ;;
+ cl )
+ CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+ -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
+ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+ -DWIN32 -DIAL"
+ case $LEGACY_OPENJDK_TARGET_CPU1 in
+ i?86 )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
+ ;;
+ amd64 )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
+ ;;
+ esac
+ ;;
+esac
+
+###############################################################################
+#
+# Cross-compile arch specific flags
+
+#
+if test "x$JDK_VARIANT" = "xembedded"; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DJAVASE_EMBEDDED"
+fi
+
+case $OPENJDK_TARGET_CPU_ARCH in
+arm )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
+ ;;
+ppc )
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fsigned-char"
+ ;;
+esac
+
+###############################################################################
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
+
+# The package path is used only on macosx?
+PACKAGE_PATH=/opt/local
+AC_SUBST(PACKAGE_PATH)
+
+# Sometimes we use a cpu dir (.../lib/amd64/server)
+# Sometimes not (.../lib/server)
+LIBARCHDIR="$LEGACY_OPENJDK_TARGET_CPU2/"
+if test "x$ENDIAN" = xlittle; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
+else
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
+fi
+if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
+fi
+if test "x$OPENJDK_TARGET_OS" = xwindows; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
+fi
+if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
+fi
+if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
+ LIBARCHDIR=""
+fi
+if test "x$OPENJDK_TARGET_OS" = xbsd; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
+fi
+if test "x$DEBUG_LEVEL" = xrelease; then
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
+else
+ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
+fi
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_OPENJDK_TARGET_CPU1\"' -D$LEGACY_OPENJDK_TARGET_CPU1"
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
+
+CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
+ -I${JDK_OUTPUTDIR}/include \
+ -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
+ -I${JDK_TOPDIR}/src/share/javavm/export \
+ -I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/javavm/export \
+ -I${JDK_TOPDIR}/src/share/native/common \
+ -I${JDK_TOPDIR}/src/$LEGACY_OPENJDK_TARGET_OS_API/native/common"
+
+# The shared libraries are compiled using the picflag.
+CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
+
+# Executable flags
+CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
+CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
+
+# Now this is odd. The JDK native libraries have to link against libjvm.so
+# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
+# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
+# is identical for client and server? Yes. Which is picked at runtime (client or server)?
+# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
+# libraries will link to whatever is in memory. Yuck.
+#
+# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
+if test "x$COMPILER_TYPE" = xCL; then
+ LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
+ if test "x$LEGACY_OPENJDK_TARGET_CPU1" = xi586; then
+ LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
+ fi
+ # TODO: make -debug optional "--disable-full-debug-symbols"
+ LDFLAGS_JDK="$LDFLAGS_JDK -debug"
+ LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
+ LDFLAGS_JDKLIB_SUFFIX=""
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
+ LDFLAGS_STACK_SIZE=1048576
+ else
+ LDFLAGS_STACK_SIZE=327680
+ fi
+ LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
+else
+ # If this is a --hash-style=gnu system, use --hash-style=both, why?
+ HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
+ if test -n "$HAS_GNU_HASH"; then
+ # And since we now know that the linker is gnu, then add -z defs, to forbid
+ # undefined symbols in object files.
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs"
+ if test "x$DEBUG_LEVEL" == "xrelease"; then
+ # When building release libraries, tell the linker optimize them.
+ # Should this be supplied to the OSS linker as well?
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
+ fi
+ fi
+
+ LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
+ -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \
+ -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \
+ -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}"
+ LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava"
+ if test "x$COMPILER_NAME" = xossc; then
+ LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
+ fi
+
+ # Only the jli library is explicitly linked when the launchers are built.
+ # The libjvm is then dynamically loaded/linked by the launcher.
+ LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
+ if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
+ LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli"
+ LDFLAGS_JDKEXE_SUFFIX="-ljli"
+ fi
+fi
+
+# Adjust flags according to debug level.
+case $DEBUG_LEVEL in
+ fastdebug )
+ CFLAGS="$CFLAGS $D_FLAG"
+ JAVAC_FLAGS="$JAVAC_FLAGS -g"
+ ;;
+ slowdebug )
+ CFLAGS="$CFLAGS $D_FLAG"
+ C_O_FLAG_HI="$C_O_FLAG_NONE"
+ C_O_FLAG_NORM="$C_O_FLAG_NONE"
+ CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
+ CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
+ JAVAC_FLAGS="$JAVAC_FLAGS -g"
+ ;;
+esac
+
+
+AC_SUBST(CFLAGS_JDKLIB)
+AC_SUBST(CFLAGS_JDKEXE)
+
+AC_SUBST(CXXFLAGS_JDKLIB)
+AC_SUBST(CXXFLAGS_JDKEXE)
+
+AC_SUBST(LDFLAGS_JDKLIB)
+AC_SUBST(LDFLAGS_JDKEXE)
+AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
+AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
+])
diff --git a/common/bin/compare-objects.sh b/common/bin/compare-objects.sh
new file mode 100644
index 00000000000..ba01d5e4e93
--- /dev/null
+++ b/common/bin/compare-objects.sh
@@ -0,0 +1,235 @@
+#!/bin/bash
+#
+# 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.
+#
+
+# MANUAL
+#
+# ./common/bin/compare-objects.sh old_jdk_build_dir new_jdk_build_dir
+#
+# Compares object files
+#
+
+if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
+ echo "bash ./common/bin/compare-build.sh old_jdk_build_dir new_jdk_build_dir"
+ echo ""
+ echo "Compare object files"
+ echo ""
+ exit 10
+fi
+
+#######
+#
+# List of files (grep patterns) that are ignored
+#
+# 1) hotspot object files
+IGNORE="-e hotspot"
+
+# 2) various build artifacts: sizer.32.o sizer.64.o dummyodbc.o
+# these are produced during build and then e.g run to produce other data
+# i.e not directly put into build => safe to ignore
+IGNORE="${IGNORE} -e sizer.32.o -e sizer.64.o"
+IGNORE="${IGNORE} -e dummyodbc.o"
+IGNORE="${IGNORE} -e genSolarisConstants.o"
+IGNORE="${IGNORE} -e genUnixConstants.o"
+
+OLD="$1"
+NEW="$2"
+shift; shift
+PATTERN="$*"
+
+if [ -f $NEW/spec.sh ]; then
+ . $NEW/spec.sh
+elif [ -f $NEW/../../spec.sh ]; then
+ . $NEW/../../spec.sh
+elif [ -f $OLD/spec.sh ]; then
+ . $OLD/spec.sh
+elif [ -f $OLD/../../spec.sh ]; then
+ . $OLD/../../spec.sh
+else
+ echo "Unable to find spec.sh"
+ echo "Giving up"
+ exit 1
+fi
+
+export COMPARE_ROOT=/tmp/cimages.$USER/objects
+mkdir -p $COMPARE_ROOT
+
+(${CD} $OLD && ${FIND} . -name '*.o') > $COMPARE_ROOT/list.old
+(${CD} $NEW && ${FIND} . -name '*.o') > $COMPARE_ROOT/list.new
+
+# On macosx JobjC is build in both i386 and x86_64 variant (universial binary)
+# but new build only builds the x86_64
+# Remove the 386 variants from comparison...to avoid "false" positives
+${GREP} -v 'JObjC.dst/Objects-normal/i386' $COMPARE_ROOT/list.old > $COMPARE_ROOT/list.old.new
+${CP} $COMPARE_ROOT/list.old $COMPARE_ROOT/list.old.full
+${CP} $COMPARE_ROOT/list.old.new $COMPARE_ROOT/list.old
+
+findnew() {
+ arg_1=$1
+ arg_2=$2
+
+ # special case 1 unpack-cmd => unpackexe
+ arg_1=`${ECHO} $arg_1 | ${SED} 's!unpack-cmd!unpackexe!g'`
+ arg_2=`${ECHO} $arg_2 | ${SED} 's!unpack-cmd!unpackexe!g'`
+
+ # special case 2 /JObjC.dst/ => /libjobjc/
+ arg_1=`${ECHO} $arg_1 | ${SED} 's!/JObjC.dst/!/libjobjc/!g'`
+ arg_2=`${ECHO} $arg_2 | ${SED} 's!/JObjC.dst/!/libjobjc/!g'`
+
+ full=`${ECHO} $arg_1 | ${SED} 's!\.!\\\.!g'`
+ medium=`${ECHO} $arg_1 | ${SED} 's!.*/\([^/]*/[^/]*\)!\1!'`
+ short=`${ECHO} $arg_2 | ${SED} 's!\.!\\\.!g'`
+ if [ "`${GREP} -c "/$full" $COMPARE_ROOT/list.new`" -eq 1 ]
+ then
+ ${ECHO} $NEW/$arg_1
+ return
+ fi
+
+ if [ "`${GREP} -c "$medium" $COMPARE_ROOT/list.new`" -eq 1 ]
+ then
+ ${GREP} "$medium" $COMPARE_ROOT/list.new
+ return
+ fi
+
+ if [ "`${GREP} -c "/$short" $COMPARE_ROOT/list.new`" -eq 1 ]
+ then
+ ${GREP} "/$short" $COMPARE_ROOT/list.new
+ return
+ fi
+
+ # old style has "dir" before obj{64}
+ dir=`${ECHO} $arg_1 | ${SED} 's!.*/\([^/]*\)/obj[64]*.*!\1!g'`
+ if [ -n "$dir" -a "$dir" != "$arg_1" ]
+ then
+ if [ "`${GREP} $dir $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+ then
+ ${GREP} $dir $COMPARE_ROOT/list.new | ${GREP} "/$short"
+ return
+ fi
+
+ # Try with lib$dir/
+ if [ "`${GREP} "lib$dir/" $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+ then
+ ${GREP} "lib$dir/" $COMPARE_ROOT/list.new | ${GREP} "/$short"
+ return
+ fi
+
+ # Try with $dir_objs
+ if [ "`${GREP} "${dir}_objs" $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+ then
+ ${GREP} "${dir}_objs" $COMPARE_ROOT/list.new | ${GREP} "/$short"
+ return
+ fi
+ fi
+
+ # check for some specifics...
+ for i in demo hotspot jobjc
+ do
+ if [ "`${ECHO} $full | ${GREP} -c $i`" -gt 0 ]
+ then
+ if [ "`${GREP} $i $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+ then
+ ${GREP} $i $COMPARE_ROOT/list.new | ${GREP} "/$short"
+ return
+ fi
+ fi
+ done
+
+ # check for specific demo
+ demo=`${ECHO} $arg_1 | ${SED} 's!.*/demo/jvmti/\([^/]*\)/.*!\1!g'`
+ if [ -n "$demo" -a "$dir" != "$demo" ]
+ then
+ if [ "`${GREP} $demo $COMPARE_ROOT/list.new | ${GREP} -c "/$short"`" -eq 1 ]
+ then
+ ${GREP} $demo $COMPARE_ROOT/list.new | ${GREP} "/$short"
+ return
+ fi
+ fi
+
+ return
+}
+
+compare() {
+ old=$1
+ new=$2
+ ${DIFF} $old $new > /dev/null
+ res=$?
+ if [ $res -eq 0 ]
+ then
+ ${ECHO} 0
+ return
+ fi
+
+ # check if stripped objects gives equality
+ ${CP} $old $COMPARE_ROOT/`basename $old`.old
+ ${CP} $new $COMPARE_ROOT/`basename $old`.new
+ ${POST_STRIP_CMD} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new > /dev/null 2>&1
+ ${DIFF} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new > /dev/null
+ res=$?
+ ${RM} $COMPARE_ROOT/`basename $old`.old $COMPARE_ROOT/`basename $old`.new
+ if [ $res -eq 0 ]
+ then
+ ${ECHO} S
+ return
+ fi
+
+ name=`basename $1 | ${SED} 's!\.o!!'`
+ cntold=`strings $old | ${GREP} -c $name`
+ cntnew=`strings $new | ${GREP} -c $name`
+
+ if [ $cntold -gt 0 -a $cntnew -gt 0 ]
+ then
+ ${ECHO} F
+ return
+ fi
+
+ ${ECHO} 1
+}
+
+for F in `${CAT} $COMPARE_ROOT/list.old`
+do
+ if [ "${IGNORE}" ] && [ "`${ECHO} $F | ${GREP} ${IGNORE}`" ]
+ then
+ #
+ # skip ignored files
+ #
+ continue;
+ fi
+
+ if [ "$PATTERN" ] && [ `${ECHO} $F | ${GREP} -c $PATTERN` -eq 0 ]
+ then
+ continue;
+ fi
+
+ f=`basename $F`
+ o=$OLD/$F
+ n=`findnew $F $f`
+
+ if [ "$n" ]
+ then
+ n="$NEW/$n"
+ ${ECHO} `compare $o $n` : $f : $o : $n
+ else
+ ${ECHO} "- : $f : $o "
+ fi
+done
diff --git a/common/bin/compareimage.sh b/common/bin/compareimage.sh
index 2e9e8051384..0e5d1f031dd 100644
--- a/common/bin/compareimage.sh
+++ b/common/bin/compareimage.sh
@@ -177,40 +177,44 @@ else
fi
fi
-if [ "`uname`" == "SunOS" ]; then
- PERM="gstat -c%a"
-elif [ $OSTYPE == "cygwin" ]; then
- PERM=
-elif [ "`uname`" == "Darwin" ]; then
- PERM="stat -f%p"
-elif [ "`uname`" == "Linux" ]; then
- PERM="stat -c%A"
-else
- PERM="stat -c%a"
-fi
+echo -n Permissions...
+found=""
+for f in `cd $OLD && find . -type f`
+do
+ if [ ! -f ${OLD}/$f ]; then continue; fi
+ if [ ! -f ${NEW}/$f ]; then continue; fi
+ OP=`ls -l ${OLD}/$f | awk '{printf("%.10s\n", $1);}'`
+ NP=`ls -l ${NEW}/$f | awk '{printf("%.10s\n", $1);}'`
+ if [ "$OP" != "$NP" ]
+ then
+ if [ -z "$found" ]; then echo ; found="yes"; fi
+ printf "\told: ${OP} new: ${NP}\t$f\n"
+ fi
-if [ "${PERM}" ]
-then
- echo -n Permissions...
- found=""
- for f in `cd $OLD && find . -type f`
- do
- if [ ! -f ${OLD}/$f ]; then continue; fi
- if [ ! -f ${NEW}/$f ]; then continue; fi
- OP=`${PERM} ${OLD}/$f`
- NP=`${PERM} ${NEW}/$f`
- if [ "$OP" != "$NP" ]
+ OF=`cd ${OLD} && file $f`
+ NF=`cd ${NEW} && file $f`
+ if [ "$f" = "./src.zip" ]
+ then
+ if [ "`echo $OF | grep -ic zip`" -gt 0 -a "`echo $NF | grep -ic zip`" -gt 0 ]
then
- if [ -z "$found" ]; then echo ; found="yes"; fi
- printf "\told: ${OP} new: ${NP}\t$f\n"
+ # the way we produces zip-files make it so that directories are stored in old file
+ # but not in new (only files with full-path)
+ # this makes file-5.09 report them as different
+ continue;
fi
- done
- if [ -z "$found" ]; then echo ; found="yes"; fi
-fi
+ fi
+
+ if [ "$OF" != "$NF" ]
+ then
+ if [ -z "$found" ]; then echo ; found="yes"; fi
+ printf "\tFILE: old: ${OF} new: ${NF}\t$f\n"
+ fi
+done
+if [ -z "$found" ]; then echo ; found="yes"; fi
GENERAL_FILES=$(cd $OLD && find . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
- ! -name "ct.sym" \
+ ! -name "ct.sym" ! -name "*.diz" \
| grep -v "./bin/" | sort | $FILTER)
echo General files...
for f in $GENERAL_FILES
diff --git a/common/bin/diffexec.sh b/common/bin/diffexec.sh
index 8621e9147f1..85f7b67c69f 100644
--- a/common/bin/diffexec.sh
+++ b/common/bin/diffexec.sh
@@ -49,21 +49,24 @@ then
fi
if [ "`uname`" == "SunOS" ]; then
- NM=gnm
- STAT="gstat -c%s"
+ if [ -f "`which nm`" ]; then
+ NM=nm
+ elif [ -f "`which gnm`" ]; then
+ NM=gnm
+ else
+ echo "No nm command found"
+ exit 10
+ fi
LDD=ldd
elif [ $OSTYPE == "cygwin" ]; then
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
NM_ARGS=/exports
- STAT="stat -c%s"
LDD=
elif [ "`uname`" == "Darwin" ]; then
NM=nm
- STAT="stat -f%z"
LDD="otool -L"
else
NM=nm
- STAT="stat -c%s"
LDD=ldd
fi
@@ -79,8 +82,8 @@ fi
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
-OLD_SIZE=$($STAT "$OLD")
-NEW_SIZE=$($STAT "$NEW")
+OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
+NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
if [ $# -gt 3 ]
then
diff --git a/common/bin/diffjarzip.sh b/common/bin/diffjarzip.sh
index 3bd96b7e112..6ad0a42c2f6 100644
--- a/common/bin/diffjarzip.sh
+++ b/common/bin/diffjarzip.sh
@@ -72,7 +72,11 @@ else
fi
if [ "`uname`" == "SunOS" ]; then
- DIFF=gdiff
+ if [ -f "`which gdiff`" ]; then
+ DIFF=gdiff
+ else
+ DIFF=diff
+ fi
else
DIFF=diff
fi
diff --git a/common/bin/difflib.sh b/common/bin/difflib.sh
index e6f8a20ee9a..dc5eed14877 100644
--- a/common/bin/difflib.sh
+++ b/common/bin/difflib.sh
@@ -53,21 +53,27 @@ then
fi
if [ "`uname`" == "SunOS" ]; then
- NM=gnm
- STAT="gstat -c%s"
+ if [ -f "`which gnm`" ]; then
+ NM=gnm
+# Jonas 2012-05-29: solaris native nm produces radically different output than gnm
+# so if using that...we need different filter than "cut -f 2-"
+#
+ elif [ -f "`which nm`" ]; then
+ NM=nm
+ else
+ echo "No nm command found"
+ exit 10
+ fi
LDD=ldd
elif [ $OSTYPE == "cygwin" ]; then
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
NM_ARGS=/exports
- STAT="stat -c%s"
LDD=
elif [ "`uname`" == "Darwin" ]; then
NM=nm
- STAT="stat -f%z"
LDD="otool -L"
else
NM=nm
- STAT="stat -c%s"
LDD=ldd
fi
@@ -83,8 +89,8 @@ fi
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
-OLD_SIZE=$($STAT "$OLD")
-NEW_SIZE=$($STAT "$NEW")
+OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
+NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
if [ $# -gt 3 ]
then
@@ -122,8 +128,8 @@ then
exit 0
fi
-OLD_SYMBOLS=$COMPARE_ROOT/$OLD_NAME.old
-NEW_SYMBOLS=$COMPARE_ROOT/$NEW_NAME.new
+OLD_SYMBOLS=$COMPARE_ROOT/nm.$OLD_NAME.old
+NEW_SYMBOLS=$COMPARE_ROOT/nm.$NEW_NAME.new
mkdir -p $(dirname $OLD_SYMBOLS)
mkdir -p $(dirname $NEW_SYMBOLS)
diff --git a/common/makefiles/IdlCompilation.gmk b/common/makefiles/IdlCompilation.gmk
index ae85d378d6f..799c7d6fbf9 100644
--- a/common/makefiles/IdlCompilation.gmk
+++ b/common/makefiles/IdlCompilation.gmk
@@ -56,10 +56,10 @@ define add_idl_package
$4_OLDIMPLBASE_MSG:=with -oldImplBase
endif
$5 : $4
- mkdir -p $3/$$($4_TMPDIR)
- rm -rf $3/$$($4_TMPDIR)
- mkdir -p $(dir $5)
- echo Compiling IDL $(patsubst $2/%,%,$4)
+ $(MKDIR) -p $3/$$($4_TMPDIR)
+ $(RM) -rf $3/$$($4_TMPDIR)
+ $(MKDIR) -p $(dir $5)
+ $(ECHO) Compiling IDL $(patsubst $2/%,%,$4)
$8 -td $3/$$($4_TMPDIR) \
-i $2/org/omg/CORBA \
-i $2/org/omg/PortableInterceptor \
@@ -69,10 +69,10 @@ define add_idl_package
$$($4_OLDIMPLBASE) \
$(PREFIXES) \
$4
- rm -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
- cp -rp $3/$$($4_TMPDIR)/* $3
- (cd $3/$$($4_TMPDIR); find . -type f | sed 's!\./!$3/!g' | awk '{ print $$$$1 ": $4" }' > $5)
- rm -rf $3/$$($4_TMPDIR)
+ $(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
+ $(CP) -rp $3/$$($4_TMPDIR)/* $3
+ ($(CD) $3/$$($4_TMPDIR); find . -type f | sed 's!\./!$3/!g' | awk '{ print $$$$1 ": $4" }' > $5)
+ $(RM) -rf $3/$$($4_TMPDIR)
endef
define SetupIdlCompilation
@@ -87,11 +87,13 @@ $(if $6,$1_$(strip $6))
$(if $7,$1_$(strip $7))
$(if $8,$1_$(strip $8))
$(if $9,$1_$(strip $9))
+$(if $(10),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
+
# Remove any relative addressing in the paths.
$1_SRC := $$(abspath $$($1_SRC))
$1_BIN := $$(abspath $$($1_BIN))
# Find all existing java files and existing class files.
-$$(shell mkdir -p $$($1_SRC) $$($1_BIN))
+$$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN))
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
$1_BINS := $$(shell find $$($1_BIN) -name "*.java")
# Prepend the source/bin path to the filter expressions.
@@ -111,4 +113,3 @@ $$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(
endef
.SUFFIXES: .java .class .package
-
diff --git a/common/makefiles/JavaCompilation.gmk b/common/makefiles/JavaCompilation.gmk
index a9ddb11a644..38d20969d5c 100644
--- a/common/makefiles/JavaCompilation.gmk
+++ b/common/makefiles/JavaCompilation.gmk
@@ -94,6 +94,7 @@ define SetupJavaCompiler
$(if $7,$1_$(strip $7))
$(if $8,$1_$(strip $8))
$(if $9,$1_$(strip $9))
+ $(if $(10),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
ifeq ($$($1_MODE),MULTI_CORE_CONCURRENT)
ifneq (,$$($1_SERVER_DIR))
@@ -130,6 +131,7 @@ define SetupArchive
# SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
# added to the archive.
# EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
+ # CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
$(if $3,$1_$(strip $3))
$(if $4,$1_$(strip $4))
$(if $5,$1_$(strip $5))
@@ -143,6 +145,7 @@ define SetupArchive
$(if $(13),$1_$(strip $(13)))
$(if $(14),$1_$(strip $(14)))
$(if $(15),$1_$(strip $(15)))
+ $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
$1_JARMAIN:=$(strip $$($1_JARMAIN))
$1_JARNAME:=$$(notdir $$($1_JAR))
@@ -243,6 +246,16 @@ define SetupArchive
($(FIND) $$(src) -name _the.package -exec $(TOUCH) -r $$($1_JAR) \{\} \; ; true) &&)
# Use a slightly shorter name for logging, but with enough path to identify this jar.
$1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_JAR))
+
+ ifneq (,$$($1_CHECK_COMPRESS_JAR))
+ $1_JAR_CREATE_OPTIONS := c0fm
+ ifeq ($(COMPRESS_JARS), true)
+ $1_JAR_CREATE_OPTIONS := cfm
+ endif
+ else
+ $1_JAR_CREATE_OPTIONS := cfm
+ endif
+
# Here is the rule that creates/updates the jar file.
$$($1_JAR) : $2 $$($1_ALL_SRC)
$(MKDIR) -p $$($1_BIN)
@@ -283,7 +296,7 @@ define SetupArchive
$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.api.notify $(FIND_DELETE); true) &&) true ; \
fi ; \
else \
- $(ECHO) Creating $$($1_NAME) && $(JAR) cfm $$@ $$($1_MANIFEST_FILE) && \
+ $(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) && \
$$($1_SCAPTURE_CONTENTS) \
$$($1_SCAPTURE_METAINF) \
$$($1_SUPDATE_CONTENTS) \
@@ -311,6 +324,7 @@ define SetupZipArchive
$(if $7,$1_$(strip $7))
$(if $8,$1_$(strip $8))
$(if $9,$1_$(strip $9))
+ $(if $(10),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
# Find all files in the source tree.
$1_SUFFIX_FILTER := $$(patsubst %,-o -name $(DQUOTE)*%$(DQUOTE),$$($1_SUFFIXES))
@@ -648,6 +662,7 @@ define SetupJavaCompilation
$(if $(12),$1_$(strip $(12)))
$(if $(13),$1_$(strip $(13)))
$(if $(14),$1_$(strip $(14)))
+ $(if $(15),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
# Extract the info from the java compiler setup.
$1_MODE := $$($$($1_SETUP)_MODE)
@@ -688,6 +703,12 @@ $1_BINS := $$(shell $(FIND) $$($1_BIN) -name "*.class")
# Now we have a list of all java files to compile: $$($1_SRCS)
# and we have a list of all existing class files: $$($1_BINS)
+# Create the corresponding smart javac wrapper command line.
+$1_SJAVAC_ARGS:=$$(addprefix -x ,$$(addsuffix .*,$$(subst /,.,$$($1_EXCLUDES)))) \
+$$(addprefix -i ,$$(addsuffix .*,$$(subst /,.,$$($1_INCLUDES)))) \
+$$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES))) \
+$$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) -src $$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))
+
# Prepend the source/bin path to the filter expressions.
ifneq ($$($1_INCLUDES),)
$1_SRC_INCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_INCLUDES))))
@@ -799,6 +820,12 @@ ifeq ($$($1_MODE),SINGLE_THREADED_BATCH)
$(RM) $$($1_BIN)/_the.batch $$($1_BIN)/_the.batch.tmp
$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files in batch $1
+ifeq ($$($1_NOSJAVAC),)
+ifeq ($$(ENABLE_SJAVAC),yes)
+ mkdir -p $$($1_BIN)_sjavac
+ $$($1_JVM) $$(word 1,$$($1_JAVAC)) com.sun.tools.javac.smart.Main $$($1_SJAVAC_ARGS) -mfl $$($1_BIN)/_the.batch.tmp -d $$($1_BIN)_sjavac
+endif
+endif
($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) -implicit:none -sourcepath "$$($1_SRCROOTSC)" -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
else
@@ -890,5 +917,3 @@ ifneq (,$$($1_SRCZIP))
endif
endef
-
-
diff --git a/common/makefiles/MakeBase.gmk b/common/makefiles/MakeBase.gmk
index 3018a414f3b..be0a6726a28 100644
--- a/common/makefiles/MakeBase.gmk
+++ b/common/makefiles/MakeBase.gmk
@@ -138,6 +138,7 @@ endef
# Hook to be called as the very first thing when running a normal build
define AtRootMakeStart
+ $(if $(findstring -j,$(MAKEFLAGS)), $(error make -j is not supported, use make JOBS=n))
$(call PrintStartMessage)
$(call StartTimer)
endef
diff --git a/common/makefiles/MakeHelpers.gmk b/common/makefiles/MakeHelpers.gmk
new file mode 100644
index 00000000000..9747eb87ae6
--- /dev/null
+++ b/common/makefiles/MakeHelpers.gmk
@@ -0,0 +1,185 @@
+#
+# 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.
+#
+
+################################################################
+#
+# This file contains helper functions for the top-level Makefile that does
+# not depend on the spec.gmk file having been read. (The purpose of this
+# file is ju to avoid cluttering the top-level Makefile.)
+#
+################################################################
+
+ifndef _MAKEHELPERS_GMK
+_MAKEHELPERS_GMK := 1
+
+##############################
+# Stuff to run at include time
+##############################
+
+# Find out which variables were passed explicitely on the make command line. These
+# will be passed on to sub-makes, overriding spec.gmk settings.
+MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))),$(var)=$($(var)))
+
+list_alt_overrides_with_origins=$(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
+list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
+
+##############################
+# Functions
+##############################
+
+define fatal-error
+ # If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
+ $$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
+endef
+
+define ParseLogLevel
+ ifeq ($$(origin VERBOSE),undefined)
+ # Setup logging according to LOG (but only if VERBOSE is not given)
+ ifeq ($$(LOG),)
+ # Set LOG to "warn" as default if not set (and no VERBOSE given)
+ LOG=warn
+ endif
+ ifeq ($$(LOG),warn)
+ VERBOSE=-s
+ else ifeq ($$(LOG),info)
+ VERBOSE=
+ else ifeq ($$(LOG),debug)
+ VERBOSE=
+ else ifeq ($$(LOG),trace)
+ VERBOSE=-d -p
+ else
+ $$(info Error: LOG must be one of: warn, info, debug or trace.)
+ $$(eval $$(call fatal-error))
+ endif
+ else
+ ifneq ($$(LOG),)
+ # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
+ # but complain if this is the top-level make call.
+ ifeq ($$(MAKELEVEL),0)
+ $$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
+ $$(eval $$(call fatal-error))
+ endif
+ endif
+ endif
+endef
+
+# TODO: Fix duplication in MakeBase.gmk
+define SetupLogging
+ ifneq ($(findstring $(LOG),debug trace),)
+ # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
+ OLD_SHELL:=$$(SHELL)
+ SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
+ endif
+endef
+
+define ParseConfAndSpec
+ ifneq ($$(origin SPEC),undefined)
+ # We have been given a SPEC, check that it works out properly
+ ifeq ($$(wildcard $$(SPEC)),)
+ $$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
+ $$(eval $$(call fatal-error))
+ endif
+ ifneq ($$(origin CONF),undefined)
+ # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
+ # but complain if this is the top-level make call.
+ ifeq ($$(MAKELEVEL),0)
+ $$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
+ $$(eval $$(call fatal-error))
+ endif
+ endif
+ # ... OK, we're satisfied, we'll use this SPEC later on
+ else
+ # Find all spec.gmk files in the build output directory
+ output_dir=$$(root_dir)/build
+ all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
+ ifeq ($$(all_spec_files),)
+ $$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
+ $$(eval $$(call fatal-error))
+ endif
+ # Extract the configuration names from the path
+ all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
+
+ ifneq ($$(origin CONF),undefined)
+ # User have given a CONF= argument.
+ ifeq ($$(CONF),)
+ # If given CONF=, match all configurations
+ matching_confs=$$(strip $$(all_confs))
+ else
+ # Otherwise select those that contain the given CONF string
+ matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
+ endif
+ ifeq ($$(matching_confs),)
+ $$(info No configurations found matching CONF=$$(CONF))
+ $$(info Available configurations:)
+ $$(foreach var,$$(all_confs),$$(info * $$(var)))
+ $$(eval $$(call fatal-error))
+ else
+ ifeq ($$(words $$(matching_confs)),1)
+ $$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
+ else
+ $$(info Building the following configurations (matching CONF=$$(CONF)):)
+ $$(foreach var,$$(matching_confs),$$(info * $$(var)))
+ endif
+ endif
+
+ # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
+ SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
+ else
+ # No CONF or SPEC given, check the available configurations
+ ifneq ($$(words $$(all_spec_files)),1)
+ $$(info No CONF or SPEC given, but more than one spec.gmk found in $$(output_dir).)
+ $$(info Available configurations:)
+ $$(foreach var,$$(all_confs),$$(info * $$(var)))
+ $$(info Please retry building with CONF= or SPEC=)
+ $$(eval $$(call fatal-error))
+ endif
+
+ # We found exactly one configuration, use it
+ SPEC=$$(strip $$(all_spec_files))
+ endif
+ endif
+endef
+
+define CheckEnvironment
+ # Find all environment or command line variables that begin with ALT.
+ $(if $(list_alt_overrides),
+ @$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
+ @$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
+ @$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n\n"
+ )
+endef
+
+define PrintStartMessage
+ $(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
+ $(call CheckEnvironment)
+ @$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'"
+endef
+
+define PrintEndMessage
+ @$(ECHO) "Finished building OpenJDK for target '$@'"
+ $(call CheckEnvironment)
+endef
+
+endif # _MAKEHELPERS_GMK
diff --git a/common/makefiles/Makefile b/common/makefiles/Makefile
index 77420a84296..de5da99f78b 100644
--- a/common/makefiles/Makefile
+++ b/common/makefiles/Makefile
@@ -26,241 +26,128 @@
# This must be the first rule
default: all
-# Find out which variables were passed explicitely on the make command line. These
-# will be passed on to sub-makes, overriding spec.gmk settings.
-MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))),$(var)=$($(var)))
-
-define fatal-error
- # If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
- $$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
-endef
-
-ifeq ($(origin VERBOSE),undefined)
- # Setup logging according to LOG (but only if VERBOSE is not given)
- ifeq ($(LOG),)
- # Set LOG to "warn" as default if not set (and no VERBOSE given)
- LOG=warn
- endif
- ifeq ($(LOG),warn)
- VERBOSE=-s
- else ifeq ($(LOG),info)
- VERBOSE=
- else ifeq ($(LOG),debug)
- VERBOSE=
- else ifeq ($(LOG),trace)
- VERBOSE=-d -p
- else
- $(info Error: LOG must be one of: warn, info, debug or trace.)
- $(eval $(call fatal-error))
- endif
-else
- ifneq ($(LOG),)
- # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
- # but complain if this is the top-level make call.
- ifeq ($(MAKELEVEL),0)
- $(info Cannot use LOG=$(LOG) and VERBOSE=$(VERBOSE) at the same time. Choose one.)
- $(eval $(call fatal-error))
- endif
- endif
-endif
-
-# TODO: Fix duplication in MakeBase.gmk
-define SetupLogging
- ifneq ($(findstring $(LOG),debug trace),)
- # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
- OLD_SHELL:=$$(SHELL)
- SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
- endif
-endef
-
-$(eval $(call SetupLogging))
-
-# Find all environment or command line variables that begin with ALT.
-list_alt_overrides_with_origins = $(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
-list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
-
+# Locate this Makefile
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
- makefile_path=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
+ makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
else
- makefile_path=$(lastword $(MAKEFILE_LIST))
+ makefile_path:=$(lastword $(MAKEFILE_LIST))
endif
-root_dir=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
-output_dir=$(root_dir)/build
+root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
-ifneq ($(origin SPEC),undefined)
- # We have been given a SPEC, check that it works out properly
- ifeq ($(wildcard $(SPEC)),)
- $(info Cannot locate spec.gmk, given by SPEC=$(SPEC))
- $(eval $(call fatal-error))
- endif
- ifneq ($(origin CONF),undefined)
- # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
- # but complain if this is the top-level make call.
- ifeq ($(MAKELEVEL),0)
- $(info Cannot use CONF=$(CONF) and SPEC=$(SPEC) at the same time. Choose one.)
- $(eval $(call fatal-error))
- endif
- endif
- # ... OK, we're satisfied, we'll use this SPEC later on
-else
- # Find all spec.gmk files in the build output directory
- all_spec_files=$(wildcard $(output_dir)/*/spec.gmk)
- ifeq ($(all_spec_files),)
- $(info No configurations found for $(root_dir)! Please run configure to create a configuration.)
- $(eval $(call fatal-error))
- endif
- # Extract the configuration names from the path
- all_confs=$(patsubst %/spec.gmk,%,$(patsubst $(output_dir)/%,%,$(all_spec_files)))
+# ... and then we can include our helper functions
+include $(dir $(makefile_path))/MakeHelpers.gmk
- ifneq ($(origin CONF),undefined)
- # User have given a CONF= argument.
- ifeq ($(CONF),)
- # If given CONF=, match all configurations
- matching_confs=$(strip $(all_confs))
- else
- # Otherwise select those that contain the given CONF string
- matching_confs=$(strip $(foreach var,$(all_confs),$(if $(findstring $(CONF),$(var)),$(var))))
- endif
- ifeq ($(matching_confs),)
- $(info No configurations found matching CONF=$(CONF))
- $(info Available configurations:)
- $(foreach var,$(all_confs),$(info * $(var)))
- $(eval $(call fatal-error))
- else
- ifeq ($(words $(matching_confs)),1)
- $(info Building '$(matching_confs)' (matching CONF=$(CONF)))
- else
- $(info Building the following configurations (matching CONF=$(CONF)):)
- $(foreach var,$(matching_confs),$(info * $(var)))
- endif
- endif
+$(eval $(call ParseLogLevel))
+$(eval $(call SetupLogging))
+$(eval $(call ParseConfAndSpec))
- # Create a SPEC definition. This will contain the path to one or more spec.gmk files.
- SPEC=$(addsuffix /spec.gmk,$(addprefix $(output_dir)/,$(matching_confs)))
- else
- # No CONF or SPEC given, check the available configurations
- ifneq ($(words $(all_spec_files)),1)
- $(info No CONF or SPEC given, but more than one spec.gmk found in $(output_dir).)
- $(info Available configurations:)
- $(foreach var,$(all_confs),$(info * $(var)))
- $(info Please retry building with CONF= or SPEC=)
- $(eval $(call fatal-error))
- endif
-
- # We found exactly one configuration, use it
- SPEC=$(strip $(all_spec_files))
- endif
+# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
+# hence this workaround.
+ifeq ($(JOBS),)
+ JOBS=$(NUM_CORES)
endif
ifneq ($(words $(SPEC)),1)
-# We have multiple configurations to build, call make repeatedly
-all jdk hotspot jaxws jaxp corba langtools install images packages clean dist-clean:
+### We have multiple configurations to build, call make repeatedly
+all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean:
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@ $(MAKE_ARGS)) &&) true
-.PHONY: all jdk hotspot jaxws jaxp corba langtools install images packages clean dist-clean
+.PHONY: all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean
else
-# This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
+### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
# Now load the spec
--include $(SPEC)
+include $(SPEC)
# Load the vital tools for all the makefiles.
--include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
+include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
-# Remove any build.log from a previous run
+### Clean up from previous run
+
+# Remove any build.log from a previous run, if they exist
ifneq (,$(BUILD_LOG))
- $(shell $(RM) $(BUILD_LOG))
+ ifneq (,$(BUILD_LOG_PREVIOUS))
+ # Rotate old log
+ $(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
+ $(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
+ else
+ $(shell $(RM) $(BUILD_LOG) 2> /dev/null)
+ endif
endif
-
# Remove any javac server logs and port files. This
# prevents a new make run to reuse the previous servers.
ifneq (,$(JAVAC_SERVERS))
$(shell mkdir -p $(JAVAC_SERVERS) && rm -rf $(JAVAC_SERVERS)/*)
endif
-# Reset the build timers.
-$(eval $(call ResetTimers))
# Clean out any notifications from the previous build.
$(shell find $(OUTPUT_ROOT) -name "_the.*.notify" $(FIND_DELETE))
-# If make was called explicitely with -j, don't add a -j ourself to sub-makes, since
-# this will be inherited automatically by make. Otherwise use our default for sub-makes.
-# The -j in MAKEFLAGS is only visible when executing a recipe, hence this macro.
-define GetMakeJobFlag
- $(if $(findstring -j,$(MAKEFLAGS)),,-j$(NUM_CORES))
-endef
+# Reset the build timers.
+$(eval $(call ResetTimers))
-define CheckEnvironment
- $(if $(list_alt_overrides),
- @$(PRINTF) "\nWARNING: You have the following ALT_ variables set:\n"
- @$(PRINTF) "$(foreach var,$(list_alt_overrides),$(var)=$$$(var))\n"
- @$(PRINTF) "ALT_ variables are deprecated and will be ignored. Please clean your environment.\n"
- )
-endef
-
-define PrintStartMessage
- $(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
- $(call CheckEnvironment)
- @$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'"
-endef
-
-define PrintEndMessage
- @$(ECHO) "Finished building OpenJDK for target '$@'"
- $(call CheckEnvironment)
-endef
+### Main targets
all: jdk
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
@$(call AtRootMakeEnd)
-langtools: start-make
+langtools: start-make langtools-only
+langtools-only:
@$(call MakeStart,langtools,all)
- @($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(LANGTOOLS_MAKE_ARGS) $(MAKE_ARGS))
+ @($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,langtools,all)
-corba: langtools
+corba: langtools corba-only
+corba-only:
@$(call MakeStart,corba,all)
- @($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
+ @($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,corba,all)
-jaxp: langtools
+jaxp: langtools jaxp-only
+jaxp-only:
@$(call MakeStart,jaxp,all)
- @($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
+ @($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,jaxp,all)
-jaxws: langtools jaxp
+jaxws: langtools jaxp jaxws-only
+jaxws-only:
@$(call MakeStart,jaxws,all)
- @($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(CORBA_MAKE_ARGS) $(MAKE_ARGS))
+ @($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,jaxws,all)
-hotspot: langtools
+hotspot: langtools hotspot-only
+hotspot-only:
@$(call MakeStart,hotspot,all)
@($(CD) $(HOTSPOT_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) $(MAKE_ARGS))
@$(call MakeFinish,hotspot,all)
-jdk: langtools corba jaxp jaxws hotspot
+jdk: langtools corba jaxp jaxws hotspot jdk-only
+jdk-only:
@$(call MakeStart,jdk,all)
- @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS))
+ @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,jdk,all)
-images install packages: source-tips start-make jdk langtools corba jaxp jaxws hotspot
+images: source-tips start-make jdk langtools corba jaxp jaxws hotspot images-only
+images-only:
@$(call MakeStart,jdk-images,$@)
- @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS) $@)
+ @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) images)
@$(call MakeFinish,jdk-images,$@)
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
@$(call AtRootMakeEnd)
-old-images: source-tips start-make jdk langtools corba jaxp jaxws hotspot
- @$(call MakeStart,jdk-old-images,$@)
- @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(call GetMakeJobFlag) $(JDK_MAKE_ARGS) $(MAKE_ARGS) $@)
- @$(call MakeFinish,old-jdk-images,$@)
+install: source-tips start-make jdk langtools corba jaxp jaxws hotspot install-only
+install-only:
+ @$(call MakeStart,jdk-images,$@)
+ @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) install)
+ @$(call MakeFinish,jdk-images,$@)
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
@$(call AtRootMakeEnd)
start-make:
@$(call AtRootMakeStart)
-.PHONY: jdk hotspot jaxws jaxp corba langtools install images packages start-make
+.PHONY: jdk hotspot jaxws jaxp corba langtools install images start-make
test: start-make
@$(call MakeStart,test,$(if $(TEST),$(TEST),all))
@@ -281,7 +168,7 @@ $(OUTPUT_ROOT)/source_tips: FRC
# Remove everything, except the output from configure.
clean:
- @(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | grep -v "localdevenv.*" | grep -v uncygdrive.exe`)
+ @(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | grep -v "localdevenv.*" | grep -v uncygdrive.exe`)
@$(ECHO) Cleaned everything except the build configuration.
.PHONY: clean
@@ -292,7 +179,7 @@ dist-clean:
.PHONY: dist-clean
clean-jdk:
- @(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | \
+ @(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | \
grep -v langtools | grep -v corba | grep -v jaxp | grep -v jaxws | grep -v hotspot`)
@$(ECHO) "Cleaned jdk build artifacts (but not langtools,corba,jaxp,jaxws,hotspot nor the build configuration)"
.PHONY: clean
diff --git a/common/makefiles/NativeCompilation.gmk b/common/makefiles/NativeCompilation.gmk
index ee18f186c8e..6818a501226 100644
--- a/common/makefiles/NativeCompilation.gmk
+++ b/common/makefiles/NativeCompilation.gmk
@@ -51,47 +51,55 @@ define add_native_source
# param 5 = the c compiler
# param 6 = the c++ flags to the compiler
# param 7 = the c++ compiler
+ # param 8 = the flags to the assembler
ifneq (,$$(filter %.c,$2))
# Compile as a C file
- $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS)
+ $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -c
$1_$2_COMP=$5
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
else ifneq (,$$(filter %.m,$2))
# Compile as a objective-c file
- $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS)
+ $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -c
$1_$2_COMP=$5
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
+ else ifneq (,$$(filter %.s,$2))
+ # Compile as assembler file
+ $1_$2_FLAGS=$8
+ $1_$2_COMP=$(AS)
+ $1_$2_DEP_FLAG:=
else
# Compile as a C++ file
- $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS)
+ $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -c
$1_$2_COMP=$7
$1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
endif
# Generate the .o (.obj) file name and place it in the bin dir.
- $1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(notdir $2))))
+ $1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $2)))))
# Only continue if this object file hasn't been processed already. This lets the first found
# source file override any other with the same name.
ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
$1_OBJS_SO_FAR+=$$($1_$2_OBJ)
- # And this is the dependency file for this obj file.
- $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
- # Include previously generated dependency information. (if it exists)
- -include $$($1_$2_DEP)
+ ifeq (,$$(filter %.s,$2))
+ # And this is the dependency file for this obj file.
+ $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
+ # Include previously generated dependency information. (if it exists)
+ -include $$($1_$2_DEP)
- ifeq ($(COMPILER_TYPE),CL)
- $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
- -Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
+ ifeq ($(COMPILER_TYPE),CL)
+ $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
+ -Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
+ endif
endif
$$($1_$2_OBJ) : $2
ifeq ($(COMPILER_TYPE),CC)
$$(call COMPILING_MSG,$$(notdir $2))
- $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) -c $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
+ $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
endif
ifeq ($(COMPILER_TYPE),CL)
$$(call COMPILING_MSG,$$(notdir $2))
- $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) -c $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
+ $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
endif
endif
endef
@@ -107,9 +115,9 @@ define SetupNativeCompilation
# LDFLAGS_SUFFIX the linker flags to be added last on the commandline
# typically the libraries linked to.
# ARFLAGS the archiver flags to be used
- # BIN the directory where we store the object files
- # LIB the resulting library file
- # EXE the resulting exec file
+ # OBJECT_DIR the directory where we store the object files
+ # LIBRARY the resulting library file
+ # PROGRAM the resulting exec file
# INCLUDES only pick source from these directories
# EXCLUDES do not pick source from these directories
# INCLUDE_FILES only compile exactly these files!
@@ -118,6 +126,9 @@ define SetupNativeCompilation
# RC_FLAGS flags for RC.
# MAPFILE mapfile
# REORDER reorder file
+ # DEBUG_SYMBOLS add debug symbols (if configured on)
+ # CC the compiler to use, default is $(CC)
+ # LDEXE the linker to use for linking executables, default is $(LDEXE)
$(if $2,$1_$(strip $2))
$(if $3,$1_$(strip $3))
$(if $4,$1_$(strip $4))
@@ -137,13 +148,94 @@ define SetupNativeCompilation
$(if $(18),$1_$(strip $(18)))
$(if $(19),$1_$(strip $(19)))
$(if $(20),$1_$(strip $(20)))
+ $(if $(21),$1_$(strip $(21)))
+ $(if $(22),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
+
+ ifneq (,$$($1_BIN))
+ $$(error BIN has been replaced with OBJECT_DIR)
+ endif
+
+ ifneq (,$$($1_LIB))
+ $$(error LIB has been replaced with LIBRARY)
+ endif
+
+ ifneq (,$$($1_EXE))
+ $$(error EXE has been replaced with PROGRAM)
+ endif
+
+ ifneq (,$$($1_LIBRARY))
+ ifeq (,$$($1_OUTPUT_DIR))
+ $$(error LIBRARY requires OUTPUT_DIR)
+ endif
+
+ ifneq ($$($1_LIBRARY),$(basename $$($1_LIBRARY)))
+ $$(error directory of LIBRARY should be specified using OUTPUT_DIR)
+ endif
+
+ ifneq (,$(findstring $(SHARED_LIBRARY_SUFFIX),$$($1_LIBRARY)))
+ $$(error LIBRARY should be specified without SHARED_LIBRARY_SUFFIX: $(SHARED_LIBRARY_SUFFIX))
+ endif
+
+ ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_LIBRARY)))
+ $$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
+ endif
+
+ $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$(SHARED_LIBRARY_SUFFIX)
+ $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+
+ endif
+
+ ifneq (,$$($1_STATIC_LIBRARY))
+ ifeq (,$$($1_OUTPUT_DIR))
+ $$(error STATIC_LIBRARY requires OUTPUT_DIR)
+ endif
+
+ ifneq ($$($1_STATIC_LIBRARY),$(basename $$($1_STATIC_LIBRARY)))
+ $$(error directory of STATIC_LIBRARY should be specified using OUTPUT_DIR)
+ endif
+
+ ifneq (,$(findstring $(STATIC_LIBRARY_SUFFIX),$$($1_STATIC_LIBRARY)))
+ $$(error STATIC_LIBRARY should be specified without STATIC_LIBRARY_SUFFIX: $(STATIC_LIBRARY_SUFFIX))
+ endif
+
+ ifneq (,$(findstring $(LIBRARY_PREFIX),$$($1_STATIC_LIBRARY)))
+ $$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
+ endif
+
+ $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$(STATIC_LIBRARY_SUFFIX)
+ $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+ endif
+
+ ifneq (,$$($1_PROGRAM))
+ ifeq (,$$($1_OUTPUT_DIR))
+ $$(error PROGRAM requires OUTPUT_DIR)
+ endif
+
+ ifneq ($$($1_PROGRAM),$(basename $$($1_PROGRAM)))
+ $$(error directory of PROGRAM should be specified using OUTPUT_DIR)
+ endif
+
+ ifneq (,$(findstring $(EXE_SUFFIX),$$($1_PROGRAM)))
+ $$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
+ endif
+
+ $1_BASENAME:=$$($1_PROGRAM)$(EXE_SUFFIX)
+ $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
+
+ endif
+
+ ifeq (,$$($1_TARGET))
+ $$(error Neither PROGRAM, LIBRARY nor STATIC_LIBRARY has been specified for SetupNativeCompilation)
+ endif
ifeq (,$$($1_LANG))
$$(error You have to specify LANG for native compilation $1)
endif
ifeq (C,$$($1_LANG))
+ ifeq ($$($1_LDEXE),)
+ $1_LDEXE:=$(LDEXE)
+ endif
$1_LD:=$(LD)
- $1_LDEXE:=$(LDEXE)
else
ifeq (C++,$$($1_LANG))
$1_LD:=$(LDCXX)
@@ -153,8 +245,12 @@ define SetupNativeCompilation
endif
endif
+ ifeq ($$($1_CC),)
+ $1_CC:=$(CC)
+ endif
+
# Make sure the dirs exist.
- $$(shell $(MKDIR) -p $$($1_SRC) $$($1_BIN) $$(dir $$($1_LIB)) $$(dir $$($1_EXE)))
+ $$(shell $(MKDIR) -p $$($1_SRC) $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR))
# Find all files in the source trees. Sort to remove duplicates.
$1_ALL_SRCS := $$(sort $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f)))
# Extract the C/C++ files.
@@ -163,7 +259,7 @@ define SetupNativeCompilation
ifneq ($$($1_EXCLUDE_FILES),)
$1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
endif
- $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.c %.cpp %.m,$$($1_ALL_SRCS)))
+ $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.s %.c %.cpp %.m,$$($1_ALL_SRCS)))
ifneq (,$$(strip $$($1_INCLUDE_FILES)))
$1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
endif
@@ -171,7 +267,7 @@ define SetupNativeCompilation
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
endif
# There can be only a single bin dir root, no need to foreach over the roots.
- $1_BINS := $$(wildcard $$($1_BIN)/*$(OBJ_SUFFIX))
+ $1_BINS := $$(wildcard $$($1_OBJECT_DIR)/*$(OBJ_SUFFIX))
# Now we have a list of all c/c++ files to compile: $$($1_SRCS)
# and we have a list of all existing object files: $$($1_BINS)
@@ -187,37 +283,36 @@ define SetupNativeCompilation
# Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
# a reproducable order on the input files to the linker).
- $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_BIN)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS)))))))
- $1 := $$($1_EXPECTED_OBJS)
+ $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))))
# Are there too many object files on disk? Perhaps because some source file was removed?
$1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
# Clean out the superfluous object files.
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
- # Pickup extra HOST_OS_API and/or PLATFORM dependent variables for CFLAGS.
- $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(HOST_OS_API)) $$($1_CFLAGS_$(PLATFORM))
+ # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
+ $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
ifneq ($(DEBUG_LEVEL),release)
# Pickup extra debug dependent variables for CFLAGS
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(HOST_OS_API)_debug)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(PLATFORM)_debug)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
else
$1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(HOST_OS_API)_release)
- $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(PLATFORM)_release)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
endif
- # Pickup extra HOST_OS_API and/or PLATFORM dependent variables for CXXFLAGS.
- $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(HOST_OS_API)) $$($1_CXXFLAGS_$(PLATFORM))
+ # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
+ $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
ifneq ($(DEBUG_LEVEL),release)
# Pickup extra debug dependent variables for CXXFLAGS
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(HOST_OS_API)_debug)
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(PLATFORM)_debug)
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
else
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(HOST_OS_API)_release)
- $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(PLATFORM)_release)
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+ $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
endif
ifeq ($$($1_CXXFLAGS),)
@@ -232,33 +327,62 @@ define SetupNativeCompilation
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
endif
+ ifneq (no, $(ENABLE_DEBUG_SYMBOLS))
+ ifneq ($(OPENJDK_TARGET_OS), solaris)
+#
+# There is very weird code in Defs-solaris.gmk that first sets variables as decribed below
+# and then a couple of hundreds of line below resets them...
+# this feels like a sure bug...but before this is confirmed, mimic this behaviour
+# (note: skip indenting this as it will surely be removed anyway)
+#
+
+ ifneq (,$$($1_DEBUG_SYMBOLS))
+ $1_OPTIMIZATION := LOW
+ $1_EXTRA_CFLAGS += $(CFLAGS_DEBUG_SYMBOLS)
+ $1_EXTRA_CXXFLAGS += $(CXXFLAGS_DEBUG_SYMBOLS)
+ endif
+
+#
+ endif
+#
+ endif
+
+ ifeq (NONE, $$($1_OPTIMIZATION))
+ $1_EXTRA_CFLAGS += $$(C_O_FLAG_NONE)
+ $1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NONE)
+ else ifeq (LOW, $$($1_OPTIMIZATION))
+ $1_EXTRA_CFLAGS += $$(C_O_FLAG_NORM)
+ $1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NORM)
+ else ifeq (HIGH, $$($1_OPTIMIZATION))
+ $1_EXTRA_CFLAGS += $$(C_O_FLAG_HI)
+ $1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HI)
+ else ifeq (HIGHEST, $$($1_OPTIMIZATION))
+ $1_EXTRA_CFLAGS += $$(C_O_FLAG_HIGHEST)
+ $1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HIGHEST)
+ else ifneq (, $$($1_OPTIMIZATION))
+ $$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
+ endif
+
# Now create a list of the packages that are about to compile. Used when sending source
# in a batch to the compiler.
- $$(shell $(RM) $$($1_BIN)/_the.list_of_sources)
- $$(eval $$(call ListPathsSafelyNow,$1_SRCS,\n, >> $$($1_BIN)/_the.list_of_sources))
+ $$(shell $(RM) $$($1_OBJECT_DIR)/_the.list_of_sources)
+ $$(eval $$(call ListPathsSafelyNow,$1_SRCS,\n, >> $$($1_OBJECT_DIR)/_the.list_of_sources))
# Now call add_native_source for each source file we are going to compile.
$$(foreach p,$$($1_SRCS),\
- $$(eval $$(call add_native_source,$1,$$p,$$($1_BIN),\
- $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$(CC),\
- $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX))))
+ $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\
+ $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC),\
+ $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
# On windows we need to create a resource file
- ifeq ($(HOST_OS_API), winapi)
+ ifeq ($(OPENJDK_TARGET_OS_API), winapi)
ifneq (,$$($1_VERSIONINFO_RESOURCE))
- ifneq (,$$($1_LIB))
- $1_BASENAME:=$$(basename $$(notdir $$($1_LIB)))
- endif
- ifneq (,$$($1_EXE))
- $1_BASENAME:=$$(basename $$(notdir $$($1_EXE)))
- endif
- $1_RES:=$$($1_BIN)/$$($1_BASENAME).res
+ $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
$$($1_RES): $$($1_VERSIONINFO_RESOURCE)
$(RC) $$($1_RC_FLAGS) $(CC_OUT_OPTION)$$@ $$($1_VERSIONINFO_RESOURCE)
endif
ifneq (,$$($1_MANIFEST))
- $1_PROGRAM:=$$(basename $$(notdir $$($1_EXE)))
- $1_GEN_MANIFEST:=$$($1_BIN)/$$($1_PROGRAM).manifest
+ $1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
IMVERSIONVALUE:=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
$$($1_GEN_MANIFEST): $$($1_MANIFEST)
$(SED) 's%IMVERSION%$$(IMVERSIONVALUE)%g;s%PROGRAM%$$($1_PROGRAM)%g' $$< > $$@
@@ -266,54 +390,184 @@ define SetupNativeCompilation
endif
# mapfile doesnt seem to be implemented on macosx (yet??)
- ifneq ($(HOST_OS),macosx)
- ifneq ($(HOST_OS),windows)
- $1_REAL_MAPFILE := $$($1_MAPFILE)
+ ifneq ($(OPENJDK_TARGET_CPU),ppc)
+ ifneq ($(OPENJDK_TARGET_CPU),arm)
+ ifneq ($(OPENJDK_TARGET_OS),macosx)
+ ifneq ($(OPENJDK_TARGET_OS),windows)
+ $1_REAL_MAPFILE:=$$($1_MAPFILE)
ifneq (,$$($1_REORDER))
- $1_REAL_MAPFILE := $$($1_BIN)/mapfile
+ $1_REAL_MAPFILE:=$$($1_OBJECT_DIR)/mapfile
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
$$(MKDIR) -p $$(@D)
$$(CP) $$($1_MAPFILE) $$@.tmp
- $$(SED) -e 's=OUTPUTDIR=$$($1_BIN)=' $$($1_REORDER) >> $$@.tmp
+ $$(SED) -e 's=OUTPUTDIR=$$($1_OBJECT_DIR)=' $$($1_REORDER) >> $$@.tmp
$$(MV) $$@.tmp $$@
endif
endif
endif
+ endif
+ endif
- # Pickup extra HOST_OS_API dependent variables (posix or winapi) and
+ # Pickup extra OPENJDK_TARGET_OS_API dependent variables (posix or winapi) and
# (linux,solaris,windows,bsd) for LDFLAGS and LDFLAGS_SUFFIX
- $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(HOST_OS_API)) $$($1_LDFLAGS_$(PLATFORM))
- $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(HOST_OS_API)) $$($1_LDFLAGS_SUFFIX_$(PLATFORM))
+ $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
+ $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
ifneq (,$$($1_REAL_MAPFILE))
- $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
+ $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
endif
- ifneq (,$$($1_LIB))
- ifeq (dynamic,$$(patsubst %$(SHARED_LIBRARY_SUFFIX),dynamic,$$($1_LIB)))
- # Generating a dynamic library.
- $1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$(notdir $$($1_LIB)))
- $$($1_LIB) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
- $$(call LINKING_MSG,$$(notdir $$($1_LIB)))
- $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$($1_LIB) \
- $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
- else
- # Generating a static library, ie object file archive.
- $$($1_LIB) : $$($1_EXPECTED_OBJS) $$($1_RES)
- $$(call ARCHIVING_MSG,$$(notdir $$($1_LIB)))
- $(AR) $$($1_AR_FLAGS) $(AR_OUT_OPTION)$$($1_LIB) $$($1_EXPECTED_OBJS) \
- $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
- endif
+ $1 := $$($1_TARGET)
+ ifneq (,$$($1_LIBRARY))
+ # Generating a dynamic library.
+ $1_EXTRA_LDFLAGS+=$$(call SET_SHARED_LIBRARY_NAME,$$($1_BASENAME))
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1_EXTRA_LDFLAGS+="-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
+ endif
+
+ ifneq (,$$($1_DEBUG_SYMBOLS))
+ ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
+ "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
+ endif
+
+ $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
+ $(CP) $$< $$@
+
+
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+ # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+ # empty section headers until a fixed $(OBJCOPY) is available.
+ # An empty section header has sh_addr == 0 and sh_size == 0.
+ # This problem has only been seen on Solaris X64, but we call this tool
+ # on all Solaris builds just in case.
+ #
+ # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+ # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
+ $(RM) $$@
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $$<
+ $(OBJCOPY) --only-keep-debug $$< $$@
+ $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
+ else # not solaris
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
+ $(RM) $$@
+ $(OBJCOPY) --only-keep-debug $$< $$@
+ $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+ endif # Touch to not retrigger rule on rebuild
+ $(TOUCH) $$@
+
+ ifeq ($(ZIP_DEBUGINFO_FILES), 1)
+ $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
+
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET)
+ $(CD) $$($1_OBJECT_DIR) \
+ && $(ZIP) -q $$@ $$($1_LIBRARY).map $$($1_LIBRARY).pdb
+ else
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz : $$($1_TARGET) \
+ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+ $(CD) $$($1_OBJECT_DIR) \
+ && $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+ endif
+ else
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
+ $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
+ else
+ $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
+ endif
+ endif
+ endif
+ endif
+
+ $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE)
+ $$(call LINKING_MSG,$$($1_BASENAME))
+ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
+ $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
+ $$($1_EXTRA_LDFLAGS_SUFFIX)
+
endif
- ifneq (,$$($1_EXE))
+
+ ifneq (,$$($1_STATIC_LIBRARY))
+ # Generating a static library, ie object file archive.
+ $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES)
+ $$(call ARCHIVING_MSG,$$($1_LIBRARY))
+ $(AR) $$($1_AR_FLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
+ $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
+ endif
+
+ ifneq (,$$($1_PROGRAM))
# A executable binary has been specified, setup the target for it.
- $$($1_EXE) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
- $$(call LINKING_EXE_MSG,$$(notdir $$($1_EXE)))
- $$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_EXE) \
+ ifneq (,$$($1_DEBUG_SYMBOLS))
+ ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
+ "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
+ endif
+
+ $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
+ $(CP) $$< $$@
+
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+ # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+ # empty section headers until a fixed $(OBJCOPY) is available.
+ # An empty section header has sh_addr == 0 and sh_size == 0.
+ # This problem has only been seen on Solaris X64, but we call this tool
+ # on all Solaris builds just in case.
+ #
+ # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+ # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+ $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
+ $(RM) $$@
+ $(FIX_EMPTY_SEC_HDR_FLAGS) $$<
+ $(OBJCOPY) --only-keep-debug $$< $$@
+ $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$<
+ else # not solaris
+ $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
+ $(RM) $$@
+ $(OBJCOPY) --only-keep-debug $$< $$@
+ $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+ endif
+ $(TOUCH) $$@
+
+ ifeq ($(ZIP_DEBUGINFO_FILES), 1)
+ $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
+
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $$($1_OBJECT_DIR)/$$($1_PROGRAM).diz : $$($1_TARGET)
+ $(CD) $$($1_OBJECT_DIR) \
+ && $(ZIP) -q $$@ $$($1_PROGRAM).map $$($1_PROGRAM).pdb
+ else
+ $$($1_OBJECT_DIR)/$$(PROGRAM_PREFIX)$$($1_PROGRAM).diz : $$($1_TARGET) \
+ $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo
+ $(CD) $$($1_OBJECT_DIR) \
+ && $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo
+ endif
+ else
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
+ $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
+ else
+ $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
+ endif
+ endif
+ endif
+ endif
+
+ $$($1_TARGET) : $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST)
+ $$(call LINKING_EXE_MSG,$$($1_BASENAME))
+ $$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
$$($1_EXTRA_LDFLAGS_SUFFIX)
ifneq (,$$($1_GEN_MANIFEST))
$(MT) -nologo /manifest $$($1_GEN_MANIFEST) /outputresource:$$@;#1
endif
+
endif
endef
diff --git a/common/makefiles/RMICompile.gmk b/common/makefiles/RMICompilation.gmk
similarity index 97%
rename from common/makefiles/RMICompile.gmk
rename to common/makefiles/RMICompilation.gmk
index b6168dae7be..65ba9e621f9 100644
--- a/common/makefiles/RMICompile.gmk
+++ b/common/makefiles/RMICompilation.gmk
@@ -42,6 +42,7 @@ define SetupRMICompilation
$(if $7,$1_$(strip $7))
$(if $8,$1_$(strip $8))
$(if $9,$1_$(strip $9))
+ $(if $(10),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
$1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
diff --git a/corba/.hgtags b/corba/.hgtags
index fa937dfa1e9..b050c3a8b3c 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -166,3 +166,8 @@ b8cbfb31139f820e5e094ba71449e58159fbe22e jdk8-b38
79cc42c9c71bbd6630ede681642e98f5e4a841fa jdk8-b42
cd879aff5d3cc1f58829aab3116880aa19525b78 jdk8-b43
439d9bf8e4ff204cc89c9974c1515a508b2cc6ff jdk8-b44
+747dad9e9d37d244a5c765a1afe9194f7ddae118 jdk8-b45
+30141e598d72a6146126cb86b034ed6d0bd191b3 jdk8-b46
+21e46ea21c6a26246fb7a1926ac7fe8d580d0518 jdk8-b47
+7e2b179a5b4dbd3f097e28daa00abfcc72ba3e0b jdk8-b48
+fe44e58a6bdbeae350ce96aafb49770a5dca5d8a jdk8-b49
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java b/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java
index 4b08a1ce249..3e698764e8d 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -22,7 +22,6 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-
package com.sun.corba.se.impl.encoding;
import java.util.Hashtable;
@@ -32,7 +31,8 @@ import com.sun.org.omg.SendingContext.CodeBaseHelper;
import com.sun.org.omg.SendingContext._CodeBaseImplBase;
import com.sun.org.omg.SendingContext._CodeBaseStub;
import com.sun.corba.se.spi.transport.CorbaConnection;
-
+import com.sun.corba.se.spi.ior.IOR;
+import com.sun.corba.se.spi.orb.ORB;
/**
* Provides the reading side with a per connection cache of
* info obtained via calls to the remote CodeBase.
@@ -51,14 +51,24 @@ import com.sun.corba.se.spi.transport.CorbaConnection;
*
* Needs cache management.
*/
-// REVISIT: revert to package protected after framework merge.
public class CachedCodeBase extends _CodeBaseImplBase
{
private Hashtable implementations, fvds, bases;
- private CodeBase delegate;
+ private volatile CodeBase delegate;
private CorbaConnection conn;
- private static Hashtable iorToCodeBaseObjMap = new Hashtable();
+ private static Object iorMapLock = new Object();
+ private static Hashtable iorMap = new Hashtable<>();
+
+ public static synchronized void cleanCache( ORB orb ) {
+ synchronized (iorMapLock) {
+ for (IOR ior : iorMap.keySet()) {
+ if (ior.getORB() == orb) {
+ iorMap.remove(ior);
+ }
+ }
+ }
+ }
public CachedCodeBase(CorbaConnection connection) {
conn = connection;
@@ -68,7 +78,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
return null;
}
- public String implementation (String repId) {
+ public synchronized String implementation (String repId) {
String urlResult = null;
if (implementations == null)
@@ -86,7 +96,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
return urlResult;
}
- public String[] implementations (String[] repIds) {
+ public synchronized String[] implementations (String[] repIds) {
String[] urlResults = new String[repIds.length];
for (int i = 0; i < urlResults.length; i++)
@@ -95,7 +105,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
return urlResults;
}
- public FullValueDescription meta (String repId) {
+ public synchronized FullValueDescription meta (String repId) {
FullValueDescription result = null;
if (fvds == null)
@@ -113,7 +123,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
return result;
}
- public FullValueDescription[] metas (String[] repIds) {
+ public synchronized FullValueDescription[] metas (String[] repIds) {
FullValueDescription[] results
= new FullValueDescription[repIds.length];
@@ -123,7 +133,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
return results;
}
- public String[] bases (String repId) {
+ public synchronized String[] bases (String repId) {
String[] results = null;
@@ -145,7 +155,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
// Ensures that we've used the connection's IOR to create
// a valid CodeBase delegate. If this returns false, then
// it is not valid to access the delegate.
- private boolean connectedCodeBase() {
+ private synchronized boolean connectedCodeBase() {
if (delegate != null)
return true;
@@ -165,7 +175,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
return false;
}
- synchronized(this) {
+ synchronized(iorMapLock) {
// Recheck the condition to make sure another
// thread didn't already do this while we waited
@@ -173,7 +183,8 @@ public class CachedCodeBase extends _CodeBaseImplBase
return true;
// Do we have a reference initialized by another connection?
- delegate = (CodeBase)CachedCodeBase.iorToCodeBaseObjMap.get(conn.getCodeBaseIOR());
+ delegate = CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());
+
if (delegate != null)
return true;
@@ -181,8 +192,7 @@ public class CachedCodeBase extends _CodeBaseImplBase
delegate = CodeBaseHelper.narrow(getObjectFromIOR());
// Save it for the benefit of other connections
- CachedCodeBase.iorToCodeBaseObjMap.put(conn.getCodeBaseIOR(),
- delegate);
+ CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(), delegate);
}
// It's now safe to use the delegate
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java
index e8c6d1560fc..e7d7ae27e76 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -58,7 +58,7 @@ import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
import org.omg.PortableInterceptor.TRANSPORT_RETRY;
import org.omg.PortableInterceptor.USER_EXCEPTION;
import org.omg.PortableInterceptor.PolicyFactory;
-import org.omg.PortableInterceptor.ObjectReferenceTemplate ;
+import org.omg.PortableInterceptor.ObjectReferenceTemplate;
import com.sun.corba.se.pept.encoding.OutputObject;
@@ -112,10 +112,10 @@ public class PIHandlerImpl implements PIHandler
}
}
- private ORB orb ;
- InterceptorsSystemException wrapper ;
- ORBUtilSystemException orbutilWrapper ;
- OMGSystemException omgWrapper ;
+ private ORB orb;
+ InterceptorsSystemException wrapper;
+ ORBUtilSystemException orbutilWrapper;
+ OMGSystemException omgWrapper;
// A unique id used in ServerRequestInfo.
// This does not correspond to the GIOP request id.
@@ -178,6 +178,21 @@ public class PIHandlerImpl implements PIHandler
}
};
+ public void close() {
+ orb = null;
+ wrapper = null;
+ orbutilWrapper = null;
+ omgWrapper = null;
+ codecFactory = null;
+ arguments = null;
+ interceptorList = null;
+ interceptorInvoker = null;
+ current = null;
+ policyFactoryTable = null;
+ threadLocalClientRequestInfoStack = null;
+ threadLocalServerRequestInfoStack = null;
+ }
+
// Class to contain all ThreadLocal data for ClientRequestInfo
// maintenance.
//
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PINoOpHandlerImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PINoOpHandlerImpl.java
index e6d9e53609f..93c047b76cd 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PINoOpHandlerImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/PINoOpHandlerImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -69,6 +69,9 @@ public class PINoOpHandlerImpl implements PIHandler
public PINoOpHandlerImpl( ) {
}
+ public void close() {
+ }
+
public void initialize() {
}
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerFactoryImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerFactoryImpl.java
index eb365213270..a88d2f2f697 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerFactoryImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -34,14 +34,18 @@ public class MonitoringManagerFactoryImpl implements MonitoringManagerFactory {
private HashMap monitoringManagerTable = new HashMap();
public synchronized MonitoringManager createMonitoringManager(
- String nameOfTheRoot, String description )
+ String nameOfTheRoot, String description)
{
MonitoringManagerImpl m = null;
m = (MonitoringManagerImpl)monitoringManagerTable.get(nameOfTheRoot);
if (m == null) {
- m = new MonitoringManagerImpl( nameOfTheRoot, description );
+ m = new MonitoringManagerImpl(nameOfTheRoot, description);
monitoringManagerTable.put(nameOfTheRoot, m);
}
return m;
}
+
+ public synchronized void remove(String nameOfTheRoot) {
+ monitoringManagerTable.remove(nameOfTheRoot);
+ }
}
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerImpl.java
index 4e97a73815c..b7e676eafed 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/monitoring/MonitoringManagerImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,6 +26,7 @@
package com.sun.corba.se.impl.monitoring;
import com.sun.corba.se.spi.monitoring.MonitoringManager;
+import com.sun.corba.se.spi.monitoring.MonitoringManagerFactory;
import com.sun.corba.se.spi.monitoring.MonitoredObject;
import com.sun.corba.se.spi.monitoring.MonitoredObjectFactory;
import com.sun.corba.se.spi.monitoring.MonitoringFactories;
@@ -33,18 +34,24 @@ import com.sun.corba.se.spi.monitoring.MonitoringFactories;
public class MonitoringManagerImpl implements MonitoringManager {
private final MonitoredObject rootMonitoredObject;
- MonitoringManagerImpl( String nameOfTheRoot, String description ) {
+ MonitoringManagerImpl(String nameOfTheRoot, String description) {
MonitoredObjectFactory f =
MonitoringFactories.getMonitoredObjectFactory();
rootMonitoredObject =
- f.createMonitoredObject( nameOfTheRoot, description );
+ f.createMonitoredObject(nameOfTheRoot, description);
}
- public void clearState( ) {
- rootMonitoredObject.clearState( );
+ public void clearState() {
+ rootMonitoredObject.clearState();
}
- public MonitoredObject getRootMonitoredObject( ) {
+ public MonitoredObject getRootMonitoredObject() {
return rootMonitoredObject;
}
+
+ public void close() {
+ MonitoringManagerFactory f =
+ MonitoringFactories.getMonitoringManagerFactory();
+ f.remove(rootMonitoredObject.getName());
+ }
}
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
index 65d8246f7ad..9c03173238b 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -23,35 +23,37 @@
* questions.
*/
-package com.sun.corba.se.impl.orb ;
+package com.sun.corba.se.impl.orb;
import java.applet.Applet;
-import java.io.IOException ;
+import java.io.IOException;
import java.lang.reflect.Constructor;
-import java.lang.reflect.Field ;
-import java.lang.reflect.Modifier ;
-import java.lang.reflect.InvocationTargetException ;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList ;
-import java.util.Iterator ;
-import java.util.Properties ;
-import java.util.Vector ;
-import java.util.Hashtable ;
-import java.util.Map ;
-import java.util.HashMap ;
-import java.util.LinkedList ;
-import java.util.Collection ;
-import java.util.Collections ;
-import java.util.StringTokenizer ;
-import java.util.Enumeration ;
-import java.util.WeakHashMap ;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Vector;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.StringTokenizer;
+import java.util.Enumeration;
+import java.util.WeakHashMap;
-import java.net.InetAddress ;
+import java.net.InetAddress;
import java.security.PrivilegedAction;
-import java.security.AccessController ;
+import java.security.AccessController;
import javax.rmi.CORBA.Util;
import javax.rmi.CORBA.ValueHandler;
@@ -82,18 +84,18 @@ import org.omg.CORBA.ORBPackage.InvalidName;
import com.sun.org.omg.SendingContext.CodeBase;
import com.sun.corba.se.pept.broker.Broker;
-import com.sun.corba.se.pept.protocol.ClientInvocationInfo ;
+import com.sun.corba.se.pept.protocol.ClientInvocationInfo;
import com.sun.corba.se.pept.transport.ContactInfo;
import com.sun.corba.se.pept.transport.ConnectionCache;
import com.sun.corba.se.pept.transport.TransportManager;
import com.sun.corba.se.spi.ior.IOR;
-import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder ;
+import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder;
import com.sun.corba.se.spi.ior.TaggedComponentFactoryFinder;
-import com.sun.corba.se.spi.ior.IORFactories ;
-import com.sun.corba.se.spi.ior.ObjectKey ;
-import com.sun.corba.se.spi.ior.ObjectKeyFactory ;
-import com.sun.corba.se.spi.ior.iiop.IIOPFactories ;
+import com.sun.corba.se.spi.ior.IORFactories;
+import com.sun.corba.se.spi.ior.ObjectKey;
+import com.sun.corba.se.spi.ior.ObjectKeyFactory;
+import com.sun.corba.se.spi.ior.iiop.IIOPFactories;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import com.sun.corba.se.spi.oa.OAInvocationInfo;
import com.sun.corba.se.spi.oa.ObjectAdapterFactory;
@@ -122,10 +124,10 @@ import com.sun.corba.se.spi.orb.StringPair;
import com.sun.corba.se.spi.transport.CorbaContactInfoListFactory;
import com.sun.corba.se.spi.transport.CorbaTransportManager;
import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketManager;
-import com.sun.corba.se.spi.copyobject.CopierManager ;
-import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults ;
-import com.sun.corba.se.spi.presentation.rmi.PresentationManager ;
-import com.sun.corba.se.spi.presentation.rmi.StubAdapter ;
+import com.sun.corba.se.spi.copyobject.CopierManager;
+import com.sun.corba.se.spi.presentation.rmi.PresentationDefaults;
+import com.sun.corba.se.spi.presentation.rmi.PresentationManager;
+import com.sun.corba.se.spi.presentation.rmi.StubAdapter;
import com.sun.corba.se.spi.servicecontext.ServiceContextRegistry;
import com.sun.corba.se.impl.corba.TypeCodeFactory;
@@ -140,6 +142,7 @@ import com.sun.corba.se.impl.corba.AnyImpl;
import com.sun.corba.se.impl.corba.RequestImpl;
import com.sun.corba.se.impl.dynamicany.DynAnyFactoryImpl;
import com.sun.corba.se.impl.encoding.EncapsOutputStream;
+import com.sun.corba.se.impl.encoding.CachedCodeBase;
import com.sun.corba.se.impl.interceptors.PIHandlerImpl;
import com.sun.corba.se.impl.interceptors.PINoOpHandlerImpl;
import com.sun.corba.se.impl.ior.TaggedComponentFactoryFinderImpl;
@@ -185,6 +188,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
private java.lang.Object runObj = new java.lang.Object();
private java.lang.Object shutdownObj = new java.lang.Object();
+ private java.lang.Object waitForCompletionObj = new java.lang.Object();
private static final byte STATUS_OPERATING = 1;
private static final byte STATUS_SHUTTING_DOWN = 2;
private static final byte STATUS_SHUTDOWN = 3;
@@ -193,6 +197,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
// XXX Should we move invocation tracking to the first level server dispatcher?
private java.lang.Object invocationObj = new java.lang.Object();
+ private int numInvocations = 0;
// thread local variable to store a boolean to detect deadlock in
// ORB.shutdown(true).
@@ -220,8 +225,6 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
private int transientServerId ;
- private ThreadGroup threadGroup ;
-
private ServiceContextRegistry serviceContextRegistry ;
// Needed here to implement connect/disconnect
@@ -265,6 +268,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
private final Object urlOperationLock = new java.lang.Object() ;
private CorbaServerRequestDispatcher insNamingDelegate ;
+
// resolverLock must be used for all access to either resolver or
// localResolver, since it is possible for the resolver to indirectly
// refer to the localResolver. Also used to protect access to
@@ -279,6 +283,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
private ObjectKeyFactory objectKeyFactory ;
+ private boolean orbOwnsThreadPoolManager = false ;
+
private ThreadPoolManager threadpoolMgr;
private void dprint( String msg )
@@ -322,11 +328,17 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public ORBVersion getORBVersion()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
return (ORBVersion)(orbVersionThreadLocal.get()) ;
}
public void setORBVersion(ORBVersion verObj)
{
+ synchronized (this) {
+ checkShutdownState();
+ }
orbVersionThreadLocal.set(verObj);
}
@@ -347,46 +359,6 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
// end of this method.
pihandler = new PINoOpHandlerImpl( );
- // See bugs 4916766 and 4936203
- // We intend to create new threads in a reliable thread group.
- // This avoids problems if the application/applet
- // creates a thread group, makes JavaIDL calls which create a new
- // connection and ReaderThread, and then destroys the thread
- // group. If our ReaderThreads were to be part of such destroyed thread
- // group then it might get killed and cause other invoking threads
- // sharing the same connection to get a non-restartable
- // CommunicationFailure. We'd like to avoid that.
- //
- // Our solution is to create all of our threads in the highest thread
- // group that we have access to, given our own security clearance.
- //
- try {
- // try to get a thread group that's as high in the threadgroup
- // parent-child hierarchy, as we can get to.
- // this will prevent an ORB thread created during applet-init from
- // being killed when an applet dies.
- threadGroup = (ThreadGroup) AccessController.doPrivileged(
- new PrivilegedAction() {
- public Object run() {
- ThreadGroup tg = Thread.currentThread().getThreadGroup() ;
- ThreadGroup ptg = tg ;
- try {
- while (ptg != null) {
- tg = ptg;
- ptg = tg.getParent();
- }
- } catch (SecurityException se) {
- // Discontinue going higher on a security exception.
- }
- return new ThreadGroup(tg, "ORB ThreadGroup");
- }
- }
- );
- } catch (SecurityException e) {
- // something wrong, we go back to the original code
- threadGroup = Thread.currentThread().getThreadGroup();
- }
-
// This is the unique id of this server (JVM). Multiple incarnations
// of this server will get different ids.
// Compute transientServerId = milliseconds since Jan 1, 1970
@@ -547,6 +519,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void set_parameters( Properties props )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
preInit( null, props ) ;
DataCollector dataCollector =
DataCollectorFactory.create( props, getLocalHostName() ) ;
@@ -788,6 +763,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public void notifyORB()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (this.svResponseReceived) {
this.svResponseReceived.set();
this.svResponseReceived.notify();
@@ -854,6 +832,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
// Note that we connect this if we have not already done so.
public synchronized IOR getFVDCodeBaseIOR()
{
+ checkShutdownState();
+
if (codeBaseIOR != null) // i.e. We are already connected to it
return codeBaseIOR;
@@ -1118,6 +1098,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public synchronized void setTypeCodeForClass(Class c, TypeCodeImpl tci)
{
+ checkShutdownState();
+
if (typeCodeForClassMap == null)
typeCodeForClassMap = Collections.synchronizedMap(
new WeakHashMap(64));
@@ -1128,6 +1110,8 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public synchronized TypeCodeImpl getTypeCodeForClass(Class c)
{
+ checkShutdownState();
+
if (typeCodeForClassMap == null)
return null;
return (TypeCodeImpl)typeCodeForClassMap.get(c);
@@ -1210,6 +1194,10 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
{
CorbaServerRequestDispatcher insnd ;
+ synchronized (this) {
+ checkShutdownState();
+ }
+
if ((id == null) || (id.length() == 0))
throw new InvalidName() ;
@@ -1253,66 +1241,88 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
}
}
- public void shutdown(boolean wait_for_completion)
- {
- // to wait for completion, we would deadlock, so throw a standard
- // OMG exception.
- if (wait_for_completion && ((Boolean)isProcessingInvocation.get()).booleanValue()) {
- throw omgWrapper.shutdownWaitForCompletionDeadlock() ;
- }
-
- boolean doShutdown = false ;
+ public void shutdown(boolean wait_for_completion) {
+ boolean wait = false;
synchronized (this) {
- checkShutdownState() ;
+ checkShutdownState();
+
+ // This is to avoid deadlock: don't allow a thread that is
+ // processing a request to call shutdown( true ), because
+ // the shutdown would block waiting for the request to complete,
+ // while the request would block waiting for shutdown to complete.
+ if (wait_for_completion &&
+ isProcessingInvocation.get() == Boolean.TRUE) {
+ throw omgWrapper.shutdownWaitForCompletionDeadlock();
+ }
if (status == STATUS_SHUTTING_DOWN) {
- if (!wait_for_completion)
- // If we are already shutting down and don't want
- // to wait, nothing to do: return.
- return ;
- } else {
- // The ORB status was STATUS_OPERATING, so start the shutdown.
- status = STATUS_SHUTTING_DOWN ;
- doShutdown = true ;
+ if (wait_for_completion) {
+ wait = true;
+ } else {
+ return;
+ }
}
+
+ status = STATUS_SHUTTING_DOWN;
}
- // At this point, status is SHUTTING_DOWN.
- // All shutdown calls with wait_for_completion == true must synchronize
- // here. Only the first call will be made with doShutdown == true.
+ // Avoid more than one thread performing shutdown at a time.
synchronized (shutdownObj) {
- if (doShutdown) {
- // shutdownServants will set all POAManagers into the
- // INACTIVE state, causing request to be rejected.
- // If wait_for_completion is true, this will not return until
- // all invocations have completed.
+ // At this point, the ORB status is certainly STATUS_SHUTTING_DOWN.
+ // If wait is true, another thread already called shutdown( true ),
+ // and so we wait for completion
+ if (wait) {
+ while (true) {
+ synchronized (this) {
+ if (status == STATUS_SHUTDOWN)
+ break;
+ }
+
+ try {
+ shutdownObj.wait();
+ } catch (InterruptedException exc) {
+ // NOP: just loop and wait until state is changed
+ }
+ }
+ } else {
+ // perform the actual shutdown
shutdownServants(wait_for_completion);
+ if (wait_for_completion) {
+ synchronized ( waitForCompletionObj ) {
+ while (numInvocations > 0) {
+ try {
+ waitForCompletionObj.wait();
+ } catch (InterruptedException ex) {}
+ }
+ }
+ }
+
synchronized (runObj) {
runObj.notifyAll();
}
- synchronized (this) {
- status = STATUS_SHUTDOWN;
- }
+ status = STATUS_SHUTDOWN;
+
+ shutdownObj.notifyAll();
}
}
}
- /** This method shuts down the ORB and causes orb.run() to return.
- * It will cause all POAManagers to be deactivated, which in turn
- * will cause all POAs to be deactivated.
- */
+ // Cause all ObjectAdapaterFactories to clean up all of their internal state, which
+ // may include activated objects that have associated state and callbacks that must
+ // complete in order to shutdown. This will cause new request to be rejected.
protected void shutdownServants(boolean wait_for_completion) {
- Iterator iter = requestDispatcherRegistry.getObjectAdapterFactories().iterator() ;
- while (iter.hasNext()) {
- ObjectAdapterFactory oaf = (ObjectAdapterFactory)iter.next() ;
- oaf.shutdown( wait_for_completion ) ;
+ Set oaset;
+ synchronized (this) {
+ oaset = new HashSet<>(requestDispatcherRegistry.getObjectAdapterFactories());
}
+
+ for (ObjectAdapterFactory oaf : oaset)
+ oaf.shutdown(wait_for_completion);
}
- // REVISIT: was protected - made public for framework
// Note that the caller must hold the ORBImpl lock.
public void checkShutdownState()
{
@@ -1327,21 +1337,40 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public boolean isDuringDispatch()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
Boolean value = (Boolean)(isProcessingInvocation.get()) ;
return value.booleanValue() ;
}
public void startingDispatch()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (invocationObj) {
isProcessingInvocation.set(Boolean.TRUE);
+ numInvocations++;
}
}
public void finishedDispatch()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (invocationObj) {
- isProcessingInvocation.set(Boolean.FALSE);
+ numInvocations--;
+ isProcessingInvocation.set(false);
+ if (numInvocations == 0) {
+ synchronized (waitForCompletionObj) {
+ waitForCompletionObj.notifyAll();
+ }
+ } else if (numInvocations < 0) {
+ throw wrapper.numInvocationsAlreadyZero(
+ CompletionStatus.COMPLETED_YES);
+ }
}
}
@@ -1350,12 +1379,12 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
* not been shut down, it will start the shutdown process and block until
* the ORB has shut down before it destroys the ORB."
*/
- public synchronized void destroy()
+ public void destroy()
{
- boolean shutdownFirst = false ;
+ boolean shutdownFirst = false;
synchronized (this) {
- shutdownFirst = (status == STATUS_OPERATING) ;
+ shutdownFirst = (status == STATUS_OPERATING);
}
if (shutdownFirst) {
@@ -1365,11 +1394,76 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
synchronized (this) {
if (status < STATUS_DESTROYED) {
getCorbaTransportManager().close();
- getPIHandler().destroyInterceptors() ;
+ getPIHandler().destroyInterceptors();
status = STATUS_DESTROYED;
}
}
+ synchronized (threadPoolManagerAccessLock) {
+ if (orbOwnsThreadPoolManager) {
+ try {
+ threadpoolMgr.close();
+ threadpoolMgr = null;
+ } catch (IOException exc) {
+ wrapper.ioExceptionOnClose(exc);
+ }
+ }
+ }
+ try {
+ monitoringManager.close();
+ monitoringManager = null;
+ } catch (IOException exc) {
+ wrapper.ioExceptionOnClose(exc);
+ }
+
+ CachedCodeBase.cleanCache(this);
+ try {
+ pihandler.close();
+ } catch (IOException exc) {
+ wrapper.ioExceptionOnClose(exc);
+ }
+
+ super.destroy();
+
+ badServerIdHandlerAccessLock = null;
+ clientDelegateFactoryAccessorLock = null;
+ corbaContactInfoListFactoryAccessLock = null;
+
+ objectKeyFactoryAccessLock = null;
+ legacyServerSocketManagerAccessLock = null;
+ threadPoolManagerAccessLock = null;
+ transportManager = null;
+ legacyServerSocketManager = null;
+ OAInvocationInfoStack = null;
+ clientInvocationInfoStack = null;
+ codeBaseIOR = null;
+ dynamicRequests = null;
+ svResponseReceived = null;
+ runObj = null;
+ shutdownObj = null;
+ waitForCompletionObj = null;
+ invocationObj = null;
+ isProcessingInvocation = null;
+ typeCodeForClassMap = null;
+ valueFactoryCache = null;
+ orbVersionThreadLocal = null;
+ requestDispatcherRegistry = null;
+ copierManager = null;
+ toaFactory = null;
+ poaFactory = null;
+ pihandler = null;
+ configData = null;
+ badServerIdHandler = null;
+ clientDelegateFactory = null;
+ corbaContactInfoListFactory = null;
+ resolver = null;
+ localResolver = null;
+ insNamingDelegate = null;
+ urlOperation = null;
+ taggedComponentFactoryFinder = null;
+ taggedProfileFactoryFinder = null;
+ taggedProfileTemplateFactoryFinder = null;
+ objectKeyFactory = null;
}
/**
@@ -1434,18 +1528,27 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public OAInvocationInfo peekInvocationInfo()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
return (OAInvocationInfo)(stack.peek()) ;
}
public void pushInvocationInfo( OAInvocationInfo info )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
stack.push( info ) ;
}
public OAInvocationInfo popInvocationInfo()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
StackImpl stack = (StackImpl)(OAInvocationInfoStack.get()) ;
return (OAInvocationInfo)(stack.pop()) ;
}
@@ -1459,6 +1562,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void initBadServerIdHandler()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (badServerIdHandlerAccessLock) {
Class cls = configData.getBadServerIdHandler() ;
if (cls != null) {
@@ -1477,6 +1583,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void setBadServerIdHandler( BadServerIdHandler handler )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (badServerIdHandlerAccessLock) {
badServerIdHandler = handler;
}
@@ -1484,6 +1593,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void handleBadServerId( ObjectKey okey )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (badServerIdHandlerAccessLock) {
if (badServerIdHandler == null)
throw wrapper.badServerId() ;
@@ -1532,6 +1644,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public int getTransientServerId()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
if( configData.getORBServerIdPropertySpecified( ) ) {
// ORBServerId is specified then use that value
return configData.getPersistentServerId( );
@@ -1541,11 +1656,17 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public RequestDispatcherRegistry getRequestDispatcherRegistry()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
return requestDispatcherRegistry;
}
public ServiceContextRegistry getServiceContextRegistry()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
return serviceContextRegistry ;
}
@@ -1563,12 +1684,18 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
// XXX What about multi-homed host?
public boolean isLocalHost( String hostName )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
return hostName.equals( configData.getORBServerHost() ) ||
hostName.equals( getLocalHostName() ) ;
}
public boolean isLocalServerId( int subcontractId, int serverId )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
if ((subcontractId < ORBConstants.FIRST_POA_SCID) ||
(subcontractId > ORBConstants.MAX_POA_SCID))
return serverId == getTransientServerId( ) ;
@@ -1659,6 +1786,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public ClientInvocationInfo createOrIncrementInvocationInfo()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
StackImpl invocationInfoStack =
(StackImpl) clientInvocationInfoStack.get();
ClientInvocationInfo clientInvocationInfo = null;
@@ -1682,10 +1812,13 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void releaseOrDecrementInvocationInfo()
{
- StackImpl invocationInfoStack =
- (StackImpl)clientInvocationInfoStack.get();
+ synchronized (this) {
+ checkShutdownState();
+ }
int entryCount = -1;
ClientInvocationInfo clientInvocationInfo = null;
+ StackImpl invocationInfoStack =
+ (StackImpl)clientInvocationInfoStack.get();
if (!invocationInfoStack.empty()) {
clientInvocationInfo =
(ClientInvocationInfo)invocationInfoStack.peek();
@@ -1705,6 +1838,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public ClientInvocationInfo getInvocationInfo()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
StackImpl invocationInfoStack =
(StackImpl) clientInvocationInfoStack.get();
return (ClientInvocationInfo) invocationInfoStack.peek();
@@ -1719,6 +1855,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void setClientDelegateFactory( ClientDelegateFactory factory )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (clientDelegateFactoryAccessorLock) {
clientDelegateFactory = factory ;
}
@@ -1726,6 +1865,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public ClientDelegateFactory getClientDelegateFactory()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (clientDelegateFactoryAccessorLock) {
return clientDelegateFactory ;
}
@@ -1735,6 +1877,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void setCorbaContactInfoListFactory( CorbaContactInfoListFactory factory )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (corbaContactInfoListFactoryAccessLock) {
corbaContactInfoListFactory = factory ;
}
@@ -1742,6 +1887,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public synchronized CorbaContactInfoListFactory getCorbaContactInfoListFactory()
{
+ checkShutdownState();
return corbaContactInfoListFactory ;
}
@@ -1750,6 +1896,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public void setResolver( Resolver resolver )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (resolverLock) {
this.resolver = resolver ;
}
@@ -1760,6 +1909,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public Resolver getResolver()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (resolverLock) {
return resolver ;
}
@@ -1770,6 +1922,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public void setLocalResolver( LocalResolver resolver )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (resolverLock) {
this.localResolver = resolver ;
}
@@ -1780,6 +1935,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public LocalResolver getLocalResolver()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (resolverLock) {
return localResolver ;
}
@@ -1790,6 +1948,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public void setURLOperation( Operation stringToObject )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (urlOperationLock) {
urlOperation = stringToObject ;
}
@@ -1800,6 +1961,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
*/
public Operation getURLOperation()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (urlOperationLock) {
return urlOperation ;
}
@@ -1807,6 +1971,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void setINSDelegate( CorbaServerRequestDispatcher sdel )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (resolverLock) {
insNamingDelegate = sdel ;
}
@@ -1814,16 +1981,25 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public TaggedComponentFactoryFinder getTaggedComponentFactoryFinder()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
return taggedComponentFactoryFinder ;
}
public IdentifiableFactoryFinder getTaggedProfileFactoryFinder()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
return taggedProfileFactoryFinder ;
}
public IdentifiableFactoryFinder getTaggedProfileTemplateFactoryFinder()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
return taggedProfileTemplateFactoryFinder ;
}
@@ -1831,6 +2007,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public ObjectKeyFactory getObjectKeyFactory()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (objectKeyFactoryAccessLock) {
return objectKeyFactory ;
}
@@ -1838,6 +2017,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void setObjectKeyFactory( ObjectKeyFactory factory )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (objectKeyFactoryAccessLock) {
objectKeyFactory = factory ;
}
@@ -1864,6 +2046,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public LegacyServerSocketManager getLegacyServerSocketManager()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (legacyServerSocketManagerAccessLock) {
if (legacyServerSocketManager == null) {
legacyServerSocketManager = new LegacyServerSocketManagerImpl(this);
@@ -1876,6 +2061,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public void setThreadPoolManager(ThreadPoolManager mgr)
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (threadPoolManagerAccessLock) {
threadpoolMgr = mgr;
}
@@ -1883,9 +2071,13 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public ThreadPoolManager getThreadPoolManager()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
synchronized (threadPoolManagerAccessLock) {
if (threadpoolMgr == null) {
- threadpoolMgr = new ThreadPoolManagerImpl( threadGroup );
+ threadpoolMgr = new ThreadPoolManagerImpl();
+ orbOwnsThreadPoolManager = true;
}
return threadpoolMgr;
}
@@ -1893,6 +2085,9 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
public CopierManager getCopierManager()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
return copierManager ;
}
} // Class ORBImpl
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java
index f8341f84b0c..f98880bf68d 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,6 +25,18 @@
package com.sun.corba.se.impl.orbutil.threadpool;
+import java.io.IOException;
+import java.io.Closeable;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
import com.sun.corba.se.spi.orbutil.threadpool.NoSuchWorkQueueException;
import com.sun.corba.se.spi.orbutil.threadpool.ThreadPool;
import com.sun.corba.se.spi.orbutil.threadpool.Work;
@@ -36,12 +48,27 @@ import com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl;
import com.sun.corba.se.spi.monitoring.MonitoringConstants;
import com.sun.corba.se.spi.monitoring.MonitoredObject;
import com.sun.corba.se.spi.monitoring.MonitoringFactories;
+import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.monitoring.LongMonitoredAttributeBase;
+import com.sun.corba.se.impl.logging.ORBUtilSystemException;
+import com.sun.corba.se.impl.orbutil.ORBConstants;
+import com.sun.corba.se.spi.logging.CORBALogDomains;
+
public class ThreadPoolImpl implements ThreadPool
{
- private static int threadCounter = 0; // serial counter useful for debugging
+ // serial counter useful for debugging
+ private static AtomicInteger threadCounter = new AtomicInteger(0);
+ private static final ORBUtilSystemException wrapper =
+ ORBUtilSystemException.get(CORBALogDomains.RPC_TRANSPORT);
+
+ // Any time currentThreadCount and/or availableWorkerThreads is updated
+ // or accessed this ThreadPool's WorkQueue must be locked. And, it is
+ // expected that this ThreadPool's WorkQueue is the only object that
+ // updates and accesses these values directly and indirectly though a
+ // call to a method in this ThreadPool. If any call to update or access
+ // those values must synchronized on this ThreadPool's WorkQueue.
private WorkQueue workQueue;
// Stores the number of available worker threads
@@ -65,14 +92,11 @@ public class ThreadPoolImpl implements ThreadPool
// Running count of the work items processed
// Set the value to 1 so that divide by zero is avoided in
// averageWorkCompletionTime()
- private long processedCount = 1;
+ private AtomicLong processedCount = new AtomicLong(1);
// Running aggregate of the time taken in millis to execute work items
// processed by the threads in the threadpool
- private long totalTimeTaken = 0;
-
- // Lock for protecting state when required
- private Object lock = new Object();
+ private AtomicLong totalTimeTaken = new AtomicLong(0);
// Name of the ThreadPool
private String name;
@@ -81,7 +105,10 @@ public class ThreadPoolImpl implements ThreadPool
private MonitoredObject threadpoolMonitoredObject;
// ThreadGroup in which threads should be created
- private ThreadGroup threadGroup ;
+ private ThreadGroup threadGroup;
+
+ Object workersLock = new Object();
+ List workers = new ArrayList<>();
/**
* This constructor is used to create an unbounded threadpool
@@ -90,7 +117,7 @@ public class ThreadPoolImpl implements ThreadPool
inactivityTimeout = ORBConstants.DEFAULT_INACTIVITY_TIMEOUT;
maxWorkerThreads = Integer.MAX_VALUE;
workQueue = new WorkQueueImpl(this);
- threadGroup = tg ;
+ threadGroup = tg;
name = threadpoolName;
initializeMonitoring();
}
@@ -121,6 +148,30 @@ public class ThreadPoolImpl implements ThreadPool
initializeMonitoring();
}
+ // Note that this method should not return until AFTER all threads have died.
+ public void close() throws IOException {
+
+ // Copy to avoid concurrent modification problems.
+ List copy = null;
+ synchronized (workersLock) {
+ copy = new ArrayList<>(workers);
+ }
+
+ for (WorkerThread wt : copy) {
+ wt.close();
+ while (wt.getState() != Thread.State.TERMINATED) {
+ try {
+ wt.join();
+ } catch (InterruptedException exc) {
+ wrapper.interruptedJoinCallWhileClosingThreadPool(exc, wt, this);
+ }
+ }
+ }
+
+ threadGroup = null;
+ }
+
+
// Setup monitoring for this threadpool
private void initializeMonitoring() {
// Get root monitored object
@@ -217,8 +268,8 @@ public class ThreadPoolImpl implements ThreadPool
* or notify waiting threads on the queue for available work
*/
void notifyForAvailableWork(WorkQueue aWorkQueue) {
- synchronized (lock) {
- if (availableWorkerThreads == 0) {
+ synchronized (aWorkQueue) {
+ if (availableWorkerThreads < aWorkQueue.workItemsInQueue()) {
createWorkerThread();
} else {
aWorkQueue.notify();
@@ -227,120 +278,145 @@ public class ThreadPoolImpl implements ThreadPool
}
- /**
- * To be called from the workqueue to create worker threads when none
- * available.
- */
- void createWorkerThread() {
- WorkerThread thread;
-
- synchronized (lock) {
- if (boundedThreadPool) {
- if (currentThreadCount < maxWorkerThreads) {
- thread = new WorkerThread(threadGroup, getName());
- currentThreadCount++;
- } else {
- // REVIST - Need to create a thread to monitor the
- // the state for deadlock i.e. all threads waiting for
- // something which can be got from the item in the
- // workqueue, but there is no thread available to
- // process that work item - DEADLOCK !!
- return;
- }
- } else {
- thread = new WorkerThread(threadGroup, getName());
- currentThreadCount++;
- }
+ private Thread createWorkerThreadHelper( String name ) {
+ // Thread creation needs to be in a doPrivileged block
+ // if there is a non-null security manager for two reasons:
+ // 1. The creation of a thread in a specific ThreadGroup
+ // is a privileged operation. Lack of a doPrivileged
+ // block here causes an AccessControlException
+ // (see bug 6268145).
+ // 2. We want to make sure that the permissions associated
+ // with this thread do NOT include the permissions of
+ // the current thread that is calling this method.
+ // This leads to problems in the app server where
+ // some threads in the ThreadPool randomly get
+ // bad permissions, leading to unpredictable
+ // permission errors (see bug 6021011).
+ //
+ // A Java thread contains a stack of call frames,
+ // one for each method called that has not yet returned.
+ // Each method comes from a particular class. The class
+ // was loaded by a ClassLoader which has an associated
+ // CodeSource, and this determines the Permissions
+ // for all methods in that class. The current
+ // Permissions for the thread are the intersection of
+ // all Permissions for the methods on the stack.
+ // This is part of the Security Context of the thread.
+ //
+ // When a thread creates a new thread, the new thread
+ // inherits the security context of the old thread.
+ // This is bad in a ThreadPool, because different
+ // creators of threads may have different security contexts.
+ // This leads to occasional unpredictable errors when
+ // a thread is re-used in a different security context.
+ //
+ // Avoiding this problem is simple: just do the thread
+ // creation in a doPrivileged block. This sets the
+ // inherited security context to that of the code source
+ // for the ORB code itself, which contains all permissions
+ // in either Java SE or Java EE.
+ WorkerThread thread = new WorkerThread(threadGroup, name);
+ synchronized (workersLock) {
+ workers.add(thread);
}
// The thread must be set to a daemon thread so the
// VM can exit if the only threads left are PooledThreads
// or other daemons. We don't want to rely on the
// calling thread always being a daemon.
+ // Note that no exception is possible here since we
+ // are inside the doPrivileged block.
+ thread.setDaemon(true);
- // Catch exceptions since setDaemon can cause a
- // security exception to be thrown under netscape
- // in the Applet mode
- try {
- thread.setDaemon(true);
- } catch (Exception e) {
- // REVISIT - need to do some logging here
- }
+ wrapper.workerThreadCreated(thread, thread.getContextClassLoader());
thread.start();
+ return null;
}
+
/**
- * This method will return the minimum number of threads maintained
- * by the threadpool.
- */
+ * To be called from the workqueue to create worker threads when none
+ * available.
+ */
+ void createWorkerThread() {
+ final String name = getName();
+ synchronized (workQueue) {
+ try {
+ if (System.getSecurityManager() == null) {
+ createWorkerThreadHelper(name);
+ } else {
+ // If we get here, we need to create a thread.
+ AccessController.doPrivileged(
+ new PrivilegedAction() {
+ public Object run() {
+ return createWorkerThreadHelper(name);
+ }
+ }
+ );
+ }
+ } catch (Throwable t) {
+ // Decrementing the count of current worker threads.
+ // But, it will be increased in the finally block.
+ decrementCurrentNumberOfThreads();
+ wrapper.workerThreadCreationFailure(t);
+ } finally {
+ incrementCurrentNumberOfThreads();
+ }
+ }
+ }
+
public int minimumNumberOfThreads() {
return minWorkerThreads;
}
- /**
- * This method will return the maximum number of threads in the
- * threadpool at any point in time, for the life of the threadpool
- */
public int maximumNumberOfThreads() {
return maxWorkerThreads;
}
- /**
- * This method will return the time in milliseconds when idle
- * threads in the threadpool are removed.
- */
public long idleTimeoutForThreads() {
return inactivityTimeout;
}
- /**
- * This method will return the total number of threads currently in the
- * threadpool. This method returns a value which is not synchronized.
- */
public int currentNumberOfThreads() {
- synchronized (lock) {
+ synchronized (workQueue) {
return currentThreadCount;
}
}
- /**
- * This method will return the number of available threads in the
- * threadpool which are waiting for work. This method returns a
- * value which is not synchronized.
- */
+ void decrementCurrentNumberOfThreads() {
+ synchronized (workQueue) {
+ currentThreadCount--;
+ }
+ }
+
+ void incrementCurrentNumberOfThreads() {
+ synchronized (workQueue) {
+ currentThreadCount++;
+ }
+ }
+
public int numberOfAvailableThreads() {
- synchronized (lock) {
+ synchronized (workQueue) {
return availableWorkerThreads;
}
}
- /**
- * This method will return the number of busy threads in the threadpool
- * This method returns a value which is not synchronized.
- */
public int numberOfBusyThreads() {
- synchronized (lock) {
+ synchronized (workQueue) {
return (currentThreadCount - availableWorkerThreads);
}
}
- /**
- * This method returns the average elapsed time taken to complete a Work
- * item in milliseconds.
- */
public long averageWorkCompletionTime() {
- synchronized (lock) {
- return (totalTimeTaken / processedCount);
+ synchronized (workQueue) {
+ return (totalTimeTaken.get() / processedCount.get());
}
}
- /**
- * This method returns the number of Work items processed by the threadpool
- */
public long currentProcessedCount() {
- synchronized (lock) {
- return processedCount;
+ synchronized (workQueue) {
+ return processedCount.get();
}
}
@@ -357,15 +433,37 @@ public class ThreadPoolImpl implements ThreadPool
private static synchronized int getUniqueThreadId() {
- return ThreadPoolImpl.threadCounter++;
+ return ThreadPoolImpl.threadCounter.incrementAndGet();
+ }
+
+ /**
+ * This method will decrement the number of available threads
+ * in the threadpool which are waiting for work. Called from
+ * WorkQueueImpl.requestWork()
+ */
+ void decrementNumberOfAvailableThreads() {
+ synchronized (workQueue) {
+ availableWorkerThreads--;
+ }
+ }
+
+ /**
+ * This method will increment the number of available threads
+ * in the threadpool which are waiting for work. Called from
+ * WorkQueueImpl.requestWork()
+ */
+ void incrementNumberOfAvailableThreads() {
+ synchronized (workQueue) {
+ availableWorkerThreads++;
+ }
}
- private class WorkerThread extends Thread
+ private class WorkerThread extends Thread implements Closeable
{
private Work currentWork;
private int threadId = 0; // unique id for the thread
- // thread pool this WorkerThread belongs too
+ private volatile boolean closeCalled = false;
private String threadPoolName;
// name seen by Thread.getName()
private StringBuffer workerThreadName = new StringBuffer();
@@ -377,100 +475,61 @@ public class ThreadPoolImpl implements ThreadPool
setName(composeWorkerThreadName(threadPoolName, "Idle"));
}
+ public synchronized void close() {
+ closeCalled = true;
+ interrupt();
+ }
+
+ private void resetClassLoader() {
+
+ }
+
+ private void performWork() {
+ long start = System.currentTimeMillis();
+ try {
+ currentWork.doWork();
+ } catch (Throwable t) {
+ wrapper.workerThreadDoWorkThrowable(this, t);
+ }
+ long elapsedTime = System.currentTimeMillis() - start;
+ totalTimeTaken.addAndGet(elapsedTime);
+ processedCount.incrementAndGet();
+ }
+
public void run() {
- while (true) {
- try {
-
- synchronized (lock) {
- availableWorkerThreads++;
- }
-
- // Get some work to do
- currentWork = ((WorkQueueImpl)workQueue).requestWork(inactivityTimeout);
-
- synchronized (lock) {
- availableWorkerThreads--;
- // It is possible in notifyForAvailableWork that the
- // check for availableWorkerThreads = 0 may return
- // false, because the availableWorkerThreads has not been
- // decremented to zero before the producer thread added
- // work to the queue. This may create a deadlock, if the
- // executing thread needs information which is in the work
- // item queued in the workqueue, but has no thread to work
- // on it since none was created because availableWorkerThreads = 0
- // returned false.
- // The following code will ensure that a thread is always available
- // in those situations
- if ((availableWorkerThreads == 0) &&
- (workQueue.workItemsInQueue() > 0)) {
- createWorkerThread();
- }
- }
-
- // Set the thread name for debugging.
- setName(composeWorkerThreadName(threadPoolName,
- Integer.toString(this.threadId)));
-
- long start = System.currentTimeMillis();
-
+ try {
+ while (!closeCalled) {
try {
- // Do the work
- currentWork.doWork();
+ currentWork = ((WorkQueueImpl)workQueue).requestWork(
+ inactivityTimeout);
+ if (currentWork == null)
+ continue;
+ } catch (InterruptedException exc) {
+ wrapper.workQueueThreadInterrupted( exc, getName(),
+ Boolean.valueOf(closeCalled));
+
+ continue ;
} catch (Throwable t) {
- // Ignore all errors.
- ;
+ wrapper.workerThreadThrowableFromRequestWork(this, t,
+ workQueue.getName());
+
+ continue;
}
- long end = System.currentTimeMillis();
-
-
- synchronized (lock) {
- totalTimeTaken += (end - start);
- processedCount++;
- }
+ performWork();
// set currentWork to null so that the work item can be
- // garbage collected
+ // garbage collected without waiting for the next work item.
currentWork = null;
- setName(composeWorkerThreadName(threadPoolName, "Idle"));
-
- } catch (TimeoutException e) {
- // This thread timed out waiting for something to do.
-
- synchronized (lock) {
- availableWorkerThreads--;
-
- // This should for both bounded and unbounded case
- if (currentThreadCount > minWorkerThreads) {
- currentThreadCount--;
- // This thread can exit.
- return;
- } else {
- // Go back to waiting on workQueue
- continue;
- }
- }
- } catch (InterruptedException ie) {
- // InterruptedExceptions are
- // caught here. Thus, threads can be forced out of
- // requestWork and so they have to reacquire the lock.
- // Other options include ignoring or
- // letting this thread die.
- // Ignoring for now. REVISIT
- synchronized (lock) {
- availableWorkerThreads--;
- }
-
- } catch (Throwable e) {
-
- // Ignore any exceptions that currentWork.process
- // accidently lets through, but let Errors pass.
- // Add debugging output? REVISIT
- synchronized (lock) {
- availableWorkerThreads--;
- }
-
+ resetClassLoader();
+ }
+ } catch (Throwable e) {
+ // This should not be possible
+ wrapper.workerThreadCaughtUnexpectedThrowable(this,e);
+ } finally {
+ synchronized (workersLock) {
+ workers.remove(this);
}
}
}
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolManagerImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolManagerImpl.java
index 43573fda6ee..40214e816d6 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolManagerImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolManagerImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,6 +25,15 @@
package com.sun.corba.se.impl.orbutil.threadpool;
+import java.io.IOException;
+
+import java.security.PrivilegedAction;
+import java.security.AccessController;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import com.sun.corba.se.spi.orb.ORB;
+
import com.sun.corba.se.spi.orbutil.threadpool.NoSuchThreadPoolException;
import com.sun.corba.se.spi.orbutil.threadpool.ThreadPool;
import com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolManager;
@@ -33,21 +42,102 @@ import com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolChooser;
import com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl;
import com.sun.corba.se.impl.orbutil.ORBConstants;
+import com.sun.corba.se.impl.logging.ORBUtilSystemException;
+import com.sun.corba.se.impl.orbutil.ORBConstants;
+import com.sun.corba.se.spi.logging.CORBALogDomains;
+
+
public class ThreadPoolManagerImpl implements ThreadPoolManager
{
- private ThreadPool threadPool ;
+ private ThreadPool threadPool;
+ private ThreadGroup threadGroup;
- public ThreadPoolManagerImpl( ThreadGroup tg )
- {
- // Use unbounded threadpool in J2SE ORB
- // ThreadPoolManager from s1as appserver code base can be set in the
- // ORB. ThreadPools in the appserver are bounded. In that situation
- // the ThreadPool in this ThreadPoolManager will have its threads
- // die after the idle timeout.
- // XXX Should there be cleanup when ORB.shutdown is called if the
- // ORB owns the ThreadPool?
- threadPool = new ThreadPoolImpl( tg,
- ORBConstants.THREADPOOL_DEFAULT_NAME ) ;
+ private static final ORBUtilSystemException wrapper =
+ ORBUtilSystemException.get(CORBALogDomains.RPC_TRANSPORT);
+
+ public ThreadPoolManagerImpl() {
+ threadGroup = getThreadGroup();
+ threadPool = new ThreadPoolImpl(threadGroup,
+ ORBConstants.THREADPOOL_DEFAULT_NAME);
+ }
+
+ private static AtomicInteger tgCount = new AtomicInteger();
+
+
+ private ThreadGroup getThreadGroup() {
+ ThreadGroup tg;
+
+ // See bugs 4916766 and 4936203
+ // We intend to create new threads in a reliable thread group.
+ // This avoids problems if the application/applet
+ // creates a thread group, makes JavaIDL calls which create a new
+ // connection and ReaderThread, and then destroys the thread
+ // group. If our ReaderThreads were to be part of such destroyed thread
+ // group then it might get killed and cause other invoking threads
+ // sharing the same connection to get a non-restartable
+ // CommunicationFailure. We'd like to avoid that.
+ //
+ // Our solution is to create all of our threads in the highest thread
+ // group that we have access to, given our own security clearance.
+ //
+ try {
+ // try to get a thread group that's as high in the threadgroup
+ // parent-child hierarchy, as we can get to.
+ // this will prevent an ORB thread created during applet-init from
+ // being killed when an applet dies.
+ tg = AccessController.doPrivileged(
+ new PrivilegedAction() {
+ public ThreadGroup run() {
+ ThreadGroup tg = Thread.currentThread().getThreadGroup();
+ ThreadGroup ptg = tg;
+ try {
+ while (ptg != null) {
+ tg = ptg;
+ ptg = tg.getParent();
+ }
+ } catch (SecurityException se) {
+ // Discontinue going higher on a security exception.
+ }
+ return new ThreadGroup(tg, "ORB ThreadGroup " + tgCount.getAndIncrement());
+ }
+ }
+ );
+ } catch (SecurityException e) {
+ // something wrong, we go back to the original code
+ tg = Thread.currentThread().getThreadGroup();
+ }
+
+ return tg;
+ }
+
+ public void close() {
+ try {
+ threadPool.close();
+ } catch (IOException exc) {
+ wrapper.threadPoolCloseError();
+ }
+
+ try {
+ boolean isDestroyed = threadGroup.isDestroyed();
+ int numThreads = threadGroup.activeCount();
+ int numGroups = threadGroup.activeGroupCount();
+
+ if (isDestroyed) {
+ wrapper.threadGroupIsDestroyed(threadGroup);
+ } else {
+ if (numThreads > 0)
+ wrapper.threadGroupHasActiveThreadsInClose(threadGroup, numThreads);
+
+ if (numGroups > 0)
+ wrapper.threadGroupHasSubGroupsInClose(threadGroup, numGroups);
+
+ threadGroup.destroy();
+ }
+ } catch (IllegalThreadStateException exc) {
+ wrapper.threadGroupDestroyFailed(exc, threadGroup);
+ }
+
+ threadGroup = null;
}
/**
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/WorkQueueImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/WorkQueueImpl.java
index 022f2e0c93b..6e2320eeade 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/WorkQueueImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/WorkQueueImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -111,24 +111,23 @@ public class WorkQueueImpl implements WorkQueue
return workqueueMonitoredObject;
}
- public void addWork(Work work) {
- synchronized (this) {
+ public synchronized void addWork(Work work) {
workItemsAdded++;
work.setEnqueueTime(System.currentTimeMillis());
theWorkQueue.addLast(work);
((ThreadPoolImpl)workerThreadPool).notifyForAvailableWork(this);
- }
}
- Work requestWork(long waitTime)
- throws TimeoutException, InterruptedException
+ synchronized Work requestWork(long waitTime) throws TimeoutException, InterruptedException
{
Work workItem;
- synchronized (this) {
+ ((ThreadPoolImpl)workerThreadPool).incrementNumberOfAvailableThreads();
+
if (theWorkQueue.size() != 0) {
workItem = (Work)theWorkQueue.removeFirst();
totalTimeInQueue += System.currentTimeMillis() - workItem.getEnqueueTime();
workItemsDequeued++;
+ ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
return workItem;
}
@@ -145,6 +144,7 @@ public class WorkQueueImpl implements WorkQueue
workItem = (Work)theWorkQueue.removeFirst();
totalTimeInQueue += System.currentTimeMillis() - workItem.getEnqueueTime();
workItemsDequeued++;
+ ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
return workItem;
}
@@ -152,12 +152,13 @@ public class WorkQueueImpl implements WorkQueue
} while (remainingWaitTime > 0);
+ ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
throw new TimeoutException();
} catch (InterruptedException ie) {
+ ((ThreadPoolImpl)workerThreadPool).decrementNumberOfAvailableThreads();
throw ie;
}
- }
}
public void setThreadPool(ThreadPool workerThreadPool) {
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java
index 038acdb132b..a5ee15ba763 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaMessageMediatorImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -1666,7 +1666,9 @@ public class CorbaMessageMediatorImpl
((CDRInputObject)messageMediator.getInputObject()).unmarshalHeader();
ORB orb = (ORB)messageMediator.getBroker();
- orb.checkShutdownState();
+ synchronized (orb) {
+ orb.checkShutdownState();
+ }
ObjectKey okey = messageMediator.getObjectKey();
if (orb.subcontractDebugFlag) {
diff --git a/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java
index 1c60088a7a3..7bd98805ab7 100644
--- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java
+++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -69,8 +69,8 @@ public class SelectorImpl
private HashMap listenerThreads;
private Map readerThreads;
private boolean selectorStarted;
- private boolean closed;
- private ORBUtilSystemException wrapper ;
+ private volatile boolean closed;
+ private ORBUtilSystemException wrapper;
public SelectorImpl(ORB orb)
diff --git a/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc b/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc
index e82f724642d..da1ab4de948 100644
--- a/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc
+++ b/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc
@@ -1,6 +1,6 @@
;
-; Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+; Copyright (c) 2003, 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
@@ -62,6 +62,7 @@
(IS_LOCAL_REQUIRES_STUB 43 WARNING "Call to StubAdapter.isLocal did not pass a stub")
(REQUEST_REQUIRES_STUB 44 WARNING "Call to StubAdapter.request did not pass a stub")
(BAD_ACTIVATE_TIE_CALL 45 WARNING "Call to StubAdapter.activateTie did not pass a valid Tie")
+ (IO_EXCEPTION_ON_CLOSE 46 FINE "Useless exception on call to Closeable.close()")
)
(BAD_PARAM
(NULL_PARAM 1 WARNING "Null parameter")
@@ -291,7 +292,31 @@
(JAVA_STREAM_INIT_FAILED 95 WARNING "Java stream initialization failed")
(DUPLICATE_ORB_VERSION_SERVICE_CONTEXT 96 WARNING "An ORBVersionServiceContext was already in the service context list")
(DUPLICATE_SENDING_CONTEXT_SERVICE_CONTEXT 97 WARNING "A SendingContextServiceContext was already in the service context list")
+ (WORK_QUEUE_THREAD_INTERRUPTED 98 FINE "Worker Thread from thread pool {0} was interrupted: closeCalled is {1}.")
+ (WORKER_THREAD_CREATED
+ 104 FINE "Worker thread {0} has been created with ClassLoader {1}")
+ (WORKER_THREAD_THROWABLE_FROM_REQUEST_WORK
+ 109 FINE "Worker thread {0} caught throwable {1} when requesting work from work queue {2}.")
+ (WORKER_THREAD_NOT_NEEDED
+ 110 FINE "Worker thread {0} will exit; current thread count, {1}, greater than minunum worker threads needed, {2}.")
+ (WORKER_THREAD_DO_WORK_THROWABLE
+ 111 FINE "Worker thread {0} caught throwable {1} while executing work.")
+ (WORKER_THREAD_CAUGHT_UNEXPECTED_THROWABLE
+ 112 WARNING "Worker thread {0} caught unexpected throwable {1}.")
+ (WORKER_THREAD_CREATION_FAILURE
+ 113 SEVERE "Worker thread creation failure; cause {0}.")
+ (WORKER_THREAD_SET_NAME_FAILURE
+ 114 WARNING "Unable to set worker thread {0} name to {1}; cause {2}.")
+ (WORK_QUEUE_REQUEST_WORK_NO_WORK_FOUND
+ 116 WARNING "Ignoring unexpected {0} when retrieving of work from work queue, {1}.")
+ (THREAD_POOL_CLOSE_ERROR 126 WARNING "Error in closing ThreadPool")
+ (THREAD_GROUP_IS_DESTROYED 127 WARNING "ThreadGroup {0} is already destroyed: can't destroy it")
+ (THREAD_GROUP_HAS_ACTIVE_THREADS_IN_CLOSE 128 WARNING "ThreadGroup {0} has {1} active threads: destroy may cause exception")
+ (THREAD_GROUP_HAS_SUB_GROUPS_IN_CLOSE 129 WARNING "ThreadGroup {0} has {1} sub-thread groups: destroy may cause exception")
+ (THREAD_GROUP_DESTROY_FAILED 130 WARNING "ThreadGroup {0} could not be destroyed")
+ (INTERRUPTED_JOIN_CALL_WHILE_CLOSING_THREAD_POOL 131 WARNING "Join was interrupted on thread {0} while closing ThreadPool {1}")
)
+
(MARSHAL
(CHUNK_OVERFLOW 1 WARNING "Data read past end of chunk without closing the chunk")
(UNEXPECTED_EOF 2 WARNING "Grow buffer strategy called underflow handler")
diff --git a/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManager.java b/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManager.java
index 2f5ce1e5343..1a7e6b61f80 100644
--- a/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManager.java
+++ b/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -24,6 +24,7 @@
*/
package com.sun.corba.se.spi.monitoring;
+import java.io.Closeable;
import com.sun.corba.se.spi.orb.ORB;
import com.sun.corba.se.spi.monitoring.MonitoredObject;
import java.util.*;
@@ -39,7 +40,7 @@ import java.util.*;
* @author Hemanth Puttaswamy
*
*/
-public interface MonitoringManager {
+public interface MonitoringManager extends Closeable {
///////////////////////////////////////
// operations
diff --git a/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManagerFactory.java b/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManagerFactory.java
index a23dfc3d0d6..88b6238ff53 100644
--- a/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManagerFactory.java
+++ b/corba/src/share/classes/com/sun/corba/se/spi/monitoring/MonitoringManagerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -40,4 +40,6 @@ public interface MonitoringManagerFactory {
*/
MonitoringManager createMonitoringManager( String nameOfTheRoot,
String description );
+
+ void remove(String nameOfTheRoot);
}
diff --git a/corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java b/corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java
index 0fad97f78ba..22b89e73f22 100644
--- a/corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java
+++ b/corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -171,7 +171,7 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
private static Map staticWrapperMap = new ConcurrentHashMap();
- private MonitoringManager monitoringManager;
+ protected MonitoringManager monitoringManager;
// There is only one instance of the PresentationManager
// that is shared between all ORBs. This is necessary
@@ -226,6 +226,14 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
globalPM.setStubFactoryFactory( true, dynamicStubFactoryFactory ) ;
}
+ public void destroy() {
+ wrapper = null;
+ omgWrapper = null;
+ typeCodeMap = null;
+ primitiveTypeCodeConstants = null;
+ byteBufferPool = null;
+ }
+
/** Get the single instance of the PresentationManager
*/
public static PresentationManager getPresentationManager()
@@ -302,6 +310,9 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
// Typecode support: needed in both ORBImpl and ORBSingleton
public TypeCodeImpl get_primitive_tc(int kind)
{
+ synchronized (this) {
+ checkShutdownState();
+ }
try {
return primitiveTypeCodeConstants[kind] ;
} catch (Throwable t) {
@@ -311,15 +322,20 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
public synchronized void setTypeCode(String id, TypeCodeImpl code)
{
+ checkShutdownState();
typeCodeMap.put(id, code);
}
public synchronized TypeCodeImpl getTypeCode(String id)
{
+ checkShutdownState();
return (TypeCodeImpl)typeCodeMap.get(id);
}
public MonitoringManager getMonitoringManager( ) {
+ synchronized (this) {
+ checkShutdownState();
+ }
return monitoringManager;
}
@@ -434,6 +450,9 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
*/
public Logger getLogger( String domain )
{
+ synchronized (this) {
+ checkShutdownState();
+ }
ORBData odata = getORBData() ;
// Determine the correct ORBId. There are 3 cases:
@@ -510,6 +529,9 @@ public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
// This method must also be inherited by both ORB and ORBSingleton.
public ByteBufferPool getByteBufferPool()
{
+ synchronized (this) {
+ checkShutdownState();
+ }
if (byteBufferPool == null)
byteBufferPool = new ByteBufferPoolImpl(this);
diff --git a/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPool.java b/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPool.java
index a4cc2b6a559..dd61ff22032 100644
--- a/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPool.java
+++ b/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPool.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,9 +25,15 @@
package com.sun.corba.se.spi.orbutil.threadpool;
+import java.io.Closeable;
-public interface ThreadPool
+/** This interface defines a thread pool execution service. The ORB uses this
+ * interface, which preceeds the JDK 5 ExecutorService. Note that the close
+ * method must be called in order to reclaim thread resources.
+ */
+public interface ThreadPool extends Closeable
{
+
/**
* This method will return any instance of the WorkQueue. If the ThreadPool
* instance only services one WorkQueue then that WorkQueue instance will
diff --git a/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPoolManager.java b/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPoolManager.java
index 9225a90a598..14875f6d20a 100644
--- a/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPoolManager.java
+++ b/corba/src/share/classes/com/sun/corba/se/spi/orbutil/threadpool/ThreadPoolManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,7 +25,9 @@
package com.sun.corba.se.spi.orbutil.threadpool;
-public interface ThreadPoolManager
+import java.io.Closeable;
+
+public interface ThreadPoolManager extends Closeable
{
/**
* This method will return an instance of the threadpool given a threadpoolId,
diff --git a/corba/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java b/corba/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java
index b59062a43be..ac25b79510a 100644
--- a/corba/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java
+++ b/corba/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -25,6 +25,8 @@
package com.sun.corba.se.spi.protocol;
+import java.io.Closeable;
+
import org.omg.PortableInterceptor.ObjectReferenceTemplate ;
import org.omg.PortableInterceptor.Interceptor ;
import org.omg.PortableInterceptor.Current ;
@@ -51,7 +53,7 @@ import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage ;
/** This interface defines the PI interface that is used to interface the rest of the
* ORB to the PI implementation.
*/
-public interface PIHandler {
+public interface PIHandler extends Closeable {
/** Complete the initialization of the PIHandler. This will execute the methods
* on the ORBInitializers, if any are defined. This must be done here so that
* the ORB can obtain the PIHandler BEFORE the ORBInitializers run, since they
diff --git a/corba/src/share/classes/com/sun/corba/se/spi/protocol/RequestDispatcherRegistry.java b/corba/src/share/classes/com/sun/corba/se/spi/protocol/RequestDispatcherRegistry.java
index e4fc9ae4265..f5aae43731d 100644
--- a/corba/src/share/classes/com/sun/corba/se/spi/protocol/RequestDispatcherRegistry.java
+++ b/corba/src/share/classes/com/sun/corba/se/spi/protocol/RequestDispatcherRegistry.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -37,33 +37,59 @@ import com.sun.corba.se.spi.oa.ObjectAdapterFactory ;
* This is a registry of all subcontract ID dependent objects. This includes:
* LocalClientRequestDispatcherFactory, ClientRequestDispatcher, ServerRequestDispatcher, and
* ObjectAdapterFactory.
- * XXX Should the registerXXX methods take an scid or not? I think we
- * want to do this so that the same instance can be shared across multiple
- * scids (and this is already true for ObjectAdapterFactory and LocalClientRequestDispatcherFactory),
- * but this will require some changes for ClientRequestDispatcher and ServerRequestDispatcher.
*/
public interface RequestDispatcherRegistry {
- // XXX needs javadocs!
+ /** Register a ClientRequestDispatcher for a particular subcontract ID.
+ * The subcontract ID appears in the ObjectKey of an object reference, and is used
+ * to control how a remote method invocation is processed by the ORB for a
+ * particular kind of object reference.
+ */
void registerClientRequestDispatcher( ClientRequestDispatcher csc, int scid) ;
+ /** Get the ClientRequestDispatcher for subcontract ID scid.
+ */
ClientRequestDispatcher getClientRequestDispatcher( int scid ) ;
+ /** Register a LocalClientRequestDispatcher for a particular subcontract ID.
+ * The subcontract ID appears in the ObjectKey of an object reference, and is used
+ * to control how a particular kind of colocated request is processed.
+ */
void registerLocalClientRequestDispatcherFactory( LocalClientRequestDispatcherFactory csc, int scid) ;
+ /** Get the LocalClientRequestDispatcher for subcontract ID scid.
+ */
LocalClientRequestDispatcherFactory getLocalClientRequestDispatcherFactory( int scid ) ;
+ /** Register a CorbaServerRequestDispatcher for a particular subcontract ID.
+ * The subcontract ID appears in the ObjectKey of an object reference, and is used
+ * to control how a particular kind of request is processed when received by the ORB.
+ */
void registerServerRequestDispatcher( CorbaServerRequestDispatcher ssc, int scid) ;
+ /** Get the CorbaServerRequestDispatcher for subcontract ID scid.
+ */
CorbaServerRequestDispatcher getServerRequestDispatcher(int scid) ;
+ /** Register a CorbaServerRequestDispatcher for handling an explicit object key name.
+ * This is used for non-standard invocations such as INS and the bootstrap name service.
+ */
void registerServerRequestDispatcher( CorbaServerRequestDispatcher ssc, String name ) ;
+ /** Get the CorbaServerRequestDispatcher for a particular object key.
+ */
CorbaServerRequestDispatcher getServerRequestDispatcher( String name ) ;
+ /** Register an ObjectAdapterFactory for a particular subcontract ID.
+ * This controls how Object references are created and managed.
+ */
void registerObjectAdapterFactory( ObjectAdapterFactory oaf, int scid) ;
+ /** Get the ObjectAdapterFactory for a particular subcontract ID scid.
+ */
ObjectAdapterFactory getObjectAdapterFactory( int scid ) ;
- Set getObjectAdapterFactories() ;
+ /** Return the set of all ObjectAdapterFactory instances that are registered.
+ */
+ Set getObjectAdapterFactories();
}
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index 4a7f07f305b..024b439f670 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -256,3 +256,12 @@ bd568544be7fcd12a9327e6c448592198d57b043 hs24-b13
e77b8e0ed1f84e3e268239e276c7ab64fa573baa jdk8-b43
5ba29a1db46ecb80a321ca873adb56a3fe6ad320 hs24-b14
831e5c76a20af18f3c08c5a95ed31be0e128a010 jdk8-b44
+9d5f20961bc5846fa8d098d534effafbbdae0a58 jdk8-b45
+40e5a3f2907ed02b335c7caa8ecf068cc801380d hs24-b15
+cf37a594c38db2ea926954154636f9f81da2e032 jdk8-b46
+0c7bb1f4f9c8062b5c5bfa56b3bdca44839b4109 jdk8-b47
+66b0450071c1534e014b131892cc86b63f1d009c hs24-b16
+1e26f61bbb521642639f56fae11326f1932f5a7d jdk8-b48
+bd54fe36b5e50f9ef1e30a5047b27fee5297e268 hs24-b17
+e3619706a7253540a2d94e9e841acaab8ace7038 jdk8-b49
+72e0362c3f0cfacbbac8af8a5b9d2e182f21c17b hs24-b18
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpot.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpot.java
index 668fba78372..2ff5308b158 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpot.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpot.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -657,7 +657,7 @@ public class BugSpot extends JPanel {
while (fr != null) {
trace.add(new StackTraceEntry(fr, getCDebugger()));
try {
- fr = fr.sender();
+ fr = fr.sender(t);
} catch (AddressException e) {
e.printStackTrace();
showMessageDialog("Error while walking stack; stack trace will be truncated\n(see console for details)",
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/amd64/BsdAMD64CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/amd64/BsdAMD64CFrame.java
index b27a5399009..01d9b06dcd1 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/amd64/BsdAMD64CFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/amd64/BsdAMD64CFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,6 +25,7 @@
package sun.jvm.hotspot.debugger.bsd.amd64;
import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.amd64.*;
import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
@@ -51,8 +52,11 @@ final public class BsdAMD64CFrame extends BasicCFrame {
return rbp;
}
- public CFrame sender() {
- if (rbp == null) {
+ public CFrame sender(ThreadProxy thread) {
+ AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext();
+ Address rsp = context.getRegisterAsAddress(AMD64ThreadContext.RSP);
+
+ if ( (rbp == null) || rbp.lessThan(rsp) ) {
return null;
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/x86/BsdX86CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/x86/BsdX86CFrame.java
index 40292b921e6..237223ed308 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/x86/BsdX86CFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/x86/BsdX86CFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -28,6 +28,7 @@ import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
+import sun.jvm.hotspot.debugger.x86.*;
final public class BsdX86CFrame extends BasicCFrame {
// package/class internals only
@@ -52,8 +53,11 @@ final public class BsdX86CFrame extends BasicCFrame {
return ebp;
}
- public CFrame sender() {
- if (ebp == null) {
+ public CFrame sender(ThreadProxy thread) {
+ X86ThreadContext context = (X86ThreadContext) thread.getContext();
+ Address esp = context.getRegisterAsAddress(X86ThreadContext.ESP);
+
+ if ( (ebp == null) || ebp.lessThan(esp) ) {
return null;
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/CFrame.java
index 30ddc298fd9..7640ddaa35e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/CFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/CFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -34,7 +34,7 @@ import sun.jvm.hotspot.debugger.*;
public interface CFrame {
/** Returns null when no more frames on stack */
- public CFrame sender();
+ public CFrame sender(ThreadProxy th);
/** Get the program counter of this frame */
public Address pc();
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/basic/amd64/AMD64CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/basic/amd64/AMD64CFrame.java
index 03b5dc572ca..d6ec6b45003 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/basic/amd64/AMD64CFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/basic/amd64/AMD64CFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,6 +25,7 @@
package sun.jvm.hotspot.debugger.cdbg.basic.amd64;
import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.amd64.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
@@ -43,8 +44,11 @@ public class AMD64CFrame extends BasicCFrame {
this.pc = pc;
}
- public CFrame sender() {
- if (rbp == null) {
+ public CFrame sender(ThreadProxy thread) {
+ AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext();
+ Address rsp = context.getRegisterAsAddress(AMD64ThreadContext.RSP);
+
+ if ( (rbp == null) || rbp.lessThan(rsp) ) {
return null;
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/basic/x86/X86CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/basic/x86/X86CFrame.java
index 0764a5da5e9..76b101bef97 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/basic/x86/X86CFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/basic/x86/X86CFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -25,6 +25,7 @@
package sun.jvm.hotspot.debugger.cdbg.basic.x86;
import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.x86.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
@@ -43,8 +44,11 @@ public class X86CFrame extends BasicCFrame {
this.pc = pc;
}
- public CFrame sender() {
- if (ebp == null) {
+ public CFrame sender(ThreadProxy thread) {
+ X86ThreadContext context = (X86ThreadContext) thread.getContext();
+ Address esp = context.getRegisterAsAddress(X86ThreadContext.ESP);
+
+ if ( (ebp == null) || ebp.lessThan(esp) ) {
return null;
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/amd64/LinuxAMD64CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/amd64/LinuxAMD64CFrame.java
index 3fab9a9e1d0..36977f1aeaa 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/amd64/LinuxAMD64CFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/amd64/LinuxAMD64CFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,6 +25,7 @@
package sun.jvm.hotspot.debugger.linux.amd64;
import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.debugger.amd64.*;
import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
@@ -51,8 +52,11 @@ final public class LinuxAMD64CFrame extends BasicCFrame {
return rbp;
}
- public CFrame sender() {
- if (rbp == null) {
+ public CFrame sender(ThreadProxy thread) {
+ AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext();
+ Address rsp = context.getRegisterAsAddress(AMD64ThreadContext.RSP);
+
+ if ( (rbp == null) || rbp.lessThan(rsp) ) {
return null;
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/sparc/LinuxSPARCCFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/sparc/LinuxSPARCCFrame.java
index eb490b284b5..d52f6b35ee0 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/sparc/LinuxSPARCCFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/sparc/LinuxSPARCCFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -57,7 +57,7 @@ final public class LinuxSPARCCFrame extends BasicCFrame {
return sp;
}
- public CFrame sender() {
+ public CFrame sender(ThreadProxy thread) {
if (sp == null) {
return null;
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/x86/LinuxX86CFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/x86/LinuxX86CFrame.java
index 67074c6533c..8d066720ea2 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/x86/LinuxX86CFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/x86/LinuxX86CFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -28,6 +28,7 @@ import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
+import sun.jvm.hotspot.debugger.x86.*;
final public class LinuxX86CFrame extends BasicCFrame {
// package/class internals only
@@ -52,8 +53,11 @@ final public class LinuxX86CFrame extends BasicCFrame {
return ebp;
}
- public CFrame sender() {
- if (ebp == null) {
+ public CFrame sender(ThreadProxy thread) {
+ X86ThreadContext context = (X86ThreadContext) thread.getContext();
+ Address esp = context.getRegisterAsAddress(X86ThreadContext.ESP);
+
+ if ( (ebp == null) || ebp.lessThan(esp) ) {
return null;
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcCFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcCFrame.java
index 6b508e1e4e8..83d5f677a6e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcCFrame.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcCFrame.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -37,7 +37,7 @@ final class ProcCFrame extends BasicCFrame {
return fp;
}
- public CFrame sender() {
+ public CFrame sender(ThreadProxy t) {
return sender;
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ReferenceTypeImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ReferenceTypeImpl.java
index d28bca18d2e..662f18e089e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ReferenceTypeImpl.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ReferenceTypeImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -688,8 +688,7 @@ implements ReferenceType {
if (sde == null) {
String extension = null;
if (saKlass instanceof InstanceKlass) {
- Symbol sdeSym = ((InstanceKlass)saKlass).getSourceDebugExtension();
- extension = (sdeSym != null)? sdeSym.asString() : null;
+ extension = ((InstanceKlass)saKlass).getSourceDebugExtension();
}
if (extension == null) {
sde = NO_SDE_INFO_MARK;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstMethod.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstMethod.java
index d19dc93cfae..241cba1f9bb 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstMethod.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstMethod.java
@@ -47,14 +47,11 @@ public class ConstMethod extends Oop {
private static int HAS_LINENUMBER_TABLE;
private static int HAS_CHECKED_EXCEPTIONS;
private static int HAS_LOCALVARIABLE_TABLE;
+ private static int HAS_EXCEPTION_TABLE;
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
Type type = db.lookupType("constMethodOopDesc");
constants = new OopField(type.getOopField("_constants"), 0);
- // The exception handler table. 4-tuples of ints [start_pc, end_pc,
- // handler_pc, catch_type index] For methods with no exceptions the
- // table is pointing to Universe::the_empty_int_array
- exceptionTable = new OopField(type.getOopField("_exception_table"), 0);
constMethodSize = new CIntField(type.getCIntegerField("_constMethod_size"), 0);
flags = new ByteField(type.getJByteField("_flags"), 0);
@@ -62,6 +59,7 @@ public class ConstMethod extends Oop {
HAS_LINENUMBER_TABLE = db.lookupIntConstant("constMethodOopDesc::_has_linenumber_table").intValue();
HAS_CHECKED_EXCEPTIONS = db.lookupIntConstant("constMethodOopDesc::_has_checked_exceptions").intValue();
HAS_LOCALVARIABLE_TABLE = db.lookupIntConstant("constMethodOopDesc::_has_localvariable_table").intValue();
+ HAS_EXCEPTION_TABLE = db.lookupIntConstant("constMethodOopDesc::_has_exception_table").intValue();
// Size of Java bytecodes allocated immediately after constMethodOop.
codeSize = new CIntField(type.getCIntegerField("_code_size"), 0);
@@ -78,6 +76,9 @@ public class ConstMethod extends Oop {
type = db.lookupType("LocalVariableTableElement");
localVariableTableElementSize = type.getSize();
+
+ type = db.lookupType("ExceptionTableElement");
+ exceptionTableElementSize = type.getSize();
}
ConstMethod(OopHandle handle, ObjectHeap heap) {
@@ -86,7 +87,6 @@ public class ConstMethod extends Oop {
// Fields
private static OopField constants;
- private static OopField exceptionTable;
private static CIntField constMethodSize;
private static ByteField flags;
private static CIntField codeSize;
@@ -100,6 +100,7 @@ public class ConstMethod extends Oop {
private static long checkedExceptionElementSize;
private static long localVariableTableElementSize;
+ private static long exceptionTableElementSize;
public Method getMethod() {
InstanceKlass ik = (InstanceKlass)getConstants().getPoolHolder();
@@ -112,10 +113,6 @@ public class ConstMethod extends Oop {
return (ConstantPool) constants.getValue(this);
}
- public TypeArray getExceptionTable() {
- return (TypeArray) exceptionTable.getValue(this);
- }
-
public long getConstMethodSize() {
return constMethodSize.getValue(this);
}
@@ -235,7 +232,6 @@ public class ConstMethod extends Oop {
super.iterateFields(visitor, doVMFields);
if (doVMFields) {
visitor.doOop(constants, true);
- visitor.doOop(exceptionTable, true);
visitor.doCInt(constMethodSize, true);
visitor.doByte(flags, true);
visitor.doCInt(codeSize, true);
@@ -326,6 +322,23 @@ public class ConstMethod extends Oop {
return ret;
}
+ public boolean hasExceptionTable() {
+ return (getFlags() & HAS_EXCEPTION_TABLE) != 0;
+ }
+
+ public ExceptionTableElement[] getExceptionTable() {
+ if (Assert.ASSERTS_ENABLED) {
+ Assert.that(hasExceptionTable(), "should only be called if table is present");
+ }
+ ExceptionTableElement[] ret = new ExceptionTableElement[getExceptionTableLength()];
+ long offset = offsetOfExceptionTable();
+ for (int i = 0; i < ret.length; i++) {
+ ret[i] = new ExceptionTableElement(getHandle(), offset);
+ offset += exceptionTableElementSize;
+ }
+ return ret;
+ }
+
public boolean hasCheckedExceptions() {
return (getFlags() & HAS_CHECKED_EXCEPTIONS) != 0;
}
@@ -415,7 +428,10 @@ public class ConstMethod extends Oop {
if (Assert.ASSERTS_ENABLED) {
Assert.that(hasLocalVariableTable(), "should only be called if table is present");
}
- if (hasCheckedExceptions()) {
+
+ if (hasExceptionTable()) {
+ return offsetOfExceptionTable() - 2;
+ } else if (hasCheckedExceptions()) {
return offsetOfCheckedExceptions() - 2;
} else {
return offsetOfLastU2Element();
@@ -432,4 +448,33 @@ public class ConstMethod extends Oop {
return offset;
}
+ private int getExceptionTableLength() {
+ if (hasExceptionTable()) {
+ return (int) getHandle().getCIntegerAt(offsetOfExceptionTableLength(), 2, true);
+ } else {
+ return 0;
+ }
+ }
+
+ private long offsetOfExceptionTableLength() {
+ if (Assert.ASSERTS_ENABLED) {
+ Assert.that(hasExceptionTable(), "should only be called if table is present");
+ }
+ if (hasCheckedExceptions()) {
+ return offsetOfCheckedExceptions() - 2;
+ } else {
+ return offsetOfLastU2Element();
+ }
+ }
+
+ private long offsetOfExceptionTable() {
+ long offset = offsetOfExceptionTableLength();
+ long length = getExceptionTableLength();
+ if (Assert.ASSERTS_ENABLED) {
+ Assert.that(length > 0, "should only be called if table is present");
+ }
+ offset -= length * exceptionTableElementSize;
+ return offset;
+ }
+
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ExceptionTableElement.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ExceptionTableElement.java
new file mode 100644
index 00000000000..93153708696
--- /dev/null
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ExceptionTableElement.java
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ *
+ */
+
+package sun.jvm.hotspot.oops;
+
+import java.io.*;
+import java.util.*;
+import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.interpreter.*;
+import sun.jvm.hotspot.runtime.*;
+import sun.jvm.hotspot.types.*;
+import sun.jvm.hotspot.utilities.*;
+
+public class ExceptionTableElement {
+ static {
+ VM.registerVMInitializedObserver(new Observer() {
+ public void update(Observable o, Object data) {
+ initialize(VM.getVM().getTypeDataBase());
+ }
+ });
+ }
+
+ private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
+ Type type = db.lookupType("ExceptionTableElement");
+ offsetOfStartPC = type.getCIntegerField("start_pc").getOffset();
+ offsetOfEndPC = type.getCIntegerField("end_pc").getOffset();
+ offsetOfHandlerPC = type.getCIntegerField("handler_pc").getOffset();
+ offsetOfCatchTypeIndex = type.getCIntegerField("catch_type_index").getOffset();
+ }
+
+ private static long offsetOfStartPC;
+ private static long offsetOfEndPC;
+ private static long offsetOfHandlerPC;
+ private static long offsetOfCatchTypeIndex;
+
+ private OopHandle handle;
+ private long offset;
+
+ public ExceptionTableElement(OopHandle handle, long offset) {
+ this.handle = handle;
+ this.offset = offset;
+ }
+
+ public int getStartPC() {
+ return (int) handle.getCIntegerAt(offset + offsetOfStartPC, 2, true);
+ }
+
+ public int getEndPC() {
+ return (int) handle.getCIntegerAt(offset + offsetOfEndPC, 2, true);
+ }
+
+ public int getHandlerPC() {
+ return (int) handle.getCIntegerAt(offset + offsetOfHandlerPC, 2, true);
+ }
+
+ public int getCatchTypeIndex() {
+ return (int) handle.getCIntegerAt(offset + offsetOfCatchTypeIndex, 2, true);
+ }
+}
+
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java
index f25493d6831..581eee80d85 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -651,10 +651,11 @@ public class GenerateOopMap {
boolean fellThrough = false; // False to get first BB marked.
// First mark all exception handlers as start of a basic-block
- TypeArray excps = method().getExceptionTable();
- for(int i = 0; i < excps.getLength(); i += 4) {
- int handler_pc_idx = i+2;
- markBB(excps.getIntAt(handler_pc_idx), null);
+ if (method().hasExceptionTable()) {
+ ExceptionTableElement[] excps = method().getExceptionTable();
+ for(int i = 0; i < excps.length; i++) {
+ markBB(excps[i].getHandlerPC(), null);
+ }
}
// Then iterate through the code
@@ -891,14 +892,15 @@ public class GenerateOopMap {
// Mark entry basic block as alive and all exception handlers
_basic_blocks[0].markAsAlive();
- TypeArray excps = method().getExceptionTable();
- for(int i = 0; i < excps.getLength(); i += 4) {
- int handler_pc_idx = i+2;
- BasicBlock bb = getBasicBlockAt(excps.getIntAt(handler_pc_idx));
- // If block is not already alive (due to multiple exception handlers to same bb), then
- // make it alive
- if (bb.isDead())
- bb.markAsAlive();
+ if (method().hasExceptionTable()) {
+ ExceptionTableElement[] excps = method().getExceptionTable();
+ for(int i = 0; i < excps.length; i ++) {
+ BasicBlock bb = getBasicBlockAt(excps[i].getHandlerPC());
+ // If block is not already alive (due to multiple exception handlers to same bb), then
+ // make it alive
+ if (bb.isDead())
+ bb.markAsAlive();
+ }
}
BytecodeStream bcs = new BytecodeStream(_method);
@@ -1468,12 +1470,12 @@ public class GenerateOopMap {
if (_has_exceptions) {
int bci = itr.bci();
- TypeArray exct = method().getExceptionTable();
- for(int i = 0; i< exct.getLength(); i+=4) {
- int start_pc = exct.getIntAt(i);
- int end_pc = exct.getIntAt(i+1);
- int handler_pc = exct.getIntAt(i+2);
- int catch_type = exct.getIntAt(i+3);
+ ExceptionTableElement[] exct = method().getExceptionTable();
+ for(int i = 0; i< exct.length; i++) {
+ int start_pc = exct[i].getStartPC();
+ int end_pc = exct[i].getEndPC();
+ int handler_pc = exct[i].getHandlerPC();
+ int catch_type = exct[i].getCatchTypeIndex();
if (start_pc <= bci && bci < end_pc) {
BasicBlock excBB = getBasicBlockAt(handler_pc);
@@ -2151,7 +2153,7 @@ public class GenerateOopMap {
_conflict = false;
_max_locals = (int) method().getMaxLocals();
_max_stack = (int) method().getMaxStack();
- _has_exceptions = (method().getExceptionTable().getLength() > 0);
+ _has_exceptions = (method().hasExceptionTable());
_nof_refval_conflicts = 0;
_init_vars = new ArrayList(5); // There are seldom more than 5 init_vars
_report_result = false;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
index 9536da39838..acd975206f5 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
@@ -342,7 +342,7 @@ public class InstanceKlass extends Klass {
public Oop getProtectionDomain() { return protectionDomain.getValue(this); }
public ObjArray getSigners() { return (ObjArray) signers.getValue(this); }
public Symbol getSourceFileName() { return getSymbol(sourceFileName); }
- public Symbol getSourceDebugExtension(){ return getSymbol(sourceDebugExtension); }
+ public String getSourceDebugExtension(){ return CStringUtilities.getString(sourceDebugExtension.getValue(getHandle())); }
public TypeArray getInnerClasses() { return (TypeArray) innerClasses.getValue(this); }
public long getNonstaticFieldSize() { return nonstaticFieldSize.getValue(this); }
public long getStaticOopFieldCount() { return staticOopFieldCount.getValue(this); }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java
index b691f1537c3..d8b3fade1af 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java
@@ -127,7 +127,6 @@ public class Method extends Oop {
return getConstMethod().getConstants();
}
public MethodData getMethodData() { return (MethodData) methodData.getValue(this); }
- public TypeArray getExceptionTable() { return getConstMethod().getExceptionTable(); }
/** WARNING: this is in words, not useful in this system; use getObjectSize() instead */
public long getMethodSize() { return methodSize.getValue(this); }
public long getMaxStack() { return maxStack.getValue(this); }
@@ -328,6 +327,14 @@ public class Method extends Oop {
return null;
}
+ public boolean hasExceptionTable() {
+ return getConstMethod().hasExceptionTable();
+ }
+
+ public ExceptionTableElement[] getExceptionTable() {
+ return getConstMethod().getExceptionTable();
+ }
+
public boolean hasCheckedExceptions() {
return getConstMethod().hasCheckedExceptions();
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java
index edd8a806442..a42d8be68b5 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -141,18 +141,19 @@ public class OopUtilities implements /* imports */ JVMTIThreadState {
public static String stringOopToString(Oop stringOop) {
if (offsetField == null) {
InstanceKlass k = (InstanceKlass) stringOop.getKlass();
- offsetField = (IntField) k.findField("offset", "I");
- countField = (IntField) k.findField("count", "I");
+ offsetField = (IntField) k.findField("offset", "I"); // optional
+ countField = (IntField) k.findField("count", "I"); // optional
valueField = (OopField) k.findField("value", "[C");
if (Assert.ASSERTS_ENABLED) {
- Assert.that(offsetField != null &&
- countField != null &&
- valueField != null, "must find all java.lang.String fields");
+ Assert.that(valueField != null, "Field \'value\' of java.lang.String not found");
}
}
- return charArrayToString((TypeArray) valueField.getValue(stringOop),
- offsetField.getValue(stringOop),
- countField.getValue(stringOop));
+ if (offsetField != null && countField != null) {
+ return charArrayToString((TypeArray) valueField.getValue(stringOop),
+ offsetField.getValue(stringOop),
+ countField.getValue(stringOop));
+ }
+ return charArrayToString((TypeArray) valueField.getValue(stringOop));
}
public static String stringOopToEscapedString(Oop stringOop) {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java
index 671bfc81125..a087d4aa04e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -158,7 +158,7 @@ public class PStack extends Tool {
printUnknown(out);
}
}
- f = f.sender();
+ f = f.sender(th);
}
} catch (Exception exp) {
exp.printStackTrace();
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java
index f4e3d7c937e..a71592d930b 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -504,11 +504,14 @@ public class ClassWriter implements /* imports */ ClassConstants
2 /* exp. table len. */ +
2 /* code attr. count */;
- TypeArray exceptionTable = m.getExceptionTable();
- final int exceptionTableLen = (int) exceptionTable.getLength();
- if (exceptionTableLen != 0) {
+ boolean hasExceptionTable = m.hasExceptionTable();
+ ExceptionTableElement[] exceptionTable = null;
+ int exceptionTableLen = 0;
+ if (hasExceptionTable) {
+ exceptionTable = m.getExceptionTable();
+ exceptionTableLen = exceptionTable.length;
if (DEBUG) debugMessage("\tmethod has exception table");
- codeSize += (exceptionTableLen / 4) /* exception table is 4-tuple array */
+ codeSize += exceptionTableLen /* exception table is 4-tuple array */
* (2 /* start_pc */ +
2 /* end_pc */ +
2 /* handler_pc */ +
@@ -586,15 +589,15 @@ public class ClassWriter implements /* imports */ ClassConstants
dos.write(code);
// write exception table size
- dos.writeShort((short) (exceptionTableLen / 4));
- if (DEBUG) debugMessage("\texception table length = " + (exceptionTableLen / 4));
+ dos.writeShort((short) exceptionTableLen);
+ if (DEBUG) debugMessage("\texception table length = " + exceptionTableLen);
if (exceptionTableLen != 0) {
- for (int e = 0; e < exceptionTableLen; e += 4) {
- dos.writeShort((short) exceptionTable.getIntAt(e));
- dos.writeShort((short) exceptionTable.getIntAt(e + 1));
- dos.writeShort((short) exceptionTable.getIntAt(e + 2));
- dos.writeShort((short) exceptionTable.getIntAt(e + 3));
+ for (int e = 0; e < exceptionTableLen; e++) {
+ dos.writeShort((short) exceptionTable[e].getStartPC());
+ dos.writeShort((short) exceptionTable[e].getEndPC());
+ dos.writeShort((short) exceptionTable[e].getHandlerPC());
+ dos.writeShort((short) exceptionTable[e].getCatchTypeIndex());
}
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
index b8d5c8bab7b..2ab2bf6e2a3 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -783,37 +783,39 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
});
// display exception table for this method
- TypeArray exceptionTable = method.getExceptionTable();
- // exception table is 4 tuple array of shorts
- int numEntries = (int)exceptionTable.getLength() / 4;
- if (numEntries != 0) {
- buf.h4("Exception Table");
- buf.beginTable(1);
- buf.beginTag("tr");
- buf.headerCell("start bci");
- buf.headerCell("end bci");
- buf.headerCell("handler bci");
- buf.headerCell("catch type");
- buf.endTag("tr");
-
- for (int e = 0; e < numEntries; e += 4) {
+ boolean hasException = method.hasExceptionTable();
+ if (hasException) {
+ ExceptionTableElement[] exceptionTable = method.getExceptionTable();
+ int numEntries = exceptionTable.length;
+ if (numEntries != 0) {
+ buf.h4("Exception Table");
+ buf.beginTable(1);
buf.beginTag("tr");
- buf.cell(Integer.toString(exceptionTable.getIntAt(e)));
- buf.cell(Integer.toString(exceptionTable.getIntAt(e + 1)));
- buf.cell(Integer.toString(exceptionTable.getIntAt(e + 2)));
- short cpIndex = (short) exceptionTable.getIntAt(e + 3);
- ConstantPool.CPSlot obj = cpIndex == 0? null : cpool.getSlotAt(cpIndex);
- if (obj == null) {
- buf.cell("Any");
- } else if (obj.isMetaData()) {
- buf.cell(obj.getSymbol().asString().replace('/', '.'));
- } else {
- buf.cell(genKlassLink((InstanceKlass)obj.getOop()));
- }
+ buf.headerCell("start bci");
+ buf.headerCell("end bci");
+ buf.headerCell("handler bci");
+ buf.headerCell("catch type");
buf.endTag("tr");
- }
- buf.endTable();
+ for (int e = 0; e < numEntries; e ++) {
+ buf.beginTag("tr");
+ buf.cell(Integer.toString(exceptionTable[e].getStartPC()));
+ buf.cell(Integer.toString(exceptionTable[e].getEndPC()));
+ buf.cell(Integer.toString(exceptionTable[e].getHandlerPC()));
+ short cpIndex = (short) exceptionTable[e].getCatchTypeIndex();
+ ConstantPool.CPSlot obj = cpIndex == 0? null : cpool.getSlotAt(cpIndex);
+ if (obj == null) {
+ buf.cell("Any");
+ } else if (obj.isMetaData()) {
+ buf.cell(obj.getSymbol().asString().replace('/', '.'));
+ } else {
+ buf.cell(genKlassLink((InstanceKlass)obj.getOop()));
+ }
+ buf.endTag("tr");
+ }
+
+ buf.endTable();
+ }
}
// display constant pool hyperlink
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtable.java
index bb296a509d2..0f4da3a9218 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtable.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtable.java
@@ -41,10 +41,10 @@ public class BasicHashtable extends VMObject {
}
private static synchronized void initialize(TypeDataBase db) {
- Type type = db.lookupType("BasicHashtable");
+ Type type = db.lookupType("BasicHashtable");
tableSizeField = type.getCIntegerField("_table_size");
bucketsField = type.getAddressField("_buckets");
- bucketSize = db.lookupType("HashtableBucket").getSize();
+ bucketSize = db.lookupType("HashtableBucket").getSize();
}
// Fields
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtableEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtableEntry.java
index 192c1dd9fa0..0296dcbd651 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtableEntry.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtableEntry.java
@@ -41,7 +41,7 @@ public class BasicHashtableEntry extends VMObject {
}
private static synchronized void initialize(TypeDataBase db) {
- Type type = db.lookupType("BasicHashtableEntry");
+ Type type = db.lookupType("BasicHashtableEntry");
hashField = type.getCIntegerField("_hash");
nextField = type.getAddressField("_next");
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
index 3c2e0f965c2..70709f02b84 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
@@ -40,7 +40,7 @@ public class Hashtable extends BasicHashtable {
private static synchronized void initialize(TypeDataBase db) {
// just to confirm that type exists
- Type type = db.lookupType("Hashtable");
+ Type type = db.lookupType("IntptrHashtable");
}
// derived class may return Class extends HashtableEntry>
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableBucket.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableBucket.java
index 2e86b9a8318..44f78e49dd8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableBucket.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableBucket.java
@@ -39,7 +39,7 @@ public class HashtableBucket extends VMObject {
}
private static synchronized void initialize(TypeDataBase db) {
- Type type = db.lookupType("HashtableBucket");
+ Type type = db.lookupType("HashtableBucket");
entryField = type.getAddressField("_entry");
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java
index 73932a43033..38c5968720d 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java
@@ -41,7 +41,7 @@ public class HashtableEntry extends BasicHashtableEntry {
}
private static synchronized void initialize(TypeDataBase db) {
- Type type = db.lookupType("HashtableEntry");
+ Type type = db.lookupType("IntptrHashtableEntry");
literalField = type.getAddressField("_literal");
}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ObjectReader.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ObjectReader.java
index 55cb2995621..1f17a7fdb63 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ObjectReader.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/ObjectReader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -85,6 +85,21 @@ public class ObjectReader {
this(new ProcImageClassLoader());
}
+ static void debugPrintln(String msg) {
+ if (DEBUG) {
+ System.err.println("DEBUG>" + msg);
+ }
+ }
+
+ static void debugPrintStackTrace(Exception exp) {
+ if (DEBUG) {
+ StackTraceElement[] els = exp.getStackTrace();
+ for (int i = 0; i < els.length; i++) {
+ System.err.println("DEBUG>" + els[i].toString());
+ }
+ }
+ }
+
public Object readObject(Oop oop) throws ClassNotFoundException {
if (oop instanceof Instance) {
return readInstance((Instance) oop);
@@ -120,13 +135,96 @@ public class ObjectReader {
}
protected Symbol javaLangString;
+ protected Symbol javaUtilHashtableEntry;
+ protected Symbol javaUtilHashtable;
+ protected Symbol javaUtilProperties;
+
+ protected Symbol getVMSymbol(String name) {
+ return VM.getVM().getSymbolTable().probe(name);
+ }
+
protected Symbol javaLangString() {
if (javaLangString == null) {
- javaLangString = VM.getVM().getSymbolTable().probe("java/lang/String");
+ javaLangString = getVMSymbol("java/lang/String");
}
return javaLangString;
}
+ protected Symbol javaUtilHashtableEntry() {
+ if (javaUtilHashtableEntry == null) {
+ javaUtilHashtableEntry = getVMSymbol("java/util/Hashtable$Entry");
+ }
+ return javaUtilHashtableEntry;
+ }
+
+ protected Symbol javaUtilHashtable() {
+ if (javaUtilHashtable == null) {
+ javaUtilHashtable = getVMSymbol("java/util/Hashtable");
+ }
+ return javaUtilHashtable;
+ }
+
+ protected Symbol javaUtilProperties() {
+ if (javaUtilProperties == null) {
+ javaUtilProperties = getVMSymbol("java/util/Properties");
+ }
+ return javaUtilProperties;
+ }
+
+ private void setHashtableEntry(java.util.Hashtable p, Oop oop) {
+ InstanceKlass ik = (InstanceKlass)oop.getKlass();
+ OopField keyField = (OopField)ik.findField("key", "Ljava/lang/Object;");
+ OopField valueField = (OopField)ik.findField("value", "Ljava/lang/Object;");
+ OopField nextField = (OopField)ik.findField("next", "Ljava/util/Hashtable$Entry;");
+ if (DEBUG) {
+ if (Assert.ASSERTS_ENABLED) {
+ Assert.that(ik.getName().equals(javaUtilHashtableEntry()), "Not a Hashtable$Entry?");
+ Assert.that(keyField != null && valueField != null && nextField != null, "Invalid fields!");
+ }
+ }
+
+ Object key = null;
+ Object value = null;
+ Oop next = null;
+ try {
+ key = readObject(keyField.getValue(oop));
+ value = readObject(valueField.getValue(oop));
+ next = (Oop)nextField.getValue(oop);
+ // For Properties, should use setProperty(k, v). Since it only runs in SA
+ // using put(k, v) should be OK.
+ p.put(key, value);
+ if (next != null) {
+ setHashtableEntry(p, next);
+ }
+ } catch (ClassNotFoundException ce) {
+ if( DEBUG) {
+ debugPrintln("Class not found " + ce);
+ debugPrintStackTrace(ce);
+ }
+ }
+ }
+
+ protected Object getHashtable(Instance oop, boolean isProperties) {
+ InstanceKlass k = (InstanceKlass)oop.getKlass();
+ OopField tableField = (OopField)k.findField("table", "[Ljava/util/Hashtable$Entry;");
+ if (tableField == null) {
+ debugPrintln("Could not find field of [Ljava/util/Hashtable$Entry;");
+ return null;
+ }
+ java.util.Hashtable table = (isProperties) ? new java.util.Properties()
+ : new java.util.Hashtable();
+ ObjArray kvs = (ObjArray)tableField.getValue(oop);
+ long size = kvs.getLength();
+ debugPrintln("Hashtable$Entry Size = " + size);
+ for (long i=0; i= 509), 1)
# dtrace cannot handle tail call optimization (6672627, 6693876)
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT)
diff --git a/hotspot/make/solaris/makefiles/product.make b/hotspot/make/solaris/makefiles/product.make
index 8746d51e57e..2aeae30df8e 100644
--- a/hotspot/make/solaris/makefiles/product.make
+++ b/hotspot/make/solaris/makefiles/product.make
@@ -40,6 +40,11 @@ endif
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
ifeq ("${Platform_compiler}", "sparcWorks")
+ifeq ($(COMPILER_REV_NUMERIC), 510)
+# CC 5.10 has bug XXXXX with -xO4
+OPT_CFLAGS/jvmtiClassFileReconstituter.o = $(OPT_CFLAGS/O2)
+endif # COMPILER_REV_NUMERIC == 510
+
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
# dtrace cannot handle tail call optimization (6672627, 6693876)
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT)
diff --git a/hotspot/make/windows/makefiles/debug.make b/hotspot/make/windows/makefiles/debug.make
index 9f434729d76..36a12dc9de2 100644
--- a/hotspot/make/windows/makefiles/debug.make
+++ b/hotspot/make/windows/makefiles/debug.make
@@ -38,7 +38,8 @@ default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA wb
!include ../local.make
!include compile.make
-CXX_FLAGS=$(CXX_FLAGS) $(DEBUG_OPT_OPTION)
+# _NMT_NOINLINE_ informs NMT that no inlining by Compiler
+CXX_FLAGS=$(CXX_FLAGS) $(DEBUG_OPT_OPTION) /D "_NMT_NOINLINE_"
!include $(WorkSpace)/make/windows/makefiles/vm.make
!include local.make
diff --git a/hotspot/src/cpu/sparc/vm/sparc.ad b/hotspot/src/cpu/sparc/vm/sparc.ad
index 43c9976bbde..400df553694 100644
--- a/hotspot/src/cpu/sparc/vm/sparc.ad
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad
@@ -1,5 +1,5 @@
//
-// Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 1998, 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
@@ -678,18 +678,26 @@ intptr_t get_offset_from_base_2(const MachNode* n, const TypePtr* atype, int dis
static inline jdouble replicate_immI(int con, int count, int width) {
// Load a constant replicated "count" times with width "width"
+ assert(count*width == 8 && width <= 4, "sanity");
int bit_width = width * 8;
- jlong elt_val = con;
- elt_val &= (((jlong) 1) << bit_width) - 1; // mask off sign bits
- jlong val = elt_val;
+ jlong val = con;
+ val &= (((jlong) 1) << bit_width) - 1; // mask off sign bits
for (int i = 0; i < count - 1; i++) {
- val <<= bit_width;
- val |= elt_val;
+ val |= (val << bit_width);
}
jdouble dval = *((jdouble*) &val); // coerce to double type
return dval;
}
+static inline jdouble replicate_immF(float con) {
+ // Replicate float con 2 times and pack into vector.
+ int val = *((int*)&con);
+ jlong lval = val;
+ lval = (lval << 32) | (lval & 0xFFFFFFFFl);
+ jdouble dval = *((jdouble*) &lval); // coerce to double type
+ return dval;
+}
+
// Standard Sparc opcode form2 field breakdown
static inline void emit2_19(CodeBuffer &cbuf, int f30, int f29, int f25, int f22, int f20, int f19, int f0 ) {
f0 &= (1<<19)-1; // Mask displacement to 19 bits
@@ -791,6 +799,7 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int te
case Assembler::stdf_op3: st_op = Op_StoreD; break;
case Assembler::ldsb_op3: ld_op = Op_LoadB; break;
+ case Assembler::ldub_op3: ld_op = Op_LoadUB; break;
case Assembler::lduh_op3: ld_op = Op_LoadUS; break;
case Assembler::ldsh_op3: ld_op = Op_LoadS; break;
case Assembler::ldx_op3: // may become LoadP or stay LoadI
@@ -799,7 +808,6 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int te
case Assembler::ldd_op3: ld_op = Op_LoadL; break;
case Assembler::ldf_op3: ld_op = Op_LoadF; break;
case Assembler::lddf_op3: ld_op = Op_LoadD; break;
- case Assembler::ldub_op3: ld_op = Op_LoadB; break;
case Assembler::prefetch_op3: ld_op = Op_LoadI; break;
default: ShouldNotReachHere();
@@ -840,10 +848,7 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int te
!(n->ideal_Opcode()==Op_PrefetchRead && ld_op==Op_LoadI) &&
!(n->ideal_Opcode()==Op_PrefetchWrite && ld_op==Op_LoadI) &&
!(n->ideal_Opcode()==Op_PrefetchAllocation && ld_op==Op_LoadI) &&
- !(n->ideal_Opcode()==Op_Load2I && ld_op==Op_LoadD) &&
- !(n->ideal_Opcode()==Op_Load4C && ld_op==Op_LoadD) &&
- !(n->ideal_Opcode()==Op_Load4S && ld_op==Op_LoadD) &&
- !(n->ideal_Opcode()==Op_Load8B && ld_op==Op_LoadD) &&
+ !(n->ideal_Opcode()==Op_LoadVector && ld_op==Op_LoadD) &&
!(n->rule() == loadUB_rule)) {
verify_oops_warning(n, n->ideal_Opcode(), ld_op);
}
@@ -855,9 +860,7 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, const MachNode* n, int primary, int te
!(n->ideal_Opcode()==Op_StoreI && st_op==Op_StoreF) &&
!(n->ideal_Opcode()==Op_StoreF && st_op==Op_StoreI) &&
!(n->ideal_Opcode()==Op_StoreL && st_op==Op_StoreI) &&
- !(n->ideal_Opcode()==Op_Store2I && st_op==Op_StoreD) &&
- !(n->ideal_Opcode()==Op_Store4C && st_op==Op_StoreD) &&
- !(n->ideal_Opcode()==Op_Store8B && st_op==Op_StoreD) &&
+ !(n->ideal_Opcode()==Op_StoreVector && st_op==Op_StoreD) &&
!(n->ideal_Opcode()==Op_StoreD && st_op==Op_StoreI && n->rule() == storeD0_rule)) {
verify_oops_warning(n, n->ideal_Opcode(), st_op);
}
@@ -1849,16 +1852,45 @@ int Matcher::regnum_to_fpu_offset(int regnum) {
address last_rethrow = NULL; // debugging aid for Rethrow encoding
#endif
+// Map Types to machine register types
+const int Matcher::base2reg[Type::lastype] = {
+ Node::NotAMachineReg,0,0, Op_RegI, Op_RegL, 0, Op_RegN,
+ Node::NotAMachineReg, Node::NotAMachineReg, /* tuple, array */
+ 0, Op_RegD, 0, 0, /* Vectors */
+ Op_RegP, Op_RegP, Op_RegP, Op_RegP, Op_RegP, Op_RegP, /* the pointers */
+ 0, 0/*abio*/,
+ Op_RegP /* Return address */, 0, /* the memories */
+ Op_RegF, Op_RegF, Op_RegF, Op_RegD, Op_RegD, Op_RegD,
+ 0 /*bottom*/
+};
+
// Vector width in bytes
-const uint Matcher::vector_width_in_bytes(void) {
+const int Matcher::vector_width_in_bytes(BasicType bt) {
+ assert(MaxVectorSize == 8, "");
return 8;
}
// Vector ideal reg
-const uint Matcher::vector_ideal_reg(void) {
+const int Matcher::vector_ideal_reg(int size) {
+ assert(MaxVectorSize == 8, "");
return Op_RegD;
}
+// Limits on vector size (number of elements) loaded into vector.
+const int Matcher::max_vector_size(const BasicType bt) {
+ assert(is_java_primitive(bt), "only primitive type vectors");
+ return vector_width_in_bytes(bt)/type2aelembytes(bt);
+}
+
+const int Matcher::min_vector_size(const BasicType bt) {
+ return max_vector_size(bt); // Same as max.
+}
+
+// SPARC doesn't support misaligned vectors store/load.
+const bool Matcher::misaligned_vectors_ok() {
+ return false;
+}
+
// USII supports fxtof through the whole range of number, USIII doesn't
const bool Matcher::convL2FSupported(void) {
return VM_Version::has_fast_fxtof();
@@ -3125,50 +3157,6 @@ enc_class enc_Array_Equals(o0RegP ary1, o1RegP ary2, g3RegP tmp1, notemp_iRegI r
__ membar( Assembler::Membar_mask_bits(Assembler::StoreLoad) );
%}
- enc_class enc_repl8b( iRegI src, iRegL dst ) %{
- MacroAssembler _masm(&cbuf);
- Register src_reg = reg_to_register_object($src$$reg);
- Register dst_reg = reg_to_register_object($dst$$reg);
- __ sllx(src_reg, 56, dst_reg);
- __ srlx(dst_reg, 8, O7);
- __ or3 (dst_reg, O7, dst_reg);
- __ srlx(dst_reg, 16, O7);
- __ or3 (dst_reg, O7, dst_reg);
- __ srlx(dst_reg, 32, O7);
- __ or3 (dst_reg, O7, dst_reg);
- %}
-
- enc_class enc_repl4b( iRegI src, iRegL dst ) %{
- MacroAssembler _masm(&cbuf);
- Register src_reg = reg_to_register_object($src$$reg);
- Register dst_reg = reg_to_register_object($dst$$reg);
- __ sll(src_reg, 24, dst_reg);
- __ srl(dst_reg, 8, O7);
- __ or3(dst_reg, O7, dst_reg);
- __ srl(dst_reg, 16, O7);
- __ or3(dst_reg, O7, dst_reg);
- %}
-
- enc_class enc_repl4s( iRegI src, iRegL dst ) %{
- MacroAssembler _masm(&cbuf);
- Register src_reg = reg_to_register_object($src$$reg);
- Register dst_reg = reg_to_register_object($dst$$reg);
- __ sllx(src_reg, 48, dst_reg);
- __ srlx(dst_reg, 16, O7);
- __ or3 (dst_reg, O7, dst_reg);
- __ srlx(dst_reg, 32, O7);
- __ or3 (dst_reg, O7, dst_reg);
- %}
-
- enc_class enc_repl2i( iRegI src, iRegL dst ) %{
- MacroAssembler _masm(&cbuf);
- Register src_reg = reg_to_register_object($src$$reg);
- Register dst_reg = reg_to_register_object($dst$$reg);
- __ sllx(src_reg, 32, dst_reg);
- __ srlx(dst_reg, 32, O7);
- __ or3 (dst_reg, O7, dst_reg);
- %}
-
%}
//----------FRAME--------------------------------------------------------------
@@ -5932,50 +5920,6 @@ instruct loadL_unaligned(iRegL dst, memory mem, o7RegI tmp) %{
ins_pipe(iload_mem);
%}
-// Load Aligned Packed Byte into a Double Register
-instruct loadA8B(regD dst, memory mem) %{
- match(Set dst (Load8B mem));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "LDDF $mem,$dst\t! packed8B" %}
- opcode(Assembler::lddf_op3);
- ins_encode(simple_form3_mem_reg( mem, dst ) );
- ins_pipe(floadD_mem);
-%}
-
-// Load Aligned Packed Char into a Double Register
-instruct loadA4C(regD dst, memory mem) %{
- match(Set dst (Load4C mem));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "LDDF $mem,$dst\t! packed4C" %}
- opcode(Assembler::lddf_op3);
- ins_encode(simple_form3_mem_reg( mem, dst ) );
- ins_pipe(floadD_mem);
-%}
-
-// Load Aligned Packed Short into a Double Register
-instruct loadA4S(regD dst, memory mem) %{
- match(Set dst (Load4S mem));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "LDDF $mem,$dst\t! packed4S" %}
- opcode(Assembler::lddf_op3);
- ins_encode(simple_form3_mem_reg( mem, dst ) );
- ins_pipe(floadD_mem);
-%}
-
-// Load Aligned Packed Int into a Double Register
-instruct loadA2I(regD dst, memory mem) %{
- match(Set dst (Load2I mem));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "LDDF $mem,$dst\t! packed2I" %}
- opcode(Assembler::lddf_op3);
- ins_encode(simple_form3_mem_reg( mem, dst ) );
- ins_pipe(floadD_mem);
-%}
-
// Load Range
instruct loadRange(iRegI dst, memory mem) %{
match(Set dst (LoadRange mem));
@@ -6599,17 +6543,6 @@ instruct storeF0( memory mem, immF0 src) %{
ins_pipe(fstoreF_mem_zero);
%}
-// Store Aligned Packed Bytes in Double register to memory
-instruct storeA8B(memory mem, regD src) %{
- match(Set mem (Store8B mem src));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "STDF $src,$mem\t! packed8B" %}
- opcode(Assembler::stdf_op3);
- ins_encode(simple_form3_mem_reg( mem, src ) );
- ins_pipe(fstoreD_mem_reg);
-%}
-
// Convert oop pointer into compressed form
instruct encodeHeapOop(iRegN dst, iRegP src) %{
predicate(n->bottom_type()->make_ptr()->ptr() != TypePtr::NotNull);
@@ -6654,62 +6587,6 @@ instruct decodeHeapOop_not_null(iRegP dst, iRegN src) %{
%}
-// Store Zero into Aligned Packed Bytes
-instruct storeA8B0(memory mem, immI0 zero) %{
- match(Set mem (Store8B mem zero));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "STX $zero,$mem\t! packed8B" %}
- opcode(Assembler::stx_op3);
- ins_encode(simple_form3_mem_reg( mem, R_G0 ) );
- ins_pipe(fstoreD_mem_zero);
-%}
-
-// Store Aligned Packed Chars/Shorts in Double register to memory
-instruct storeA4C(memory mem, regD src) %{
- match(Set mem (Store4C mem src));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "STDF $src,$mem\t! packed4C" %}
- opcode(Assembler::stdf_op3);
- ins_encode(simple_form3_mem_reg( mem, src ) );
- ins_pipe(fstoreD_mem_reg);
-%}
-
-// Store Zero into Aligned Packed Chars/Shorts
-instruct storeA4C0(memory mem, immI0 zero) %{
- match(Set mem (Store4C mem (Replicate4C zero)));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "STX $zero,$mem\t! packed4C" %}
- opcode(Assembler::stx_op3);
- ins_encode(simple_form3_mem_reg( mem, R_G0 ) );
- ins_pipe(fstoreD_mem_zero);
-%}
-
-// Store Aligned Packed Ints in Double register to memory
-instruct storeA2I(memory mem, regD src) %{
- match(Set mem (Store2I mem src));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "STDF $src,$mem\t! packed2I" %}
- opcode(Assembler::stdf_op3);
- ins_encode(simple_form3_mem_reg( mem, src ) );
- ins_pipe(fstoreD_mem_reg);
-%}
-
-// Store Zero into Aligned Packed Ints
-instruct storeA2I0(memory mem, immI0 zero) %{
- match(Set mem (Store2I mem zero));
- ins_cost(MEMORY_REF_COST);
- size(4);
- format %{ "STX $zero,$mem\t! packed2I" %}
- opcode(Assembler::stx_op3);
- ins_encode(simple_form3_mem_reg( mem, R_G0 ) );
- ins_pipe(fstoreD_mem_zero);
-%}
-
-
//----------MemBar Instructions-----------------------------------------------
// Memory barrier flavors
@@ -8880,150 +8757,6 @@ instruct shrL_reg_imm6_L2I(iRegI dst, iRegL src, immI_32_63 cnt) %{
ins_pipe(ialu_reg_imm);
%}
-// Replicate scalar to packed byte values in Double register
-instruct Repl8B_reg_helper(iRegL dst, iRegI src) %{
- effect(DEF dst, USE src);
- format %{ "SLLX $src,56,$dst\n\t"
- "SRLX $dst, 8,O7\n\t"
- "OR $dst,O7,$dst\n\t"
- "SRLX $dst,16,O7\n\t"
- "OR $dst,O7,$dst\n\t"
- "SRLX $dst,32,O7\n\t"
- "OR $dst,O7,$dst\t! replicate8B" %}
- ins_encode( enc_repl8b(src, dst));
- ins_pipe(ialu_reg);
-%}
-
-// Replicate scalar to packed byte values in Double register
-instruct Repl8B_reg(stackSlotD dst, iRegI src) %{
- match(Set dst (Replicate8B src));
- expand %{
- iRegL tmp;
- Repl8B_reg_helper(tmp, src);
- regL_to_stkD(dst, tmp);
- %}
-%}
-
-// Replicate scalar constant to packed byte values in Double register
-instruct Repl8B_immI(regD dst, immI13 con, o7RegI tmp) %{
- match(Set dst (Replicate8B con));
- effect(KILL tmp);
- format %{ "LDDF [$constanttablebase + $constantoffset],$dst\t! load from constant table: Repl8B($con)" %}
- ins_encode %{
- // XXX This is a quick fix for 6833573.
- //__ ldf(FloatRegisterImpl::D, $constanttablebase, $constantoffset(replicate_immI($con$$constant, 8, 1)), $dst$$FloatRegister);
- RegisterOrConstant con_offset = __ ensure_simm13_or_reg($constantoffset(replicate_immI($con$$constant, 8, 1)), $tmp$$Register);
- __ ldf(FloatRegisterImpl::D, $constanttablebase, con_offset, as_DoubleFloatRegister($dst$$reg));
- %}
- ins_pipe(loadConFD);
-%}
-
-// Replicate scalar to packed char values into stack slot
-instruct Repl4C_reg_helper(iRegL dst, iRegI src) %{
- effect(DEF dst, USE src);
- format %{ "SLLX $src,48,$dst\n\t"
- "SRLX $dst,16,O7\n\t"
- "OR $dst,O7,$dst\n\t"
- "SRLX $dst,32,O7\n\t"
- "OR $dst,O7,$dst\t! replicate4C" %}
- ins_encode( enc_repl4s(src, dst) );
- ins_pipe(ialu_reg);
-%}
-
-// Replicate scalar to packed char values into stack slot
-instruct Repl4C_reg(stackSlotD dst, iRegI src) %{
- match(Set dst (Replicate4C src));
- expand %{
- iRegL tmp;
- Repl4C_reg_helper(tmp, src);
- regL_to_stkD(dst, tmp);
- %}
-%}
-
-// Replicate scalar constant to packed char values in Double register
-instruct Repl4C_immI(regD dst, immI con, o7RegI tmp) %{
- match(Set dst (Replicate4C con));
- effect(KILL tmp);
- format %{ "LDDF [$constanttablebase + $constantoffset],$dst\t! load from constant table: Repl4C($con)" %}
- ins_encode %{
- // XXX This is a quick fix for 6833573.
- //__ ldf(FloatRegisterImpl::D, $constanttablebase, $constantoffset(replicate_immI($con$$constant, 4, 2)), $dst$$FloatRegister);
- RegisterOrConstant con_offset = __ ensure_simm13_or_reg($constantoffset(replicate_immI($con$$constant, 4, 2)), $tmp$$Register);
- __ ldf(FloatRegisterImpl::D, $constanttablebase, con_offset, as_DoubleFloatRegister($dst$$reg));
- %}
- ins_pipe(loadConFD);
-%}
-
-// Replicate scalar to packed short values into stack slot
-instruct Repl4S_reg_helper(iRegL dst, iRegI src) %{
- effect(DEF dst, USE src);
- format %{ "SLLX $src,48,$dst\n\t"
- "SRLX $dst,16,O7\n\t"
- "OR $dst,O7,$dst\n\t"
- "SRLX $dst,32,O7\n\t"
- "OR $dst,O7,$dst\t! replicate4S" %}
- ins_encode( enc_repl4s(src, dst) );
- ins_pipe(ialu_reg);
-%}
-
-// Replicate scalar to packed short values into stack slot
-instruct Repl4S_reg(stackSlotD dst, iRegI src) %{
- match(Set dst (Replicate4S src));
- expand %{
- iRegL tmp;
- Repl4S_reg_helper(tmp, src);
- regL_to_stkD(dst, tmp);
- %}
-%}
-
-// Replicate scalar constant to packed short values in Double register
-instruct Repl4S_immI(regD dst, immI con, o7RegI tmp) %{
- match(Set dst (Replicate4S con));
- effect(KILL tmp);
- format %{ "LDDF [$constanttablebase + $constantoffset],$dst\t! load from constant table: Repl4S($con)" %}
- ins_encode %{
- // XXX This is a quick fix for 6833573.
- //__ ldf(FloatRegisterImpl::D, $constanttablebase, $constantoffset(replicate_immI($con$$constant, 4, 2)), $dst$$FloatRegister);
- RegisterOrConstant con_offset = __ ensure_simm13_or_reg($constantoffset(replicate_immI($con$$constant, 4, 2)), $tmp$$Register);
- __ ldf(FloatRegisterImpl::D, $constanttablebase, con_offset, as_DoubleFloatRegister($dst$$reg));
- %}
- ins_pipe(loadConFD);
-%}
-
-// Replicate scalar to packed int values in Double register
-instruct Repl2I_reg_helper(iRegL dst, iRegI src) %{
- effect(DEF dst, USE src);
- format %{ "SLLX $src,32,$dst\n\t"
- "SRLX $dst,32,O7\n\t"
- "OR $dst,O7,$dst\t! replicate2I" %}
- ins_encode( enc_repl2i(src, dst));
- ins_pipe(ialu_reg);
-%}
-
-// Replicate scalar to packed int values in Double register
-instruct Repl2I_reg(stackSlotD dst, iRegI src) %{
- match(Set dst (Replicate2I src));
- expand %{
- iRegL tmp;
- Repl2I_reg_helper(tmp, src);
- regL_to_stkD(dst, tmp);
- %}
-%}
-
-// Replicate scalar zero constant to packed int values in Double register
-instruct Repl2I_immI(regD dst, immI con, o7RegI tmp) %{
- match(Set dst (Replicate2I con));
- effect(KILL tmp);
- format %{ "LDDF [$constanttablebase + $constantoffset],$dst\t! load from constant table: Repl2I($con)" %}
- ins_encode %{
- // XXX This is a quick fix for 6833573.
- //__ ldf(FloatRegisterImpl::D, $constanttablebase, $constantoffset(replicate_immI($con$$constant, 2, 4)), $dst$$FloatRegister);
- RegisterOrConstant con_offset = __ ensure_simm13_or_reg($constantoffset(replicate_immI($con$$constant, 2, 4)), $tmp$$Register);
- __ ldf(FloatRegisterImpl::D, $constanttablebase, con_offset, as_DoubleFloatRegister($dst$$reg));
- %}
- ins_pipe(loadConFD);
-%}
-
//----------Control Flow Instructions------------------------------------------
// Compare Instructions
// Compare Integers
@@ -10742,6 +10475,308 @@ instruct storeS_reversed(indIndexMemory dst, iRegI src) %{
ins_pipe(istore_mem_reg);
%}
+// ====================VECTOR INSTRUCTIONS=====================================
+
+// Load Aligned Packed values into a Double Register
+instruct loadV8(regD dst, memory mem) %{
+ predicate(n->as_LoadVector()->memory_size() == 8);
+ match(Set dst (LoadVector mem));
+ ins_cost(MEMORY_REF_COST);
+ size(4);
+ format %{ "LDDF $mem,$dst\t! load vector (8 bytes)" %}
+ ins_encode %{
+ __ ldf(FloatRegisterImpl::D, $mem$$Address, as_DoubleFloatRegister($dst$$reg));
+ %}
+ ins_pipe(floadD_mem);
+%}
+
+// Store Vector in Double register to memory
+instruct storeV8(memory mem, regD src) %{
+ predicate(n->as_StoreVector()->memory_size() == 8);
+ match(Set mem (StoreVector mem src));
+ ins_cost(MEMORY_REF_COST);
+ size(4);
+ format %{ "STDF $src,$mem\t! store vector (8 bytes)" %}
+ ins_encode %{
+ __ stf(FloatRegisterImpl::D, as_DoubleFloatRegister($src$$reg), $mem$$Address);
+ %}
+ ins_pipe(fstoreD_mem_reg);
+%}
+
+// Store Zero into vector in memory
+instruct storeV8B_zero(memory mem, immI0 zero) %{
+ predicate(n->as_StoreVector()->memory_size() == 8);
+ match(Set mem (StoreVector mem (ReplicateB zero)));
+ ins_cost(MEMORY_REF_COST);
+ size(4);
+ format %{ "STX $zero,$mem\t! store zero vector (8 bytes)" %}
+ ins_encode %{
+ __ stx(G0, $mem$$Address);
+ %}
+ ins_pipe(fstoreD_mem_zero);
+%}
+
+instruct storeV4S_zero(memory mem, immI0 zero) %{
+ predicate(n->as_StoreVector()->memory_size() == 8);
+ match(Set mem (StoreVector mem (ReplicateS zero)));
+ ins_cost(MEMORY_REF_COST);
+ size(4);
+ format %{ "STX $zero,$mem\t! store zero vector (4 shorts)" %}
+ ins_encode %{
+ __ stx(G0, $mem$$Address);
+ %}
+ ins_pipe(fstoreD_mem_zero);
+%}
+
+instruct storeV2I_zero(memory mem, immI0 zero) %{
+ predicate(n->as_StoreVector()->memory_size() == 8);
+ match(Set mem (StoreVector mem (ReplicateI zero)));
+ ins_cost(MEMORY_REF_COST);
+ size(4);
+ format %{ "STX $zero,$mem\t! store zero vector (2 ints)" %}
+ ins_encode %{
+ __ stx(G0, $mem$$Address);
+ %}
+ ins_pipe(fstoreD_mem_zero);
+%}
+
+instruct storeV2F_zero(memory mem, immF0 zero) %{
+ predicate(n->as_StoreVector()->memory_size() == 8);
+ match(Set mem (StoreVector mem (ReplicateF zero)));
+ ins_cost(MEMORY_REF_COST);
+ size(4);
+ format %{ "STX $zero,$mem\t! store zero vector (2 floats)" %}
+ ins_encode %{
+ __ stx(G0, $mem$$Address);
+ %}
+ ins_pipe(fstoreD_mem_zero);
+%}
+
+// Replicate scalar to packed byte values into Double register
+instruct Repl8B_reg(regD dst, iRegI src, iRegL tmp, o7RegL tmp2) %{
+ predicate(n->as_Vector()->length() == 8 && UseVIS >= 3);
+ match(Set dst (ReplicateB src));
+ effect(DEF dst, USE src, TEMP tmp, KILL tmp2);
+ format %{ "SLLX $src,56,$tmp\n\t"
+ "SRLX $tmp, 8,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\n\t"
+ "SRLX $tmp,16,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\n\t"
+ "SRLX $tmp,32,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\t! replicate8B\n\t"
+ "MOVXTOD $tmp,$dst\t! MoveL2D" %}
+ ins_encode %{
+ Register Rsrc = $src$$Register;
+ Register Rtmp = $tmp$$Register;
+ Register Rtmp2 = $tmp2$$Register;
+ __ sllx(Rsrc, 56, Rtmp);
+ __ srlx(Rtmp, 8, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ srlx(Rtmp, 16, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ srlx(Rtmp, 32, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ movxtod(Rtmp, as_DoubleFloatRegister($dst$$reg));
+ %}
+ ins_pipe(ialu_reg);
+%}
+
+// Replicate scalar to packed byte values into Double stack
+instruct Repl8B_stk(stackSlotD dst, iRegI src, iRegL tmp, o7RegL tmp2) %{
+ predicate(n->as_Vector()->length() == 8 && UseVIS < 3);
+ match(Set dst (ReplicateB src));
+ effect(DEF dst, USE src, TEMP tmp, KILL tmp2);
+ format %{ "SLLX $src,56,$tmp\n\t"
+ "SRLX $tmp, 8,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\n\t"
+ "SRLX $tmp,16,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\n\t"
+ "SRLX $tmp,32,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\t! replicate8B\n\t"
+ "STX $tmp,$dst\t! regL to stkD" %}
+ ins_encode %{
+ Register Rsrc = $src$$Register;
+ Register Rtmp = $tmp$$Register;
+ Register Rtmp2 = $tmp2$$Register;
+ __ sllx(Rsrc, 56, Rtmp);
+ __ srlx(Rtmp, 8, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ srlx(Rtmp, 16, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ srlx(Rtmp, 32, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ set ($dst$$disp + STACK_BIAS, Rtmp2);
+ __ stx (Rtmp, Rtmp2, $dst$$base$$Register);
+ %}
+ ins_pipe(ialu_reg);
+%}
+
+// Replicate scalar constant to packed byte values in Double register
+instruct Repl8B_immI(regD dst, immI13 con, o7RegI tmp) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateB con));
+ effect(KILL tmp);
+ format %{ "LDDF [$constanttablebase + $constantoffset],$dst\t! load from constant table: Repl8B($con)" %}
+ ins_encode %{
+ // XXX This is a quick fix for 6833573.
+ //__ ldf(FloatRegisterImpl::D, $constanttablebase, $constantoffset(replicate_immI($con$$constant, 8, 1)), $dst$$FloatRegister);
+ RegisterOrConstant con_offset = __ ensure_simm13_or_reg($constantoffset(replicate_immI($con$$constant, 8, 1)), $tmp$$Register);
+ __ ldf(FloatRegisterImpl::D, $constanttablebase, con_offset, as_DoubleFloatRegister($dst$$reg));
+ %}
+ ins_pipe(loadConFD);
+%}
+
+// Replicate scalar to packed char/short values into Double register
+instruct Repl4S_reg(regD dst, iRegI src, iRegL tmp, o7RegL tmp2) %{
+ predicate(n->as_Vector()->length() == 4 && UseVIS >= 3);
+ match(Set dst (ReplicateS src));
+ effect(DEF dst, USE src, TEMP tmp, KILL tmp2);
+ format %{ "SLLX $src,48,$tmp\n\t"
+ "SRLX $tmp,16,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\n\t"
+ "SRLX $tmp,32,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\t! replicate4S\n\t"
+ "MOVXTOD $tmp,$dst\t! MoveL2D" %}
+ ins_encode %{
+ Register Rsrc = $src$$Register;
+ Register Rtmp = $tmp$$Register;
+ Register Rtmp2 = $tmp2$$Register;
+ __ sllx(Rsrc, 48, Rtmp);
+ __ srlx(Rtmp, 16, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ srlx(Rtmp, 32, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ movxtod(Rtmp, as_DoubleFloatRegister($dst$$reg));
+ %}
+ ins_pipe(ialu_reg);
+%}
+
+// Replicate scalar to packed char/short values into Double stack
+instruct Repl4S_stk(stackSlotD dst, iRegI src, iRegL tmp, o7RegL tmp2) %{
+ predicate(n->as_Vector()->length() == 4 && UseVIS < 3);
+ match(Set dst (ReplicateS src));
+ effect(DEF dst, USE src, TEMP tmp, KILL tmp2);
+ format %{ "SLLX $src,48,$tmp\n\t"
+ "SRLX $tmp,16,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\n\t"
+ "SRLX $tmp,32,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\t! replicate4S\n\t"
+ "STX $tmp,$dst\t! regL to stkD" %}
+ ins_encode %{
+ Register Rsrc = $src$$Register;
+ Register Rtmp = $tmp$$Register;
+ Register Rtmp2 = $tmp2$$Register;
+ __ sllx(Rsrc, 48, Rtmp);
+ __ srlx(Rtmp, 16, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ srlx(Rtmp, 32, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ set ($dst$$disp + STACK_BIAS, Rtmp2);
+ __ stx (Rtmp, Rtmp2, $dst$$base$$Register);
+ %}
+ ins_pipe(ialu_reg);
+%}
+
+// Replicate scalar constant to packed char/short values in Double register
+instruct Repl4S_immI(regD dst, immI con, o7RegI tmp) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateS con));
+ effect(KILL tmp);
+ format %{ "LDDF [$constanttablebase + $constantoffset],$dst\t! load from constant table: Repl4S($con)" %}
+ ins_encode %{
+ // XXX This is a quick fix for 6833573.
+ //__ ldf(FloatRegisterImpl::D, $constanttablebase, $constantoffset(replicate_immI($con$$constant, 4, 2)), $dst$$FloatRegister);
+ RegisterOrConstant con_offset = __ ensure_simm13_or_reg($constantoffset(replicate_immI($con$$constant, 4, 2)), $tmp$$Register);
+ __ ldf(FloatRegisterImpl::D, $constanttablebase, con_offset, as_DoubleFloatRegister($dst$$reg));
+ %}
+ ins_pipe(loadConFD);
+%}
+
+// Replicate scalar to packed int values into Double register
+instruct Repl2I_reg(regD dst, iRegI src, iRegL tmp, o7RegL tmp2) %{
+ predicate(n->as_Vector()->length() == 2 && UseVIS >= 3);
+ match(Set dst (ReplicateI src));
+ effect(DEF dst, USE src, TEMP tmp, KILL tmp2);
+ format %{ "SLLX $src,32,$tmp\n\t"
+ "SRLX $tmp,32,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\t! replicate2I\n\t"
+ "MOVXTOD $tmp,$dst\t! MoveL2D" %}
+ ins_encode %{
+ Register Rsrc = $src$$Register;
+ Register Rtmp = $tmp$$Register;
+ Register Rtmp2 = $tmp2$$Register;
+ __ sllx(Rsrc, 32, Rtmp);
+ __ srlx(Rtmp, 32, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ movxtod(Rtmp, as_DoubleFloatRegister($dst$$reg));
+ %}
+ ins_pipe(ialu_reg);
+%}
+
+// Replicate scalar to packed int values into Double stack
+instruct Repl2I_stk(stackSlotD dst, iRegI src, iRegL tmp, o7RegL tmp2) %{
+ predicate(n->as_Vector()->length() == 2 && UseVIS < 3);
+ match(Set dst (ReplicateI src));
+ effect(DEF dst, USE src, TEMP tmp, KILL tmp2);
+ format %{ "SLLX $src,32,$tmp\n\t"
+ "SRLX $tmp,32,$tmp2\n\t"
+ "OR $tmp,$tmp2,$tmp\t! replicate2I\n\t"
+ "STX $tmp,$dst\t! regL to stkD" %}
+ ins_encode %{
+ Register Rsrc = $src$$Register;
+ Register Rtmp = $tmp$$Register;
+ Register Rtmp2 = $tmp2$$Register;
+ __ sllx(Rsrc, 32, Rtmp);
+ __ srlx(Rtmp, 32, Rtmp2);
+ __ or3 (Rtmp, Rtmp2, Rtmp);
+ __ set ($dst$$disp + STACK_BIAS, Rtmp2);
+ __ stx (Rtmp, Rtmp2, $dst$$base$$Register);
+ %}
+ ins_pipe(ialu_reg);
+%}
+
+// Replicate scalar zero constant to packed int values in Double register
+instruct Repl2I_immI(regD dst, immI con, o7RegI tmp) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateI con));
+ effect(KILL tmp);
+ format %{ "LDDF [$constanttablebase + $constantoffset],$dst\t! load from constant table: Repl2I($con)" %}
+ ins_encode %{
+ // XXX This is a quick fix for 6833573.
+ //__ ldf(FloatRegisterImpl::D, $constanttablebase, $constantoffset(replicate_immI($con$$constant, 2, 4)), $dst$$FloatRegister);
+ RegisterOrConstant con_offset = __ ensure_simm13_or_reg($constantoffset(replicate_immI($con$$constant, 2, 4)), $tmp$$Register);
+ __ ldf(FloatRegisterImpl::D, $constanttablebase, con_offset, as_DoubleFloatRegister($dst$$reg));
+ %}
+ ins_pipe(loadConFD);
+%}
+
+// Replicate scalar to packed float values into Double stack
+instruct Repl2F_stk(stackSlotD dst, regF src) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateF src));
+ ins_cost(MEMORY_REF_COST*2);
+ format %{ "STF $src,$dst.hi\t! packed2F\n\t"
+ "STF $src,$dst.lo" %}
+ opcode(Assembler::stf_op3);
+ ins_encode(simple_form3_mem_reg(dst, src), form3_mem_plus_4_reg(dst, src));
+ ins_pipe(fstoreF_stk_reg);
+%}
+
+// Replicate scalar zero constant to packed float values in Double register
+instruct Repl2F_immF(regD dst, immF con, o7RegI tmp) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateF con));
+ effect(KILL tmp);
+ format %{ "LDDF [$constanttablebase + $constantoffset],$dst\t! load from constant table: Repl2F($con)" %}
+ ins_encode %{
+ // XXX This is a quick fix for 6833573.
+ //__ ldf(FloatRegisterImpl::D, $constanttablebase, $constantoffset(replicate_immF($con$$constant)), $dst$$FloatRegister);
+ RegisterOrConstant con_offset = __ ensure_simm13_or_reg($constantoffset(replicate_immF($con$$constant)), $tmp$$Register);
+ __ ldf(FloatRegisterImpl::D, $constanttablebase, con_offset, as_DoubleFloatRegister($dst$$reg));
+ %}
+ ins_pipe(loadConFD);
+%}
+
//----------PEEPHOLE RULES-----------------------------------------------------
// These must follow all instruction definitions as they use the names
// defined in the instructions definitions.
diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
index 1d4966217a0..ce1b0286067 100644
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -217,6 +217,8 @@ void VM_Version::initialize() {
// Currently not supported anywhere.
FLAG_SET_DEFAULT(UseFPUForSpilling, false);
+ MaxVectorSize = 8;
+
assert((InteriorEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
#endif
diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.cpp b/hotspot/src/cpu/x86/vm/assembler_x86.cpp
index 8409fd73e18..9e58e2d06fc 100644
--- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp
@@ -1637,6 +1637,13 @@ void Assembler::movaps(XMMRegister dst, XMMRegister src) {
emit_byte(0xC0 | encode);
}
+void Assembler::movlhps(XMMRegister dst, XMMRegister src) {
+ NOT_LP64(assert(VM_Version::supports_sse(), ""));
+ int encode = simd_prefix_and_encode(dst, src, src, VEX_SIMD_NONE);
+ emit_byte(0x16);
+ emit_byte(0xC0 | encode);
+}
+
void Assembler::movb(Register dst, Address src) {
NOT_LP64(assert(dst->has_byte_register(), "must have byte register"));
InstructionMark im(this);
@@ -1686,6 +1693,14 @@ void Assembler::movdl(XMMRegister dst, Address src) {
emit_operand(dst, src);
}
+void Assembler::movdl(Address dst, XMMRegister src) {
+ NOT_LP64(assert(VM_Version::supports_sse2(), ""));
+ InstructionMark im(this);
+ simd_prefix(dst, src, VEX_SIMD_66);
+ emit_byte(0x7E);
+ emit_operand(src, dst);
+}
+
void Assembler::movdqa(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse2(), ""));
int encode = simd_prefix_and_encode(dst, src, VEX_SIMD_66);
@@ -1716,6 +1731,35 @@ void Assembler::movdqu(Address dst, XMMRegister src) {
emit_operand(src, dst);
}
+// Move Unaligned 256bit Vector
+void Assembler::vmovdqu(XMMRegister dst, XMMRegister src) {
+ assert(UseAVX, "");
+ bool vector256 = true;
+ int encode = vex_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_F3, vector256);
+ emit_byte(0x6F);
+ emit_byte(0xC0 | encode);
+}
+
+void Assembler::vmovdqu(XMMRegister dst, Address src) {
+ assert(UseAVX, "");
+ InstructionMark im(this);
+ bool vector256 = true;
+ vex_prefix(dst, xnoreg, src, VEX_SIMD_F3, vector256);
+ emit_byte(0x6F);
+ emit_operand(dst, src);
+}
+
+void Assembler::vmovdqu(Address dst, XMMRegister src) {
+ assert(UseAVX, "");
+ InstructionMark im(this);
+ bool vector256 = true;
+ // swap src<->dst for encoding
+ assert(src != xnoreg, "sanity");
+ vex_prefix(src, xnoreg, dst, VEX_SIMD_F3, vector256);
+ emit_byte(0x7F);
+ emit_operand(src, dst);
+}
+
// Uses zero extension on 64bit
void Assembler::movl(Register dst, int32_t imm32) {
@@ -2529,6 +2573,13 @@ void Assembler::punpckldq(XMMRegister dst, XMMRegister src) {
emit_byte(0xC0 | encode);
}
+void Assembler::punpcklqdq(XMMRegister dst, XMMRegister src) {
+ NOT_LP64(assert(VM_Version::supports_sse2(), ""));
+ int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66);
+ emit_byte(0x6C);
+ emit_byte(0xC0 | encode);
+}
+
void Assembler::push(int32_t imm32) {
// in 64bits we push 64bits onto the stack but only
// take a 32bit immediate
@@ -3112,6 +3163,13 @@ void Assembler::vxorpd(XMMRegister dst, XMMRegister nds, Address src) {
emit_operand(dst, src);
}
+void Assembler::vxorpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256) {
+ assert(VM_Version::supports_avx(), "");
+ int encode = vex_prefix_and_encode(dst, nds, src, VEX_SIMD_66, vector256);
+ emit_byte(0x57);
+ emit_byte(0xC0 | encode);
+}
+
void Assembler::vxorps(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), "");
InstructionMark im(this);
@@ -3120,6 +3178,48 @@ void Assembler::vxorps(XMMRegister dst, XMMRegister nds, Address src) {
emit_operand(dst, src);
}
+void Assembler::vxorps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256) {
+ assert(VM_Version::supports_avx(), "");
+ int encode = vex_prefix_and_encode(dst, nds, src, VEX_SIMD_NONE, vector256);
+ emit_byte(0x57);
+ emit_byte(0xC0 | encode);
+}
+
+void Assembler::vpxor(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256) {
+ assert(VM_Version::supports_avx2() || (!vector256) && VM_Version::supports_avx(), "");
+ int encode = vex_prefix_and_encode(dst, nds, src, VEX_SIMD_66, vector256);
+ emit_byte(0xEF);
+ emit_byte(0xC0 | encode);
+}
+
+void Assembler::vinsertf128h(XMMRegister dst, XMMRegister nds, XMMRegister src) {
+ assert(VM_Version::supports_avx(), "");
+ bool vector256 = true;
+ int encode = vex_prefix_and_encode(dst, nds, src, VEX_SIMD_66, vector256, VEX_OPCODE_0F_3A);
+ emit_byte(0x18);
+ emit_byte(0xC0 | encode);
+ // 0x00 - insert into lower 128 bits
+ // 0x01 - insert into upper 128 bits
+ emit_byte(0x01);
+}
+
+void Assembler::vinserti128h(XMMRegister dst, XMMRegister nds, XMMRegister src) {
+ assert(VM_Version::supports_avx2(), "");
+ bool vector256 = true;
+ int encode = vex_prefix_and_encode(dst, nds, src, VEX_SIMD_66, vector256, VEX_OPCODE_0F_3A);
+ emit_byte(0x38);
+ emit_byte(0xC0 | encode);
+ // 0x00 - insert into lower 128 bits
+ // 0x01 - insert into upper 128 bits
+ emit_byte(0x01);
+}
+
+void Assembler::vzeroupper() {
+ assert(VM_Version::supports_avx(), "");
+ (void)vex_prefix_and_encode(xmm0, xmm0, xmm0, VEX_SIMD_NONE);
+ emit_byte(0x77);
+}
+
#ifndef _LP64
// 32bit only pieces of the assembler
@@ -7405,6 +7505,24 @@ void MacroAssembler::movbyte(ArrayAddress dst, int src) {
movb(as_Address(dst), src);
}
+void MacroAssembler::movdl(XMMRegister dst, AddressLiteral src) {
+ if (reachable(src)) {
+ movdl(dst, as_Address(src));
+ } else {
+ lea(rscratch1, src);
+ movdl(dst, Address(rscratch1, 0));
+ }
+}
+
+void MacroAssembler::movq(XMMRegister dst, AddressLiteral src) {
+ if (reachable(src)) {
+ movq(dst, as_Address(src));
+ } else {
+ lea(rscratch1, src);
+ movq(dst, Address(rscratch1, 0));
+ }
+}
+
void MacroAssembler::movdbl(XMMRegister dst, AddressLiteral src) {
if (reachable(src)) {
if (UseXmmLoadAndClearUpper) {
diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.hpp b/hotspot/src/cpu/x86/vm/assembler_x86.hpp
index 2e2fca03354..4ba26e5f1af 100644
--- a/hotspot/src/cpu/x86/vm/assembler_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -591,8 +591,9 @@ private:
void vex_prefix(XMMRegister dst, XMMRegister nds, Address src,
VexSimdPrefix pre, bool vector256 = false) {
- vex_prefix(src, nds->encoding(), dst->encoding(),
- pre, VEX_OPCODE_0F, false, vector256);
+ int dst_enc = dst->encoding();
+ int nds_enc = nds->is_valid() ? nds->encoding() : 0;
+ vex_prefix(src, nds_enc, dst_enc, pre, VEX_OPCODE_0F, false, vector256);
}
int vex_prefix_and_encode(int dst_enc, int nds_enc, int src_enc,
@@ -600,9 +601,12 @@ private:
bool vex_w, bool vector256);
int vex_prefix_and_encode(XMMRegister dst, XMMRegister nds, XMMRegister src,
- VexSimdPrefix pre, bool vector256 = false) {
- return vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(),
- pre, VEX_OPCODE_0F, false, vector256);
+ VexSimdPrefix pre, bool vector256 = false,
+ VexOpcode opc = VEX_OPCODE_0F) {
+ int src_enc = src->encoding();
+ int dst_enc = dst->encoding();
+ int nds_enc = nds->is_valid() ? nds->encoding() : 0;
+ return vex_prefix_and_encode(dst_enc, nds_enc, src_enc, pre, opc, false, vector256);
}
void simd_prefix(XMMRegister xreg, XMMRegister nds, Address adr,
@@ -1261,6 +1265,7 @@ private:
void movdl(XMMRegister dst, Register src);
void movdl(Register dst, XMMRegister src);
void movdl(XMMRegister dst, Address src);
+ void movdl(Address dst, XMMRegister src);
// Move Double Quadword
void movdq(XMMRegister dst, Register src);
@@ -1274,6 +1279,14 @@ private:
void movdqu(XMMRegister dst, Address src);
void movdqu(XMMRegister dst, XMMRegister src);
+ // Move Unaligned 256bit Vector
+ void vmovdqu(Address dst, XMMRegister src);
+ void vmovdqu(XMMRegister dst, Address src);
+ void vmovdqu(XMMRegister dst, XMMRegister src);
+
+ // Move lower 64bit to high 64bit in 128bit register
+ void movlhps(XMMRegister dst, XMMRegister src);
+
void movl(Register dst, int32_t imm32);
void movl(Address dst, int32_t imm32);
void movl(Register dst, Register src);
@@ -1453,6 +1466,9 @@ private:
void punpckldq(XMMRegister dst, XMMRegister src);
void punpckldq(XMMRegister dst, Address src);
+ // Interleave Low Quadwords
+ void punpcklqdq(XMMRegister dst, XMMRegister src);
+
#ifndef _LP64 // no 32bit push/pop on amd64
void pushl(Address src);
#endif
@@ -1593,13 +1609,11 @@ private:
void set_byte_if_not_zero(Register dst); // sets reg to 1 if not zero, otherwise 0
- // AVX 3-operands instructions (encoded with VEX prefix)
+ // AVX 3-operands scalar instructions (encoded with VEX prefix)
void vaddsd(XMMRegister dst, XMMRegister nds, Address src);
void vaddsd(XMMRegister dst, XMMRegister nds, XMMRegister src);
void vaddss(XMMRegister dst, XMMRegister nds, Address src);
void vaddss(XMMRegister dst, XMMRegister nds, XMMRegister src);
- void vandpd(XMMRegister dst, XMMRegister nds, Address src);
- void vandps(XMMRegister dst, XMMRegister nds, Address src);
void vdivsd(XMMRegister dst, XMMRegister nds, Address src);
void vdivsd(XMMRegister dst, XMMRegister nds, XMMRegister src);
void vdivss(XMMRegister dst, XMMRegister nds, Address src);
@@ -1612,9 +1626,24 @@ private:
void vsubsd(XMMRegister dst, XMMRegister nds, XMMRegister src);
void vsubss(XMMRegister dst, XMMRegister nds, Address src);
void vsubss(XMMRegister dst, XMMRegister nds, XMMRegister src);
+
+ // AVX Vector instrucitons.
+ void vandpd(XMMRegister dst, XMMRegister nds, Address src);
+ void vandps(XMMRegister dst, XMMRegister nds, Address src);
void vxorpd(XMMRegister dst, XMMRegister nds, Address src);
void vxorps(XMMRegister dst, XMMRegister nds, Address src);
+ void vxorpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256);
+ void vxorps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256);
+ void vpxor(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256);
+ void vinsertf128h(XMMRegister dst, XMMRegister nds, XMMRegister src);
+ void vinserti128h(XMMRegister dst, XMMRegister nds, XMMRegister src);
+ // AVX instruction which is used to clear upper 128 bits of YMM registers and
+ // to avoid transaction penalty between AVX and SSE states. There is no
+ // penalty if legacy SSE instructions are encoded using VEX prefix because
+ // they always clear upper 128 bits. It should be used before calling
+ // runtime code and native libraries.
+ void vzeroupper();
protected:
// Next instructions require address alignment 16 bytes SSE mode.
@@ -2529,12 +2558,30 @@ public:
void vsubss(XMMRegister dst, XMMRegister nds, Address src) { Assembler::vsubss(dst, nds, src); }
void vsubss(XMMRegister dst, XMMRegister nds, AddressLiteral src);
+ // AVX Vector instructions
+
+ void vxorpd(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256) { Assembler::vxorpd(dst, nds, src, vector256); }
void vxorpd(XMMRegister dst, XMMRegister nds, Address src) { Assembler::vxorpd(dst, nds, src); }
void vxorpd(XMMRegister dst, XMMRegister nds, AddressLiteral src);
+ void vxorps(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256) { Assembler::vxorps(dst, nds, src, vector256); }
void vxorps(XMMRegister dst, XMMRegister nds, Address src) { Assembler::vxorps(dst, nds, src); }
void vxorps(XMMRegister dst, XMMRegister nds, AddressLiteral src);
+ void vpxor(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256) {
+ if (UseAVX > 1 || !vector256) // vpxor 256 bit is available only in AVX2
+ Assembler::vpxor(dst, nds, src, vector256);
+ else
+ Assembler::vxorpd(dst, nds, src, vector256);
+ }
+
+ // Move packed integer values from low 128 bit to hign 128 bit in 256 bit vector.
+ void vinserti128h(XMMRegister dst, XMMRegister nds, XMMRegister src) {
+ if (UseAVX > 1) // vinserti128h is available only in AVX2
+ Assembler::vinserti128h(dst, nds, src);
+ else
+ Assembler::vinsertf128h(dst, nds, src);
+ }
// Data
@@ -2587,6 +2634,13 @@ public:
// to avoid hiding movb
void movbyte(ArrayAddress dst, int src);
+ // Import other mov() methods from the parent class or else
+ // they will be hidden by the following overriding declaration.
+ using Assembler::movdl;
+ using Assembler::movq;
+ void movdl(XMMRegister dst, AddressLiteral src);
+ void movq(XMMRegister dst, AddressLiteral src);
+
// Can push value or effective address
void pushptr(AddressLiteral src);
diff --git a/hotspot/src/cpu/x86/vm/register_x86.cpp b/hotspot/src/cpu/x86/vm/register_x86.cpp
index a6301eafe4d..a3763a3498f 100644
--- a/hotspot/src/cpu/x86/vm/register_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/register_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -35,7 +35,7 @@ const int ConcreteRegisterImpl::max_gpr = RegisterImpl::number_of_registers << 1
const int ConcreteRegisterImpl::max_fpr = ConcreteRegisterImpl::max_gpr +
2 * FloatRegisterImpl::number_of_registers;
const int ConcreteRegisterImpl::max_xmm = ConcreteRegisterImpl::max_fpr +
- 2 * XMMRegisterImpl::number_of_registers;
+ 8 * XMMRegisterImpl::number_of_registers;
const char* RegisterImpl::name() const {
const char* names[number_of_registers] = {
#ifndef AMD64
diff --git a/hotspot/src/cpu/x86/vm/register_x86.hpp b/hotspot/src/cpu/x86/vm/register_x86.hpp
index 2f4cd0dcac6..680dd900a48 100644
--- a/hotspot/src/cpu/x86/vm/register_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/register_x86.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -158,7 +158,7 @@ class XMMRegisterImpl: public AbstractRegisterImpl {
XMMRegister successor() const { return as_XMMRegister(encoding() + 1); }
// accessors
- int encoding() const { assert(is_valid(), "invalid register"); return (intptr_t)this; }
+ int encoding() const { assert(is_valid(), err_msg("invalid register (%d)", (int)(intptr_t)this )); return (intptr_t)this; }
bool is_valid() const { return 0 <= (intptr_t)this && (intptr_t)this < number_of_registers; }
const char* name() const;
};
@@ -216,7 +216,7 @@ class ConcreteRegisterImpl : public AbstractRegisterImpl {
RegisterImpl::number_of_registers + // "H" half of a 64bit register
#endif // AMD64
2 * FloatRegisterImpl::number_of_registers +
- 2 * XMMRegisterImpl::number_of_registers +
+ 8 * XMMRegisterImpl::number_of_registers +
1 // eflags
};
diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
index 121be7a2ba7..12f3f258415 100644
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
@@ -467,6 +467,32 @@ void VM_Version::get_processor_features() {
if (!supports_avx ()) // Drop to 0 if no AVX support
UseAVX = 0;
+#ifdef COMPILER2
+ if (UseFPUForSpilling) {
+ if (UseSSE < 2) {
+ // Only supported with SSE2+
+ FLAG_SET_DEFAULT(UseFPUForSpilling, false);
+ }
+ }
+ if (MaxVectorSize > 0) {
+ if (!is_power_of_2(MaxVectorSize)) {
+ warning("MaxVectorSize must be a power of 2");
+ FLAG_SET_DEFAULT(MaxVectorSize, 32);
+ }
+ if (MaxVectorSize > 32) {
+ FLAG_SET_DEFAULT(MaxVectorSize, 32);
+ }
+ if (MaxVectorSize > 16 && UseAVX == 0) {
+ // Only supported with AVX+
+ FLAG_SET_DEFAULT(MaxVectorSize, 16);
+ }
+ if (UseSSE < 2) {
+ // Only supported with SSE2+
+ FLAG_SET_DEFAULT(MaxVectorSize, 0);
+ }
+ }
+#endif
+
// On new cpus instructions which update whole XMM register should be used
// to prevent partial register stall due to dependencies on high half.
//
@@ -536,7 +562,7 @@ void VM_Version::get_processor_features() {
AllocatePrefetchInstr = 3;
}
// On family 15h processors use XMM and UnalignedLoadStores for Array Copy
- if( FLAG_IS_DEFAULT(UseXMMForArrayCopy) ) {
+ if( supports_sse2() && FLAG_IS_DEFAULT(UseXMMForArrayCopy) ) {
UseXMMForArrayCopy = true;
}
if( FLAG_IS_DEFAULT(UseUnalignedLoadStores) && UseXMMForArrayCopy ) {
@@ -544,6 +570,12 @@ void VM_Version::get_processor_features() {
}
}
+#ifdef COMPILER2
+ if (MaxVectorSize > 16) {
+ // Limit vectors size to 16 bytes on current AMD cpus.
+ FLAG_SET_DEFAULT(MaxVectorSize, 16);
+ }
+#endif // COMPILER2
}
if( is_intel() ) { // Intel cpus specific settings
@@ -606,15 +638,6 @@ void VM_Version::get_processor_features() {
FLAG_SET_DEFAULT(UsePopCountInstruction, false);
}
-#ifdef COMPILER2
- if (UseFPUForSpilling) {
- if (UseSSE < 2) {
- // Only supported with SSE2+
- FLAG_SET_DEFAULT(UseFPUForSpilling, false);
- }
- }
-#endif
-
assert(0 <= ReadPrefetchInstr && ReadPrefetchInstr <= 3, "invalid value");
assert(0 <= AllocatePrefetchInstr && AllocatePrefetchInstr <= 3, "invalid value");
diff --git a/hotspot/src/cpu/x86/vm/vmreg_x86.cpp b/hotspot/src/cpu/x86/vm/vmreg_x86.cpp
index a0bfe6e69c1..89959771ea2 100644
--- a/hotspot/src/cpu/x86/vm/vmreg_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/vmreg_x86.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -48,8 +48,9 @@ void VMRegImpl::set_regName() {
XMMRegister xreg = ::as_XMMRegister(0);
for ( ; i < ConcreteRegisterImpl::max_xmm ; ) {
- regName[i++] = xreg->name();
- regName[i++] = xreg->name();
+ for (int j = 0 ; j < 8 ; j++) {
+ regName[i++] = xreg->name();
+ }
xreg = xreg->successor();
}
for ( ; i < ConcreteRegisterImpl::number_of_registers ; i ++ ) {
diff --git a/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp b/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp
index 88201bd3d83..0608d3edbff 100644
--- a/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp
+++ b/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -39,7 +39,7 @@ inline VMReg FloatRegisterImpl::as_VMReg() {
}
inline VMReg XMMRegisterImpl::as_VMReg() {
- return VMRegImpl::as_VMReg((encoding() << 1) + ConcreteRegisterImpl::max_fpr);
+ return VMRegImpl::as_VMReg((encoding() << 3) + ConcreteRegisterImpl::max_fpr);
}
@@ -75,7 +75,7 @@ inline FloatRegister VMRegImpl::as_FloatRegister() {
inline XMMRegister VMRegImpl::as_XMMRegister() {
assert( is_XMMRegister() && is_even(value()), "must be" );
// Yuk
- return ::as_XMMRegister((value() - ConcreteRegisterImpl::max_fpr) >> 1);
+ return ::as_XMMRegister((value() - ConcreteRegisterImpl::max_fpr) >> 3);
}
inline bool VMRegImpl::is_concrete() {
diff --git a/hotspot/src/cpu/x86/vm/x86.ad b/hotspot/src/cpu/x86/vm/x86.ad
index 6bd91287fc0..de512c37be7 100644
--- a/hotspot/src/cpu/x86/vm/x86.ad
+++ b/hotspot/src/cpu/x86/vm/x86.ad
@@ -24,6 +24,456 @@
// X86 Common Architecture Description File
+//----------REGISTER DEFINITION BLOCK------------------------------------------
+// This information is used by the matcher and the register allocator to
+// describe individual registers and classes of registers within the target
+// archtecture.
+
+register %{
+//----------Architecture Description Register Definitions----------------------
+// General Registers
+// "reg_def" name ( register save type, C convention save type,
+// ideal register type, encoding );
+// Register Save Types:
+//
+// NS = No-Save: The register allocator assumes that these registers
+// can be used without saving upon entry to the method, &
+// that they do not need to be saved at call sites.
+//
+// SOC = Save-On-Call: The register allocator assumes that these registers
+// can be used without saving upon entry to the method,
+// but that they must be saved at call sites.
+//
+// SOE = Save-On-Entry: The register allocator assumes that these registers
+// must be saved before using them upon entry to the
+// method, but they do not need to be saved at call
+// sites.
+//
+// AS = Always-Save: The register allocator assumes that these registers
+// must be saved before using them upon entry to the
+// method, & that they must be saved at call sites.
+//
+// Ideal Register Type is used to determine how to save & restore a
+// register. Op_RegI will get spilled with LoadI/StoreI, Op_RegP will get
+// spilled with LoadP/StoreP. If the register supports both, use Op_RegI.
+//
+// The encoding number is the actual bit-pattern placed into the opcodes.
+
+// XMM registers. 256-bit registers or 8 words each, labeled (a)-h.
+// Word a in each register holds a Float, words ab hold a Double.
+// The whole registers are used in SSE4.2 version intrinsics,
+// array copy stubs and superword operations (see UseSSE42Intrinsics,
+// UseXMMForArrayCopy and UseSuperword flags).
+// XMM8-XMM15 must be encoded with REX (VEX for UseAVX).
+// Linux ABI: No register preserved across function calls
+// XMM0-XMM7 might hold parameters
+// Windows ABI: XMM6-XMM15 preserved across function calls
+// XMM0-XMM3 might hold parameters
+
+reg_def XMM0 ( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg());
+reg_def XMM0b( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next(1));
+reg_def XMM0c( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next(2));
+reg_def XMM0d( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next(3));
+reg_def XMM0e( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next(4));
+reg_def XMM0f( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next(5));
+reg_def XMM0g( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next(6));
+reg_def XMM0h( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next(7));
+
+reg_def XMM1 ( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg());
+reg_def XMM1b( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next(1));
+reg_def XMM1c( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next(2));
+reg_def XMM1d( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next(3));
+reg_def XMM1e( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next(4));
+reg_def XMM1f( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next(5));
+reg_def XMM1g( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next(6));
+reg_def XMM1h( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next(7));
+
+reg_def XMM2 ( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg());
+reg_def XMM2b( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next(1));
+reg_def XMM2c( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next(2));
+reg_def XMM2d( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next(3));
+reg_def XMM2e( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next(4));
+reg_def XMM2f( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next(5));
+reg_def XMM2g( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next(6));
+reg_def XMM2h( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next(7));
+
+reg_def XMM3 ( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg());
+reg_def XMM3b( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next(1));
+reg_def XMM3c( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next(2));
+reg_def XMM3d( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next(3));
+reg_def XMM3e( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next(4));
+reg_def XMM3f( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next(5));
+reg_def XMM3g( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next(6));
+reg_def XMM3h( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next(7));
+
+reg_def XMM4 ( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg());
+reg_def XMM4b( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next(1));
+reg_def XMM4c( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next(2));
+reg_def XMM4d( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next(3));
+reg_def XMM4e( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next(4));
+reg_def XMM4f( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next(5));
+reg_def XMM4g( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next(6));
+reg_def XMM4h( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next(7));
+
+reg_def XMM5 ( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg());
+reg_def XMM5b( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next(1));
+reg_def XMM5c( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next(2));
+reg_def XMM5d( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next(3));
+reg_def XMM5e( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next(4));
+reg_def XMM5f( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next(5));
+reg_def XMM5g( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next(6));
+reg_def XMM5h( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next(7));
+
+#ifdef _WIN64
+
+reg_def XMM6 ( SOC, SOE, Op_RegF, 6, xmm6->as_VMReg());
+reg_def XMM6b( SOC, SOE, Op_RegF, 6, xmm6->as_VMReg()->next(1));
+reg_def XMM6c( SOC, SOE, Op_RegF, 6, xmm6->as_VMReg()->next(2));
+reg_def XMM6d( SOC, SOE, Op_RegF, 6, xmm6->as_VMReg()->next(3));
+reg_def XMM6e( SOC, SOE, Op_RegF, 6, xmm6->as_VMReg()->next(4));
+reg_def XMM6f( SOC, SOE, Op_RegF, 6, xmm6->as_VMReg()->next(5));
+reg_def XMM6g( SOC, SOE, Op_RegF, 6, xmm6->as_VMReg()->next(6));
+reg_def XMM6h( SOC, SOE, Op_RegF, 6, xmm6->as_VMReg()->next(7));
+
+reg_def XMM7 ( SOC, SOE, Op_RegF, 7, xmm7->as_VMReg());
+reg_def XMM7b( SOC, SOE, Op_RegF, 7, xmm7->as_VMReg()->next(1));
+reg_def XMM7c( SOC, SOE, Op_RegF, 7, xmm7->as_VMReg()->next(2));
+reg_def XMM7d( SOC, SOE, Op_RegF, 7, xmm7->as_VMReg()->next(3));
+reg_def XMM7e( SOC, SOE, Op_RegF, 7, xmm7->as_VMReg()->next(4));
+reg_def XMM7f( SOC, SOE, Op_RegF, 7, xmm7->as_VMReg()->next(5));
+reg_def XMM7g( SOC, SOE, Op_RegF, 7, xmm7->as_VMReg()->next(6));
+reg_def XMM7h( SOC, SOE, Op_RegF, 7, xmm7->as_VMReg()->next(7));
+
+reg_def XMM8 ( SOC, SOE, Op_RegF, 8, xmm8->as_VMReg());
+reg_def XMM8b( SOC, SOE, Op_RegF, 8, xmm8->as_VMReg()->next(1));
+reg_def XMM8c( SOC, SOE, Op_RegF, 8, xmm8->as_VMReg()->next(2));
+reg_def XMM8d( SOC, SOE, Op_RegF, 8, xmm8->as_VMReg()->next(3));
+reg_def XMM8e( SOC, SOE, Op_RegF, 8, xmm8->as_VMReg()->next(4));
+reg_def XMM8f( SOC, SOE, Op_RegF, 8, xmm8->as_VMReg()->next(5));
+reg_def XMM8g( SOC, SOE, Op_RegF, 8, xmm8->as_VMReg()->next(6));
+reg_def XMM8h( SOC, SOE, Op_RegF, 8, xmm8->as_VMReg()->next(7));
+
+reg_def XMM9 ( SOC, SOE, Op_RegF, 9, xmm9->as_VMReg());
+reg_def XMM9b( SOC, SOE, Op_RegF, 9, xmm9->as_VMReg()->next(1));
+reg_def XMM9c( SOC, SOE, Op_RegF, 9, xmm9->as_VMReg()->next(2));
+reg_def XMM9d( SOC, SOE, Op_RegF, 9, xmm9->as_VMReg()->next(3));
+reg_def XMM9e( SOC, SOE, Op_RegF, 9, xmm9->as_VMReg()->next(4));
+reg_def XMM9f( SOC, SOE, Op_RegF, 9, xmm9->as_VMReg()->next(5));
+reg_def XMM9g( SOC, SOE, Op_RegF, 9, xmm9->as_VMReg()->next(6));
+reg_def XMM9h( SOC, SOE, Op_RegF, 9, xmm9->as_VMReg()->next(7));
+
+reg_def XMM10 ( SOC, SOE, Op_RegF, 10, xmm10->as_VMReg());
+reg_def XMM10b( SOC, SOE, Op_RegF, 10, xmm10->as_VMReg()->next(1));
+reg_def XMM10c( SOC, SOE, Op_RegF, 10, xmm10->as_VMReg()->next(2));
+reg_def XMM10d( SOC, SOE, Op_RegF, 10, xmm10->as_VMReg()->next(3));
+reg_def XMM10e( SOC, SOE, Op_RegF, 10, xmm10->as_VMReg()->next(4));
+reg_def XMM10f( SOC, SOE, Op_RegF, 10, xmm10->as_VMReg()->next(5));
+reg_def XMM10g( SOC, SOE, Op_RegF, 10, xmm10->as_VMReg()->next(6));
+reg_def XMM10h( SOC, SOE, Op_RegF, 10, xmm10->as_VMReg()->next(7));
+
+reg_def XMM11 ( SOC, SOE, Op_RegF, 11, xmm11->as_VMReg());
+reg_def XMM11b( SOC, SOE, Op_RegF, 11, xmm11->as_VMReg()->next(1));
+reg_def XMM11c( SOC, SOE, Op_RegF, 11, xmm11->as_VMReg()->next(2));
+reg_def XMM11d( SOC, SOE, Op_RegF, 11, xmm11->as_VMReg()->next(3));
+reg_def XMM11e( SOC, SOE, Op_RegF, 11, xmm11->as_VMReg()->next(4));
+reg_def XMM11f( SOC, SOE, Op_RegF, 11, xmm11->as_VMReg()->next(5));
+reg_def XMM11g( SOC, SOE, Op_RegF, 11, xmm11->as_VMReg()->next(6));
+reg_def XMM11h( SOC, SOE, Op_RegF, 11, xmm11->as_VMReg()->next(7));
+
+reg_def XMM12 ( SOC, SOE, Op_RegF, 12, xmm12->as_VMReg());
+reg_def XMM12b( SOC, SOE, Op_RegF, 12, xmm12->as_VMReg()->next(1));
+reg_def XMM12c( SOC, SOE, Op_RegF, 12, xmm12->as_VMReg()->next(2));
+reg_def XMM12d( SOC, SOE, Op_RegF, 12, xmm12->as_VMReg()->next(3));
+reg_def XMM12e( SOC, SOE, Op_RegF, 12, xmm12->as_VMReg()->next(4));
+reg_def XMM12f( SOC, SOE, Op_RegF, 12, xmm12->as_VMReg()->next(5));
+reg_def XMM12g( SOC, SOE, Op_RegF, 12, xmm12->as_VMReg()->next(6));
+reg_def XMM12h( SOC, SOE, Op_RegF, 12, xmm12->as_VMReg()->next(7));
+
+reg_def XMM13 ( SOC, SOE, Op_RegF, 13, xmm13->as_VMReg());
+reg_def XMM13b( SOC, SOE, Op_RegF, 13, xmm13->as_VMReg()->next(1));
+reg_def XMM13c( SOC, SOE, Op_RegF, 13, xmm13->as_VMReg()->next(2));
+reg_def XMM13d( SOC, SOE, Op_RegF, 13, xmm13->as_VMReg()->next(3));
+reg_def XMM13e( SOC, SOE, Op_RegF, 13, xmm13->as_VMReg()->next(4));
+reg_def XMM13f( SOC, SOE, Op_RegF, 13, xmm13->as_VMReg()->next(5));
+reg_def XMM13g( SOC, SOE, Op_RegF, 13, xmm13->as_VMReg()->next(6));
+reg_def XMM13h( SOC, SOE, Op_RegF, 13, xmm13->as_VMReg()->next(7));
+
+reg_def XMM14 ( SOC, SOE, Op_RegF, 14, xmm14->as_VMReg());
+reg_def XMM14b( SOC, SOE, Op_RegF, 14, xmm14->as_VMReg()->next(1));
+reg_def XMM14c( SOC, SOE, Op_RegF, 14, xmm14->as_VMReg()->next(2));
+reg_def XMM14d( SOC, SOE, Op_RegF, 14, xmm14->as_VMReg()->next(3));
+reg_def XMM14e( SOC, SOE, Op_RegF, 14, xmm14->as_VMReg()->next(4));
+reg_def XMM14f( SOC, SOE, Op_RegF, 14, xmm14->as_VMReg()->next(5));
+reg_def XMM14g( SOC, SOE, Op_RegF, 14, xmm14->as_VMReg()->next(6));
+reg_def XMM14h( SOC, SOE, Op_RegF, 14, xmm14->as_VMReg()->next(7));
+
+reg_def XMM15 ( SOC, SOE, Op_RegF, 15, xmm15->as_VMReg());
+reg_def XMM15b( SOC, SOE, Op_RegF, 15, xmm15->as_VMReg()->next(1));
+reg_def XMM15c( SOC, SOE, Op_RegF, 15, xmm15->as_VMReg()->next(2));
+reg_def XMM15d( SOC, SOE, Op_RegF, 15, xmm15->as_VMReg()->next(3));
+reg_def XMM15e( SOC, SOE, Op_RegF, 15, xmm15->as_VMReg()->next(4));
+reg_def XMM15f( SOC, SOE, Op_RegF, 15, xmm15->as_VMReg()->next(5));
+reg_def XMM15g( SOC, SOE, Op_RegF, 15, xmm15->as_VMReg()->next(6));
+reg_def XMM15h( SOC, SOE, Op_RegF, 15, xmm15->as_VMReg()->next(7));
+
+#else // _WIN64
+
+reg_def XMM6 ( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg());
+reg_def XMM6b( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next(1));
+reg_def XMM6c( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next(2));
+reg_def XMM6d( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next(3));
+reg_def XMM6e( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next(4));
+reg_def XMM6f( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next(5));
+reg_def XMM6g( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next(6));
+reg_def XMM6h( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next(7));
+
+reg_def XMM7 ( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg());
+reg_def XMM7b( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next(1));
+reg_def XMM7c( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next(2));
+reg_def XMM7d( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next(3));
+reg_def XMM7e( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next(4));
+reg_def XMM7f( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next(5));
+reg_def XMM7g( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next(6));
+reg_def XMM7h( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next(7));
+
+#ifdef _LP64
+
+reg_def XMM8 ( SOC, SOC, Op_RegF, 8, xmm8->as_VMReg());
+reg_def XMM8b( SOC, SOC, Op_RegF, 8, xmm8->as_VMReg()->next(1));
+reg_def XMM8c( SOC, SOC, Op_RegF, 8, xmm8->as_VMReg()->next(2));
+reg_def XMM8d( SOC, SOC, Op_RegF, 8, xmm8->as_VMReg()->next(3));
+reg_def XMM8e( SOC, SOC, Op_RegF, 8, xmm8->as_VMReg()->next(4));
+reg_def XMM8f( SOC, SOC, Op_RegF, 8, xmm8->as_VMReg()->next(5));
+reg_def XMM8g( SOC, SOC, Op_RegF, 8, xmm8->as_VMReg()->next(6));
+reg_def XMM8h( SOC, SOC, Op_RegF, 8, xmm8->as_VMReg()->next(7));
+
+reg_def XMM9 ( SOC, SOC, Op_RegF, 9, xmm9->as_VMReg());
+reg_def XMM9b( SOC, SOC, Op_RegF, 9, xmm9->as_VMReg()->next(1));
+reg_def XMM9c( SOC, SOC, Op_RegF, 9, xmm9->as_VMReg()->next(2));
+reg_def XMM9d( SOC, SOC, Op_RegF, 9, xmm9->as_VMReg()->next(3));
+reg_def XMM9e( SOC, SOC, Op_RegF, 9, xmm9->as_VMReg()->next(4));
+reg_def XMM9f( SOC, SOC, Op_RegF, 9, xmm9->as_VMReg()->next(5));
+reg_def XMM9g( SOC, SOC, Op_RegF, 9, xmm9->as_VMReg()->next(6));
+reg_def XMM9h( SOC, SOC, Op_RegF, 9, xmm9->as_VMReg()->next(7));
+
+reg_def XMM10 ( SOC, SOC, Op_RegF, 10, xmm10->as_VMReg());
+reg_def XMM10b( SOC, SOC, Op_RegF, 10, xmm10->as_VMReg()->next(1));
+reg_def XMM10c( SOC, SOC, Op_RegF, 10, xmm10->as_VMReg()->next(2));
+reg_def XMM10d( SOC, SOC, Op_RegF, 10, xmm10->as_VMReg()->next(3));
+reg_def XMM10e( SOC, SOC, Op_RegF, 10, xmm10->as_VMReg()->next(4));
+reg_def XMM10f( SOC, SOC, Op_RegF, 10, xmm10->as_VMReg()->next(5));
+reg_def XMM10g( SOC, SOC, Op_RegF, 10, xmm10->as_VMReg()->next(6));
+reg_def XMM10h( SOC, SOC, Op_RegF, 10, xmm10->as_VMReg()->next(7));
+
+reg_def XMM11 ( SOC, SOC, Op_RegF, 11, xmm11->as_VMReg());
+reg_def XMM11b( SOC, SOC, Op_RegF, 11, xmm11->as_VMReg()->next(1));
+reg_def XMM11c( SOC, SOC, Op_RegF, 11, xmm11->as_VMReg()->next(2));
+reg_def XMM11d( SOC, SOC, Op_RegF, 11, xmm11->as_VMReg()->next(3));
+reg_def XMM11e( SOC, SOC, Op_RegF, 11, xmm11->as_VMReg()->next(4));
+reg_def XMM11f( SOC, SOC, Op_RegF, 11, xmm11->as_VMReg()->next(5));
+reg_def XMM11g( SOC, SOC, Op_RegF, 11, xmm11->as_VMReg()->next(6));
+reg_def XMM11h( SOC, SOC, Op_RegF, 11, xmm11->as_VMReg()->next(7));
+
+reg_def XMM12 ( SOC, SOC, Op_RegF, 12, xmm12->as_VMReg());
+reg_def XMM12b( SOC, SOC, Op_RegF, 12, xmm12->as_VMReg()->next(1));
+reg_def XMM12c( SOC, SOC, Op_RegF, 12, xmm12->as_VMReg()->next(2));
+reg_def XMM12d( SOC, SOC, Op_RegF, 12, xmm12->as_VMReg()->next(3));
+reg_def XMM12e( SOC, SOC, Op_RegF, 12, xmm12->as_VMReg()->next(4));
+reg_def XMM12f( SOC, SOC, Op_RegF, 12, xmm12->as_VMReg()->next(5));
+reg_def XMM12g( SOC, SOC, Op_RegF, 12, xmm12->as_VMReg()->next(6));
+reg_def XMM12h( SOC, SOC, Op_RegF, 12, xmm12->as_VMReg()->next(7));
+
+reg_def XMM13 ( SOC, SOC, Op_RegF, 13, xmm13->as_VMReg());
+reg_def XMM13b( SOC, SOC, Op_RegF, 13, xmm13->as_VMReg()->next(1));
+reg_def XMM13c( SOC, SOC, Op_RegF, 13, xmm13->as_VMReg()->next(2));
+reg_def XMM13d( SOC, SOC, Op_RegF, 13, xmm13->as_VMReg()->next(3));
+reg_def XMM13e( SOC, SOC, Op_RegF, 13, xmm13->as_VMReg()->next(4));
+reg_def XMM13f( SOC, SOC, Op_RegF, 13, xmm13->as_VMReg()->next(5));
+reg_def XMM13g( SOC, SOC, Op_RegF, 13, xmm13->as_VMReg()->next(6));
+reg_def XMM13h( SOC, SOC, Op_RegF, 13, xmm13->as_VMReg()->next(7));
+
+reg_def XMM14 ( SOC, SOC, Op_RegF, 14, xmm14->as_VMReg());
+reg_def XMM14b( SOC, SOC, Op_RegF, 14, xmm14->as_VMReg()->next(1));
+reg_def XMM14c( SOC, SOC, Op_RegF, 14, xmm14->as_VMReg()->next(2));
+reg_def XMM14d( SOC, SOC, Op_RegF, 14, xmm14->as_VMReg()->next(3));
+reg_def XMM14e( SOC, SOC, Op_RegF, 14, xmm14->as_VMReg()->next(4));
+reg_def XMM14f( SOC, SOC, Op_RegF, 14, xmm14->as_VMReg()->next(5));
+reg_def XMM14g( SOC, SOC, Op_RegF, 14, xmm14->as_VMReg()->next(6));
+reg_def XMM14h( SOC, SOC, Op_RegF, 14, xmm14->as_VMReg()->next(7));
+
+reg_def XMM15 ( SOC, SOC, Op_RegF, 15, xmm15->as_VMReg());
+reg_def XMM15b( SOC, SOC, Op_RegF, 15, xmm15->as_VMReg()->next(1));
+reg_def XMM15c( SOC, SOC, Op_RegF, 15, xmm15->as_VMReg()->next(2));
+reg_def XMM15d( SOC, SOC, Op_RegF, 15, xmm15->as_VMReg()->next(3));
+reg_def XMM15e( SOC, SOC, Op_RegF, 15, xmm15->as_VMReg()->next(4));
+reg_def XMM15f( SOC, SOC, Op_RegF, 15, xmm15->as_VMReg()->next(5));
+reg_def XMM15g( SOC, SOC, Op_RegF, 15, xmm15->as_VMReg()->next(6));
+reg_def XMM15h( SOC, SOC, Op_RegF, 15, xmm15->as_VMReg()->next(7));
+
+#endif // _LP64
+
+#endif // _WIN64
+
+#ifdef _LP64
+reg_def RFLAGS(SOC, SOC, 0, 16, VMRegImpl::Bad());
+#else
+reg_def RFLAGS(SOC, SOC, 0, 8, VMRegImpl::Bad());
+#endif // _LP64
+
+alloc_class chunk1(XMM0, XMM0b, XMM0c, XMM0d, XMM0e, XMM0f, XMM0g, XMM0h,
+ XMM1, XMM1b, XMM1c, XMM1d, XMM1e, XMM1f, XMM1g, XMM1h,
+ XMM2, XMM2b, XMM2c, XMM2d, XMM2e, XMM2f, XMM2g, XMM2h,
+ XMM3, XMM3b, XMM3c, XMM3d, XMM3e, XMM3f, XMM3g, XMM3h,
+ XMM4, XMM4b, XMM4c, XMM4d, XMM4e, XMM4f, XMM4g, XMM4h,
+ XMM5, XMM5b, XMM5c, XMM5d, XMM5e, XMM5f, XMM5g, XMM5h,
+ XMM6, XMM6b, XMM6c, XMM6d, XMM6e, XMM6f, XMM6g, XMM6h,
+ XMM7, XMM7b, XMM7c, XMM7d, XMM7e, XMM7f, XMM7g, XMM7h
+#ifdef _LP64
+ ,XMM8, XMM8b, XMM8c, XMM8d, XMM8e, XMM8f, XMM8g, XMM8h,
+ XMM9, XMM9b, XMM9c, XMM9d, XMM9e, XMM9f, XMM9g, XMM9h,
+ XMM10, XMM10b, XMM10c, XMM10d, XMM10e, XMM10f, XMM10g, XMM10h,
+ XMM11, XMM11b, XMM11c, XMM11d, XMM11e, XMM11f, XMM11g, XMM11h,
+ XMM12, XMM12b, XMM12c, XMM12d, XMM12e, XMM12f, XMM12g, XMM12h,
+ XMM13, XMM13b, XMM13c, XMM13d, XMM13e, XMM13f, XMM13g, XMM13h,
+ XMM14, XMM14b, XMM14c, XMM14d, XMM14e, XMM14f, XMM14g, XMM14h,
+ XMM15, XMM15b, XMM15c, XMM15d, XMM15e, XMM15f, XMM15g, XMM15h
+#endif
+ );
+
+// flags allocation class should be last.
+alloc_class chunk2(RFLAGS);
+
+// Singleton class for condition codes
+reg_class int_flags(RFLAGS);
+
+// Class for all float registers
+reg_class float_reg(XMM0,
+ XMM1,
+ XMM2,
+ XMM3,
+ XMM4,
+ XMM5,
+ XMM6,
+ XMM7
+#ifdef _LP64
+ ,XMM8,
+ XMM9,
+ XMM10,
+ XMM11,
+ XMM12,
+ XMM13,
+ XMM14,
+ XMM15
+#endif
+ );
+
+// Class for all double registers
+reg_class double_reg(XMM0, XMM0b,
+ XMM1, XMM1b,
+ XMM2, XMM2b,
+ XMM3, XMM3b,
+ XMM4, XMM4b,
+ XMM5, XMM5b,
+ XMM6, XMM6b,
+ XMM7, XMM7b
+#ifdef _LP64
+ ,XMM8, XMM8b,
+ XMM9, XMM9b,
+ XMM10, XMM10b,
+ XMM11, XMM11b,
+ XMM12, XMM12b,
+ XMM13, XMM13b,
+ XMM14, XMM14b,
+ XMM15, XMM15b
+#endif
+ );
+
+// Class for all 32bit vector registers
+reg_class vectors_reg(XMM0,
+ XMM1,
+ XMM2,
+ XMM3,
+ XMM4,
+ XMM5,
+ XMM6,
+ XMM7
+#ifdef _LP64
+ ,XMM8,
+ XMM9,
+ XMM10,
+ XMM11,
+ XMM12,
+ XMM13,
+ XMM14,
+ XMM15
+#endif
+ );
+
+// Class for all 64bit vector registers
+reg_class vectord_reg(XMM0, XMM0b,
+ XMM1, XMM1b,
+ XMM2, XMM2b,
+ XMM3, XMM3b,
+ XMM4, XMM4b,
+ XMM5, XMM5b,
+ XMM6, XMM6b,
+ XMM7, XMM7b
+#ifdef _LP64
+ ,XMM8, XMM8b,
+ XMM9, XMM9b,
+ XMM10, XMM10b,
+ XMM11, XMM11b,
+ XMM12, XMM12b,
+ XMM13, XMM13b,
+ XMM14, XMM14b,
+ XMM15, XMM15b
+#endif
+ );
+
+// Class for all 128bit vector registers
+reg_class vectorx_reg(XMM0, XMM0b, XMM0c, XMM0d,
+ XMM1, XMM1b, XMM1c, XMM1d,
+ XMM2, XMM2b, XMM2c, XMM2d,
+ XMM3, XMM3b, XMM3c, XMM3d,
+ XMM4, XMM4b, XMM4c, XMM4d,
+ XMM5, XMM5b, XMM5c, XMM5d,
+ XMM6, XMM6b, XMM6c, XMM6d,
+ XMM7, XMM7b, XMM7c, XMM7d
+#ifdef _LP64
+ ,XMM8, XMM8b, XMM8c, XMM8d,
+ XMM9, XMM9b, XMM9c, XMM9d,
+ XMM10, XMM10b, XMM10c, XMM10d,
+ XMM11, XMM11b, XMM11c, XMM11d,
+ XMM12, XMM12b, XMM12c, XMM12d,
+ XMM13, XMM13b, XMM13c, XMM13d,
+ XMM14, XMM14b, XMM14c, XMM14d,
+ XMM15, XMM15b, XMM15c, XMM15d
+#endif
+ );
+
+// Class for all 256bit vector registers
+reg_class vectory_reg(XMM0, XMM0b, XMM0c, XMM0d, XMM0e, XMM0f, XMM0g, XMM0h,
+ XMM1, XMM1b, XMM1c, XMM1d, XMM1e, XMM1f, XMM1g, XMM1h,
+ XMM2, XMM2b, XMM2c, XMM2d, XMM2e, XMM2f, XMM2g, XMM2h,
+ XMM3, XMM3b, XMM3c, XMM3d, XMM3e, XMM3f, XMM3g, XMM3h,
+ XMM4, XMM4b, XMM4c, XMM4d, XMM4e, XMM4f, XMM4g, XMM4h,
+ XMM5, XMM5b, XMM5c, XMM5d, XMM5e, XMM5f, XMM5g, XMM5h,
+ XMM6, XMM6b, XMM6c, XMM6d, XMM6e, XMM6f, XMM6g, XMM6h,
+ XMM7, XMM7b, XMM7c, XMM7d, XMM7e, XMM7f, XMM7g, XMM7h
+#ifdef _LP64
+ ,XMM8, XMM8b, XMM8c, XMM8d, XMM8e, XMM8f, XMM8g, XMM8h,
+ XMM9, XMM9b, XMM9c, XMM9d, XMM9e, XMM9f, XMM9g, XMM9h,
+ XMM10, XMM10b, XMM10c, XMM10d, XMM10e, XMM10f, XMM10g, XMM10h,
+ XMM11, XMM11b, XMM11c, XMM11d, XMM11e, XMM11f, XMM11g, XMM11h,
+ XMM12, XMM12b, XMM12c, XMM12d, XMM12e, XMM12f, XMM12g, XMM12h,
+ XMM13, XMM13b, XMM13c, XMM13d, XMM13e, XMM13f, XMM13g, XMM13h,
+ XMM14, XMM14b, XMM14c, XMM14d, XMM14e, XMM14f, XMM14g, XMM14h,
+ XMM15, XMM15b, XMM15c, XMM15d, XMM15e, XMM15f, XMM15g, XMM15h
+#endif
+ );
+
+%}
+
source %{
// Float masks come from different places depending on platform.
#ifdef _LP64
@@ -38,6 +488,252 @@ source %{
static address double_signflip() { return (address)double_signflip_pool; }
#endif
+// Map Types to machine register types
+const int Matcher::base2reg[Type::lastype] = {
+ Node::NotAMachineReg,0,0, Op_RegI, Op_RegL, 0, Op_RegN,
+ Node::NotAMachineReg, Node::NotAMachineReg, /* tuple, array */
+ Op_VecS, Op_VecD, Op_VecX, Op_VecY, /* Vectors */
+ Op_RegP, Op_RegP, Op_RegP, Op_RegP, Op_RegP, Op_RegP, /* the pointers */
+ 0, 0/*abio*/,
+ Op_RegP /* Return address */, 0, /* the memories */
+ Op_RegF, Op_RegF, Op_RegF, Op_RegD, Op_RegD, Op_RegD,
+ 0 /*bottom*/
+};
+
+// Max vector size in bytes. 0 if not supported.
+const int Matcher::vector_width_in_bytes(BasicType bt) {
+ assert(is_java_primitive(bt), "only primitive type vectors");
+ if (UseSSE < 2) return 0;
+ // SSE2 supports 128bit vectors for all types.
+ // AVX2 supports 256bit vectors for all types.
+ int size = (UseAVX > 1) ? 32 : 16;
+ // AVX1 supports 256bit vectors only for FLOAT and DOUBLE.
+ if (UseAVX > 0 && (bt == T_FLOAT || bt == T_DOUBLE))
+ size = 32;
+ // Use flag to limit vector size.
+ size = MIN2(size,(int)MaxVectorSize);
+ // Minimum 2 values in vector (or 4 for bytes).
+ switch (bt) {
+ case T_DOUBLE:
+ case T_LONG:
+ if (size < 16) return 0;
+ case T_FLOAT:
+ case T_INT:
+ if (size < 8) return 0;
+ case T_BOOLEAN:
+ case T_BYTE:
+ case T_CHAR:
+ case T_SHORT:
+ if (size < 4) return 0;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ return size;
+}
+
+// Limits on vector size (number of elements) loaded into vector.
+const int Matcher::max_vector_size(const BasicType bt) {
+ return vector_width_in_bytes(bt)/type2aelembytes(bt);
+}
+const int Matcher::min_vector_size(const BasicType bt) {
+ int max_size = max_vector_size(bt);
+ // Min size which can be loaded into vector is 4 bytes.
+ int size = (type2aelembytes(bt) == 1) ? 4 : 2;
+ return MIN2(size,max_size);
+}
+
+// Vector ideal reg corresponding to specidied size in bytes
+const int Matcher::vector_ideal_reg(int size) {
+ assert(MaxVectorSize >= size, "");
+ switch(size) {
+ case 4: return Op_VecS;
+ case 8: return Op_VecD;
+ case 16: return Op_VecX;
+ case 32: return Op_VecY;
+ }
+ ShouldNotReachHere();
+ return 0;
+}
+
+// x86 supports misaligned vectors store/load.
+const bool Matcher::misaligned_vectors_ok() {
+ return !AlignVector; // can be changed by flag
+}
+
+// Helper methods for MachSpillCopyNode::implementation().
+static int vec_mov_helper(CodeBuffer *cbuf, bool do_size, int src_lo, int dst_lo,
+ int src_hi, int dst_hi, uint ireg, outputStream* st) {
+ // In 64-bit VM size calculation is very complex. Emitting instructions
+ // into scratch buffer is used to get size in 64-bit VM.
+ LP64_ONLY( assert(!do_size, "this method calculates size only for 32-bit VM"); )
+ assert(ireg == Op_VecS || // 32bit vector
+ (src_lo & 1) == 0 && (src_lo + 1) == src_hi &&
+ (dst_lo & 1) == 0 && (dst_lo + 1) == dst_hi,
+ "no non-adjacent vector moves" );
+ if (cbuf) {
+ MacroAssembler _masm(cbuf);
+ int offset = __ offset();
+ switch (ireg) {
+ case Op_VecS: // copy whole register
+ case Op_VecD:
+ case Op_VecX:
+ __ movdqu(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]));
+ break;
+ case Op_VecY:
+ __ vmovdqu(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]));
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ int size = __ offset() - offset;
+#ifdef ASSERT
+ // VEX_2bytes prefix is used if UseAVX > 0, so it takes the same 2 bytes as SIMD prefix.
+ assert(!do_size || size == 4, "incorrect size calculattion");
+#endif
+ return size;
+#ifndef PRODUCT
+ } else if (!do_size) {
+ switch (ireg) {
+ case Op_VecS:
+ case Op_VecD:
+ case Op_VecX:
+ st->print("movdqu %s,%s\t# spill",Matcher::regName[dst_lo],Matcher::regName[src_lo]);
+ break;
+ case Op_VecY:
+ st->print("vmovdqu %s,%s\t# spill",Matcher::regName[dst_lo],Matcher::regName[src_lo]);
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+#endif
+ }
+ // VEX_2bytes prefix is used if UseAVX > 0, and it takes the same 2 bytes as SIMD prefix.
+ return 4;
+}
+
+static int vec_spill_helper(CodeBuffer *cbuf, bool do_size, bool is_load,
+ int stack_offset, int reg, uint ireg, outputStream* st) {
+ // In 64-bit VM size calculation is very complex. Emitting instructions
+ // into scratch buffer is used to get size in 64-bit VM.
+ LP64_ONLY( assert(!do_size, "this method calculates size only for 32-bit VM"); )
+ if (cbuf) {
+ MacroAssembler _masm(cbuf);
+ int offset = __ offset();
+ if (is_load) {
+ switch (ireg) {
+ case Op_VecS:
+ __ movdl(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
+ break;
+ case Op_VecD:
+ __ movq(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
+ break;
+ case Op_VecX:
+ __ movdqu(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
+ break;
+ case Op_VecY:
+ __ vmovdqu(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ } else { // store
+ switch (ireg) {
+ case Op_VecS:
+ __ movdl(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
+ break;
+ case Op_VecD:
+ __ movq(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
+ break;
+ case Op_VecX:
+ __ movdqu(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
+ break;
+ case Op_VecY:
+ __ vmovdqu(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ }
+ int size = __ offset() - offset;
+#ifdef ASSERT
+ int offset_size = (stack_offset == 0) ? 0 : ((stack_offset < 0x80) ? 1 : 4);
+ // VEX_2bytes prefix is used if UseAVX > 0, so it takes the same 2 bytes as SIMD prefix.
+ assert(!do_size || size == (5+offset_size), "incorrect size calculattion");
+#endif
+ return size;
+#ifndef PRODUCT
+ } else if (!do_size) {
+ if (is_load) {
+ switch (ireg) {
+ case Op_VecS:
+ st->print("movd %s,[rsp + %d]\t# spill", Matcher::regName[reg], stack_offset);
+ break;
+ case Op_VecD:
+ st->print("movq %s,[rsp + %d]\t# spill", Matcher::regName[reg], stack_offset);
+ break;
+ case Op_VecX:
+ st->print("movdqu %s,[rsp + %d]\t# spill", Matcher::regName[reg], stack_offset);
+ break;
+ case Op_VecY:
+ st->print("vmovdqu %s,[rsp + %d]\t# spill", Matcher::regName[reg], stack_offset);
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ } else { // store
+ switch (ireg) {
+ case Op_VecS:
+ st->print("movd [rsp + %d],%s\t# spill", stack_offset, Matcher::regName[reg]);
+ break;
+ case Op_VecD:
+ st->print("movq [rsp + %d],%s\t# spill", stack_offset, Matcher::regName[reg]);
+ break;
+ case Op_VecX:
+ st->print("movdqu [rsp + %d],%s\t# spill", stack_offset, Matcher::regName[reg]);
+ break;
+ case Op_VecY:
+ st->print("vmovdqu [rsp + %d],%s\t# spill", stack_offset, Matcher::regName[reg]);
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ }
+#endif
+ }
+ int offset_size = (stack_offset == 0) ? 0 : ((stack_offset < 0x80) ? 1 : 4);
+ // VEX_2bytes prefix is used if UseAVX > 0, so it takes the same 2 bytes as SIMD prefix.
+ return 5+offset_size;
+}
+
+static inline jfloat replicate4_imm(int con, int width) {
+ // Load a constant of "width" (in bytes) and replicate it to fill 32bit.
+ assert(width == 1 || width == 2, "only byte or short types here");
+ int bit_width = width * 8;
+ jint val = con;
+ val &= (1 << bit_width) - 1; // mask off sign bits
+ while(bit_width < 32) {
+ val |= (val << bit_width);
+ bit_width <<= 1;
+ }
+ jfloat fval = *((jfloat*) &val); // coerce to float type
+ return fval;
+}
+
+static inline jdouble replicate8_imm(int con, int width) {
+ // Load a constant of "width" (in bytes) and replicate it to fill 64bit.
+ assert(width == 1 || width == 2 || width == 4, "only byte, short or int types here");
+ int bit_width = width * 8;
+ jlong val = con;
+ val &= (((jlong) 1) << bit_width) - 1; // mask off sign bits
+ while(bit_width < 64) {
+ val |= (val << bit_width);
+ bit_width <<= 1;
+ }
+ jdouble dval = *((jdouble*) &val); // coerce to double type
+ return dval;
+}
+
#ifndef PRODUCT
void MachNopNode::format(PhaseRegAlloc*, outputStream* st) const {
st->print("nop \t# %d bytes pad for loops and calls", _count);
@@ -103,6 +799,46 @@ encode %{
%}
+
+//----------OPERANDS-----------------------------------------------------------
+// Operand definitions must precede instruction definitions for correct parsing
+// in the ADLC because operands constitute user defined types which are used in
+// instruction definitions.
+
+// Vectors
+operand vecS() %{
+ constraint(ALLOC_IN_RC(vectors_reg));
+ match(VecS);
+
+ format %{ %}
+ interface(REG_INTER);
+%}
+
+operand vecD() %{
+ constraint(ALLOC_IN_RC(vectord_reg));
+ match(VecD);
+
+ format %{ %}
+ interface(REG_INTER);
+%}
+
+operand vecX() %{
+ constraint(ALLOC_IN_RC(vectorx_reg));
+ match(VecX);
+
+ format %{ %}
+ interface(REG_INTER);
+%}
+
+operand vecY() %{
+ constraint(ALLOC_IN_RC(vectory_reg));
+ match(VecY);
+
+ format %{ %}
+ interface(REG_INTER);
+%}
+
+
// INSTRUCTIONS -- Platform independent definitions (same for 32- and 64-bit)
// ============================================================================
@@ -153,7 +889,7 @@ instruct addF_imm(regF dst, immF con) %{
ins_pipe(pipe_slow);
%}
-instruct vaddF_reg(regF dst, regF src1, regF src2) %{
+instruct addF_reg_reg(regF dst, regF src1, regF src2) %{
predicate(UseAVX > 0);
match(Set dst (AddF src1 src2));
@@ -165,7 +901,7 @@ instruct vaddF_reg(regF dst, regF src1, regF src2) %{
ins_pipe(pipe_slow);
%}
-instruct vaddF_mem(regF dst, regF src1, memory src2) %{
+instruct addF_reg_mem(regF dst, regF src1, memory src2) %{
predicate(UseAVX > 0);
match(Set dst (AddF src1 (LoadF src2)));
@@ -177,7 +913,7 @@ instruct vaddF_mem(regF dst, regF src1, memory src2) %{
ins_pipe(pipe_slow);
%}
-instruct vaddF_imm(regF dst, regF src, immF con) %{
+instruct addF_reg_imm(regF dst, regF src, immF con) %{
predicate(UseAVX > 0);
match(Set dst (AddF src con));
@@ -224,7 +960,7 @@ instruct addD_imm(regD dst, immD con) %{
ins_pipe(pipe_slow);
%}
-instruct vaddD_reg(regD dst, regD src1, regD src2) %{
+instruct addD_reg_reg(regD dst, regD src1, regD src2) %{
predicate(UseAVX > 0);
match(Set dst (AddD src1 src2));
@@ -236,7 +972,7 @@ instruct vaddD_reg(regD dst, regD src1, regD src2) %{
ins_pipe(pipe_slow);
%}
-instruct vaddD_mem(regD dst, regD src1, memory src2) %{
+instruct addD_reg_mem(regD dst, regD src1, memory src2) %{
predicate(UseAVX > 0);
match(Set dst (AddD src1 (LoadD src2)));
@@ -248,7 +984,7 @@ instruct vaddD_mem(regD dst, regD src1, memory src2) %{
ins_pipe(pipe_slow);
%}
-instruct vaddD_imm(regD dst, regD src, immD con) %{
+instruct addD_reg_imm(regD dst, regD src, immD con) %{
predicate(UseAVX > 0);
match(Set dst (AddD src con));
@@ -295,7 +1031,7 @@ instruct subF_imm(regF dst, immF con) %{
ins_pipe(pipe_slow);
%}
-instruct vsubF_reg(regF dst, regF src1, regF src2) %{
+instruct subF_reg_reg(regF dst, regF src1, regF src2) %{
predicate(UseAVX > 0);
match(Set dst (SubF src1 src2));
@@ -307,7 +1043,7 @@ instruct vsubF_reg(regF dst, regF src1, regF src2) %{
ins_pipe(pipe_slow);
%}
-instruct vsubF_mem(regF dst, regF src1, memory src2) %{
+instruct subF_reg_mem(regF dst, regF src1, memory src2) %{
predicate(UseAVX > 0);
match(Set dst (SubF src1 (LoadF src2)));
@@ -319,7 +1055,7 @@ instruct vsubF_mem(regF dst, regF src1, memory src2) %{
ins_pipe(pipe_slow);
%}
-instruct vsubF_imm(regF dst, regF src, immF con) %{
+instruct subF_reg_imm(regF dst, regF src, immF con) %{
predicate(UseAVX > 0);
match(Set dst (SubF src con));
@@ -366,7 +1102,7 @@ instruct subD_imm(regD dst, immD con) %{
ins_pipe(pipe_slow);
%}
-instruct vsubD_reg(regD dst, regD src1, regD src2) %{
+instruct subD_reg_reg(regD dst, regD src1, regD src2) %{
predicate(UseAVX > 0);
match(Set dst (SubD src1 src2));
@@ -378,7 +1114,7 @@ instruct vsubD_reg(regD dst, regD src1, regD src2) %{
ins_pipe(pipe_slow);
%}
-instruct vsubD_mem(regD dst, regD src1, memory src2) %{
+instruct subD_reg_mem(regD dst, regD src1, memory src2) %{
predicate(UseAVX > 0);
match(Set dst (SubD src1 (LoadD src2)));
@@ -390,7 +1126,7 @@ instruct vsubD_mem(regD dst, regD src1, memory src2) %{
ins_pipe(pipe_slow);
%}
-instruct vsubD_imm(regD dst, regD src, immD con) %{
+instruct subD_reg_imm(regD dst, regD src, immD con) %{
predicate(UseAVX > 0);
match(Set dst (SubD src con));
@@ -437,7 +1173,7 @@ instruct mulF_imm(regF dst, immF con) %{
ins_pipe(pipe_slow);
%}
-instruct vmulF_reg(regF dst, regF src1, regF src2) %{
+instruct mulF_reg_reg(regF dst, regF src1, regF src2) %{
predicate(UseAVX > 0);
match(Set dst (MulF src1 src2));
@@ -449,7 +1185,7 @@ instruct vmulF_reg(regF dst, regF src1, regF src2) %{
ins_pipe(pipe_slow);
%}
-instruct vmulF_mem(regF dst, regF src1, memory src2) %{
+instruct mulF_reg_mem(regF dst, regF src1, memory src2) %{
predicate(UseAVX > 0);
match(Set dst (MulF src1 (LoadF src2)));
@@ -461,7 +1197,7 @@ instruct vmulF_mem(regF dst, regF src1, memory src2) %{
ins_pipe(pipe_slow);
%}
-instruct vmulF_imm(regF dst, regF src, immF con) %{
+instruct mulF_reg_imm(regF dst, regF src, immF con) %{
predicate(UseAVX > 0);
match(Set dst (MulF src con));
@@ -508,7 +1244,7 @@ instruct mulD_imm(regD dst, immD con) %{
ins_pipe(pipe_slow);
%}
-instruct vmulD_reg(regD dst, regD src1, regD src2) %{
+instruct mulD_reg_reg(regD dst, regD src1, regD src2) %{
predicate(UseAVX > 0);
match(Set dst (MulD src1 src2));
@@ -520,7 +1256,7 @@ instruct vmulD_reg(regD dst, regD src1, regD src2) %{
ins_pipe(pipe_slow);
%}
-instruct vmulD_mem(regD dst, regD src1, memory src2) %{
+instruct mulD_reg_mem(regD dst, regD src1, memory src2) %{
predicate(UseAVX > 0);
match(Set dst (MulD src1 (LoadD src2)));
@@ -532,7 +1268,7 @@ instruct vmulD_mem(regD dst, regD src1, memory src2) %{
ins_pipe(pipe_slow);
%}
-instruct vmulD_imm(regD dst, regD src, immD con) %{
+instruct mulD_reg_imm(regD dst, regD src, immD con) %{
predicate(UseAVX > 0);
match(Set dst (MulD src con));
@@ -579,7 +1315,7 @@ instruct divF_imm(regF dst, immF con) %{
ins_pipe(pipe_slow);
%}
-instruct vdivF_reg(regF dst, regF src1, regF src2) %{
+instruct divF_reg_reg(regF dst, regF src1, regF src2) %{
predicate(UseAVX > 0);
match(Set dst (DivF src1 src2));
@@ -591,7 +1327,7 @@ instruct vdivF_reg(regF dst, regF src1, regF src2) %{
ins_pipe(pipe_slow);
%}
-instruct vdivF_mem(regF dst, regF src1, memory src2) %{
+instruct divF_reg_mem(regF dst, regF src1, memory src2) %{
predicate(UseAVX > 0);
match(Set dst (DivF src1 (LoadF src2)));
@@ -603,7 +1339,7 @@ instruct vdivF_mem(regF dst, regF src1, memory src2) %{
ins_pipe(pipe_slow);
%}
-instruct vdivF_imm(regF dst, regF src, immF con) %{
+instruct divF_reg_imm(regF dst, regF src, immF con) %{
predicate(UseAVX > 0);
match(Set dst (DivF src con));
@@ -650,7 +1386,7 @@ instruct divD_imm(regD dst, immD con) %{
ins_pipe(pipe_slow);
%}
-instruct vdivD_reg(regD dst, regD src1, regD src2) %{
+instruct divD_reg_reg(regD dst, regD src1, regD src2) %{
predicate(UseAVX > 0);
match(Set dst (DivD src1 src2));
@@ -662,7 +1398,7 @@ instruct vdivD_reg(regD dst, regD src1, regD src2) %{
ins_pipe(pipe_slow);
%}
-instruct vdivD_mem(regD dst, regD src1, memory src2) %{
+instruct divD_reg_mem(regD dst, regD src1, memory src2) %{
predicate(UseAVX > 0);
match(Set dst (DivD src1 (LoadD src2)));
@@ -674,7 +1410,7 @@ instruct vdivD_mem(regD dst, regD src1, memory src2) %{
ins_pipe(pipe_slow);
%}
-instruct vdivD_imm(regD dst, regD src, immD con) %{
+instruct divD_reg_imm(regD dst, regD src, immD con) %{
predicate(UseAVX > 0);
match(Set dst (DivD src con));
@@ -697,7 +1433,7 @@ instruct absF_reg(regF dst) %{
ins_pipe(pipe_slow);
%}
-instruct vabsF_reg(regF dst, regF src) %{
+instruct absF_reg_reg(regF dst, regF src) %{
predicate(UseAVX > 0);
match(Set dst (AbsF src));
ins_cost(150);
@@ -721,7 +1457,7 @@ instruct absD_reg(regD dst) %{
ins_pipe(pipe_slow);
%}
-instruct vabsD_reg(regD dst, regD src) %{
+instruct absD_reg_reg(regD dst, regD src) %{
predicate(UseAVX > 0);
match(Set dst (AbsD src));
ins_cost(150);
@@ -745,7 +1481,7 @@ instruct negF_reg(regF dst) %{
ins_pipe(pipe_slow);
%}
-instruct vnegF_reg(regF dst, regF src) %{
+instruct negF_reg_reg(regF dst, regF src) %{
predicate(UseAVX > 0);
match(Set dst (NegF src));
ins_cost(150);
@@ -769,7 +1505,7 @@ instruct negD_reg(regD dst) %{
ins_pipe(pipe_slow);
%}
-instruct vnegD_reg(regD dst, regD src) %{
+instruct negD_reg_reg(regD dst, regD src) %{
predicate(UseAVX > 0);
match(Set dst (NegD src));
ins_cost(150);
@@ -852,3 +1588,797 @@ instruct sqrtD_imm(regD dst, immD con) %{
ins_pipe(pipe_slow);
%}
+
+// ====================VECTOR INSTRUCTIONS=====================================
+
+// Load vectors (4 bytes long)
+instruct loadV4(vecS dst, memory mem) %{
+ predicate(n->as_LoadVector()->memory_size() == 4);
+ match(Set dst (LoadVector mem));
+ ins_cost(125);
+ format %{ "movd $dst,$mem\t! load vector (4 bytes)" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $mem$$Address);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Load vectors (8 bytes long)
+instruct loadV8(vecD dst, memory mem) %{
+ predicate(n->as_LoadVector()->memory_size() == 8);
+ match(Set dst (LoadVector mem));
+ ins_cost(125);
+ format %{ "movq $dst,$mem\t! load vector (8 bytes)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $mem$$Address);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Load vectors (16 bytes long)
+instruct loadV16(vecX dst, memory mem) %{
+ predicate(n->as_LoadVector()->memory_size() == 16);
+ match(Set dst (LoadVector mem));
+ ins_cost(125);
+ format %{ "movdqu $dst,$mem\t! load vector (16 bytes)" %}
+ ins_encode %{
+ __ movdqu($dst$$XMMRegister, $mem$$Address);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Load vectors (32 bytes long)
+instruct loadV32(vecY dst, memory mem) %{
+ predicate(n->as_LoadVector()->memory_size() == 32);
+ match(Set dst (LoadVector mem));
+ ins_cost(125);
+ format %{ "vmovdqu $dst,$mem\t! load vector (32 bytes)" %}
+ ins_encode %{
+ __ vmovdqu($dst$$XMMRegister, $mem$$Address);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Store vectors
+instruct storeV4(memory mem, vecS src) %{
+ predicate(n->as_StoreVector()->memory_size() == 4);
+ match(Set mem (StoreVector mem src));
+ ins_cost(145);
+ format %{ "movd $mem,$src\t! store vector (4 bytes)" %}
+ ins_encode %{
+ __ movdl($mem$$Address, $src$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct storeV8(memory mem, vecD src) %{
+ predicate(n->as_StoreVector()->memory_size() == 8);
+ match(Set mem (StoreVector mem src));
+ ins_cost(145);
+ format %{ "movq $mem,$src\t! store vector (8 bytes)" %}
+ ins_encode %{
+ __ movq($mem$$Address, $src$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct storeV16(memory mem, vecX src) %{
+ predicate(n->as_StoreVector()->memory_size() == 16);
+ match(Set mem (StoreVector mem src));
+ ins_cost(145);
+ format %{ "movdqu $mem,$src\t! store vector (16 bytes)" %}
+ ins_encode %{
+ __ movdqu($mem$$Address, $src$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct storeV32(memory mem, vecY src) %{
+ predicate(n->as_StoreVector()->memory_size() == 32);
+ match(Set mem (StoreVector mem src));
+ ins_cost(145);
+ format %{ "vmovdqu $mem,$src\t! store vector (32 bytes)" %}
+ ins_encode %{
+ __ vmovdqu($mem$$Address, $src$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate byte scalar to be vector
+instruct Repl4B(vecS dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateB src));
+ format %{ "movd $dst,$src\n\t"
+ "punpcklbw $dst,$dst\n\t"
+ "pshuflw $dst,$dst,0x00\t! replicate4B" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ punpcklbw($dst$$XMMRegister, $dst$$XMMRegister);
+ __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl8B(vecD dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateB src));
+ format %{ "movd $dst,$src\n\t"
+ "punpcklbw $dst,$dst\n\t"
+ "pshuflw $dst,$dst,0x00\t! replicate8B" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ punpcklbw($dst$$XMMRegister, $dst$$XMMRegister);
+ __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl16B(vecX dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 16);
+ match(Set dst (ReplicateB src));
+ format %{ "movd $dst,$src\n\t"
+ "punpcklbw $dst,$dst\n\t"
+ "pshuflw $dst,$dst,0x00\n\t"
+ "punpcklqdq $dst,$dst\t! replicate16B" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ punpcklbw($dst$$XMMRegister, $dst$$XMMRegister);
+ __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl32B(vecY dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 32);
+ match(Set dst (ReplicateB src));
+ format %{ "movd $dst,$src\n\t"
+ "punpcklbw $dst,$dst\n\t"
+ "pshuflw $dst,$dst,0x00\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate32B" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ punpcklbw($dst$$XMMRegister, $dst$$XMMRegister);
+ __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate byte scalar immediate to be vector by loading from const table.
+instruct Repl4B_imm(vecS dst, immI con) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateB con));
+ format %{ "movdl $dst,[$constantaddress]\t! replicate4B($con)" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $constantaddress(replicate4_imm($con$$constant, 1)));
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl8B_imm(vecD dst, immI con) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateB con));
+ format %{ "movq $dst,[$constantaddress]\t! replicate8B($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 1)));
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl16B_imm(vecX dst, immI con) %{
+ predicate(n->as_Vector()->length() == 16);
+ match(Set dst (ReplicateB con));
+ format %{ "movq $dst,[$constantaddress]\n\t"
+ "punpcklqdq $dst,$dst\t! replicate16B($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 1)));
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl32B_imm(vecY dst, immI con) %{
+ predicate(n->as_Vector()->length() == 32);
+ match(Set dst (ReplicateB con));
+ format %{ "movq $dst,[$constantaddress]\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst\t! lreplicate32B($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 1)));
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate byte scalar zero to be vector
+instruct Repl4B_zero(vecS dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateB zero));
+ format %{ "pxor $dst,$dst\t! replicate4B zero" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl8B_zero(vecD dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateB zero));
+ format %{ "pxor $dst,$dst\t! replicate8B zero" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl16B_zero(vecX dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 16);
+ match(Set dst (ReplicateB zero));
+ format %{ "pxor $dst,$dst\t! replicate16B zero" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl32B_zero(vecY dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 32);
+ match(Set dst (ReplicateB zero));
+ format %{ "vpxor $dst,$dst,$dst\t! replicate32B zero" %}
+ ins_encode %{
+ // Use vxorpd since AVX does not have vpxor for 256-bit (AVX2 will have it).
+ bool vector256 = true;
+ __ vpxor($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister, vector256);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+// Replicate char/short (2 byte) scalar to be vector
+instruct Repl2S(vecS dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateS src));
+ format %{ "movd $dst,$src\n\t"
+ "pshuflw $dst,$dst,0x00\t! replicate2S" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4S(vecD dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateS src));
+ format %{ "movd $dst,$src\n\t"
+ "pshuflw $dst,$dst,0x00\t! replicate4S" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl8S(vecX dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateS src));
+ format %{ "movd $dst,$src\n\t"
+ "pshuflw $dst,$dst,0x00\n\t"
+ "punpcklqdq $dst,$dst\t! replicate8S" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl16S(vecY dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 16);
+ match(Set dst (ReplicateS src));
+ format %{ "movd $dst,$src\n\t"
+ "pshuflw $dst,$dst,0x00\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate16S" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate char/short (2 byte) scalar immediate to be vector by loading from const table.
+instruct Repl2S_imm(vecS dst, immI con) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateS con));
+ format %{ "movdl $dst,[$constantaddress]\t! replicate2S($con)" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $constantaddress(replicate4_imm($con$$constant, 2)));
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4S_imm(vecD dst, immI con) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateS con));
+ format %{ "movq $dst,[$constantaddress]\t! replicate4S($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 2)));
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl8S_imm(vecX dst, immI con) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateS con));
+ format %{ "movq $dst,[$constantaddress]\n\t"
+ "punpcklqdq $dst,$dst\t! replicate8S($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 2)));
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl16S_imm(vecY dst, immI con) %{
+ predicate(n->as_Vector()->length() == 16);
+ match(Set dst (ReplicateS con));
+ format %{ "movq $dst,[$constantaddress]\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate16S($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 2)));
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate char/short (2 byte) scalar zero to be vector
+instruct Repl2S_zero(vecS dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateS zero));
+ format %{ "pxor $dst,$dst\t! replicate2S zero" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4S_zero(vecD dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateS zero));
+ format %{ "pxor $dst,$dst\t! replicate4S zero" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl8S_zero(vecX dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateS zero));
+ format %{ "pxor $dst,$dst\t! replicate8S zero" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl16S_zero(vecY dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 16);
+ match(Set dst (ReplicateS zero));
+ format %{ "vpxor $dst,$dst,$dst\t! replicate16S zero" %}
+ ins_encode %{
+ // Use vxorpd since AVX does not have vpxor for 256-bit (AVX2 will have it).
+ bool vector256 = true;
+ __ vpxor($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister, vector256);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+// Replicate integer (4 byte) scalar to be vector
+instruct Repl2I(vecD dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateI src));
+ format %{ "movd $dst,$src\n\t"
+ "pshufd $dst,$dst,0x00\t! replicate2I" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ pshufd($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4I(vecX dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateI src));
+ format %{ "movd $dst,$src\n\t"
+ "pshufd $dst,$dst,0x00\t! replicate4I" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ pshufd($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl8I(vecY dst, rRegI src) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateI src));
+ format %{ "movd $dst,$src\n\t"
+ "pshufd $dst,$dst,0x00\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate8I" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ pshufd($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate integer (4 byte) scalar immediate to be vector by loading from const table.
+instruct Repl2I_imm(vecD dst, immI con) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateI con));
+ format %{ "movq $dst,[$constantaddress]\t! replicate2I($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 4)));
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4I_imm(vecX dst, immI con) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateI con));
+ format %{ "movq $dst,[$constantaddress]\t! replicate4I($con)\n\t"
+ "punpcklqdq $dst,$dst" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 4)));
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl8I_imm(vecY dst, immI con) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateI con));
+ format %{ "movq $dst,[$constantaddress]\t! replicate8I($con)\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress(replicate8_imm($con$$constant, 4)));
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Integer could be loaded into xmm register directly from memory.
+instruct Repl2I_mem(vecD dst, memory mem) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateI (LoadI mem)));
+ format %{ "movd $dst,$mem\n\t"
+ "pshufd $dst,$dst,0x00\t! replicate2I" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $mem$$Address);
+ __ pshufd($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4I_mem(vecX dst, memory mem) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateI (LoadI mem)));
+ format %{ "movd $dst,$mem\n\t"
+ "pshufd $dst,$dst,0x00\t! replicate4I" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $mem$$Address);
+ __ pshufd($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl8I_mem(vecY dst, memory mem) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateI (LoadI mem)));
+ format %{ "movd $dst,$mem\n\t"
+ "pshufd $dst,$dst,0x00\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate8I" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $mem$$Address);
+ __ pshufd($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate integer (4 byte) scalar zero to be vector
+instruct Repl2I_zero(vecD dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateI zero));
+ format %{ "pxor $dst,$dst\t! replicate2I" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4I_zero(vecX dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateI zero));
+ format %{ "pxor $dst,$dst\t! replicate4I zero)" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl8I_zero(vecY dst, immI0 zero) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateI zero));
+ format %{ "vpxor $dst,$dst,$dst\t! replicate8I zero" %}
+ ins_encode %{
+ // Use vxorpd since AVX does not have vpxor for 256-bit (AVX2 will have it).
+ bool vector256 = true;
+ __ vpxor($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister, vector256);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+// Replicate long (8 byte) scalar to be vector
+#ifdef _LP64
+instruct Repl2L(vecX dst, rRegL src) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateL src));
+ format %{ "movdq $dst,$src\n\t"
+ "punpcklqdq $dst,$dst\t! replicate2L" %}
+ ins_encode %{
+ __ movdq($dst$$XMMRegister, $src$$Register);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl4L(vecY dst, rRegL src) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateL src));
+ format %{ "movdq $dst,$src\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate4L" %}
+ ins_encode %{
+ __ movdq($dst$$XMMRegister, $src$$Register);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+#else // _LP64
+instruct Repl2L(vecX dst, eRegL src, regD tmp) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateL src));
+ effect(TEMP dst, USE src, TEMP tmp);
+ format %{ "movdl $dst,$src.lo\n\t"
+ "movdl $tmp,$src.hi\n\t"
+ "punpckldq $dst,$tmp\n\t"
+ "punpcklqdq $dst,$dst\t! replicate2L"%}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ movdl($tmp$$XMMRegister, HIGH_FROM_LOW($src$$Register));
+ __ punpckldq($dst$$XMMRegister, $tmp$$XMMRegister);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl4L(vecY dst, eRegL src, regD tmp) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateL src));
+ effect(TEMP dst, USE src, TEMP tmp);
+ format %{ "movdl $dst,$src.lo\n\t"
+ "movdl $tmp,$src.hi\n\t"
+ "punpckldq $dst,$tmp\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate4L" %}
+ ins_encode %{
+ __ movdl($dst$$XMMRegister, $src$$Register);
+ __ movdl($tmp$$XMMRegister, HIGH_FROM_LOW($src$$Register));
+ __ punpckldq($dst$$XMMRegister, $tmp$$XMMRegister);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+#endif // _LP64
+
+// Replicate long (8 byte) scalar immediate to be vector by loading from const table.
+instruct Repl2L_imm(vecX dst, immL con) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateL con));
+ format %{ "movq $dst,[$constantaddress]\n\t"
+ "punpcklqdq $dst,$dst\t! replicate2L($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress($con));
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl4L_imm(vecY dst, immL con) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateL con));
+ format %{ "movq $dst,[$constantaddress]\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate4L($con)" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $constantaddress($con));
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Long could be loaded into xmm register directly from memory.
+instruct Repl2L_mem(vecX dst, memory mem) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateL (LoadL mem)));
+ format %{ "movq $dst,$mem\n\t"
+ "punpcklqdq $dst,$dst\t! replicate2L" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $mem$$Address);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl4L_mem(vecY dst, memory mem) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateL (LoadL mem)));
+ format %{ "movq $dst,$mem\n\t"
+ "punpcklqdq $dst,$dst\n\t"
+ "vinserti128h $dst,$dst,$dst\t! replicate4L" %}
+ ins_encode %{
+ __ movq($dst$$XMMRegister, $mem$$Address);
+ __ punpcklqdq($dst$$XMMRegister, $dst$$XMMRegister);
+ __ vinserti128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate long (8 byte) scalar zero to be vector
+instruct Repl2L_zero(vecX dst, immL0 zero) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateL zero));
+ format %{ "pxor $dst,$dst\t! replicate2L zero" %}
+ ins_encode %{
+ __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4L_zero(vecY dst, immL0 zero) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateL zero));
+ format %{ "vpxor $dst,$dst,$dst\t! replicate4L zero" %}
+ ins_encode %{
+ // Use vxorpd since AVX does not have vpxor for 256-bit (AVX2 will have it).
+ bool vector256 = true;
+ __ vpxor($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister, vector256);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+// Replicate float (4 byte) scalar to be vector
+instruct Repl2F(vecD dst, regF src) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateF src));
+ format %{ "pshufd $dst,$dst,0x00\t! replicate2F" %}
+ ins_encode %{
+ __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0x00);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4F(vecX dst, regF src) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateF src));
+ format %{ "pshufd $dst,$dst,0x00\t! replicate4F" %}
+ ins_encode %{
+ __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0x00);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl8F(vecY dst, regF src) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateF src));
+ format %{ "pshufd $dst,$src,0x00\n\t"
+ "vinsertf128h $dst,$dst,$dst\t! replicate8F" %}
+ ins_encode %{
+ __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0x00);
+ __ vinsertf128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate float (4 byte) scalar zero to be vector
+instruct Repl2F_zero(vecD dst, immF0 zero) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateF zero));
+ format %{ "xorps $dst,$dst\t! replicate2F zero" %}
+ ins_encode %{
+ __ xorps($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4F_zero(vecX dst, immF0 zero) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateF zero));
+ format %{ "xorps $dst,$dst\t! replicate4F zero" %}
+ ins_encode %{
+ __ xorps($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl8F_zero(vecY dst, immF0 zero) %{
+ predicate(n->as_Vector()->length() == 8);
+ match(Set dst (ReplicateF zero));
+ format %{ "vxorps $dst,$dst,$dst\t! replicate8F zero" %}
+ ins_encode %{
+ bool vector256 = true;
+ __ vxorps($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister, vector256);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+// Replicate double (8 bytes) scalar to be vector
+instruct Repl2D(vecX dst, regD src) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateD src));
+ format %{ "pshufd $dst,$src,0x44\t! replicate2D" %}
+ ins_encode %{
+ __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0x44);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+instruct Repl4D(vecY dst, regD src) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateD src));
+ format %{ "pshufd $dst,$src,0x44\n\t"
+ "vinsertf128h $dst,$dst,$dst\t! replicate4D" %}
+ ins_encode %{
+ __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0x44);
+ __ vinsertf128h($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( pipe_slow );
+%}
+
+// Replicate double (8 byte) scalar zero to be vector
+instruct Repl2D_zero(vecX dst, immD0 zero) %{
+ predicate(n->as_Vector()->length() == 2);
+ match(Set dst (ReplicateD zero));
+ format %{ "xorpd $dst,$dst\t! replicate2D zero" %}
+ ins_encode %{
+ __ xorpd($dst$$XMMRegister, $dst$$XMMRegister);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
+instruct Repl4D_zero(vecY dst, immD0 zero) %{
+ predicate(n->as_Vector()->length() == 4);
+ match(Set dst (ReplicateD zero));
+ format %{ "vxorpd $dst,$dst,$dst,vect256\t! replicate4D zero" %}
+ ins_encode %{
+ bool vector256 = true;
+ __ vxorpd($dst$$XMMRegister, $dst$$XMMRegister, $dst$$XMMRegister, vector256);
+ %}
+ ins_pipe( fpu_reg_reg );
+%}
+
diff --git a/hotspot/src/cpu/x86/vm/x86_32.ad b/hotspot/src/cpu/x86/vm/x86_32.ad
index 300903954d2..b46d3d68843 100644
--- a/hotspot/src/cpu/x86/vm/x86_32.ad
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad
@@ -74,9 +74,6 @@ reg_def EDX(SOC, SOC, Op_RegI, 2, rdx->as_VMReg());
reg_def EAX(SOC, SOC, Op_RegI, 0, rax->as_VMReg());
reg_def ESP( NS, NS, Op_RegI, 4, rsp->as_VMReg());
-// Special Registers
-reg_def EFLAGS(SOC, SOC, 0, 8, VMRegImpl::Bad());
-
// Float registers. We treat TOS/FPR0 special. It is invisible to the
// allocator, and only shows up in the encodings.
reg_def FPR0L( SOC, SOC, Op_RegF, 0, VMRegImpl::Bad());
@@ -105,27 +102,6 @@ reg_def FPR6H( SOC, SOC, Op_RegF, 6, as_FloatRegister(5)->as_VMReg()->next());
reg_def FPR7L( SOC, SOC, Op_RegF, 7, as_FloatRegister(6)->as_VMReg());
reg_def FPR7H( SOC, SOC, Op_RegF, 7, as_FloatRegister(6)->as_VMReg()->next());
-// XMM registers. 128-bit registers or 4 words each, labeled a-d.
-// Word a in each register holds a Float, words ab hold a Double.
-// We currently do not use the SIMD capabilities, so registers cd
-// are unused at the moment.
-reg_def XMM0a( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg());
-reg_def XMM0b( SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next());
-reg_def XMM1a( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg());
-reg_def XMM1b( SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next());
-reg_def XMM2a( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg());
-reg_def XMM2b( SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next());
-reg_def XMM3a( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg());
-reg_def XMM3b( SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next());
-reg_def XMM4a( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg());
-reg_def XMM4b( SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next());
-reg_def XMM5a( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg());
-reg_def XMM5b( SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next());
-reg_def XMM6a( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg());
-reg_def XMM6b( SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next());
-reg_def XMM7a( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg());
-reg_def XMM7b( SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next());
-
// Specify priority of register selection within phases of register
// allocation. Highest priority is first. A useful heuristic is to
// give registers a low priority when they are required by machine
@@ -138,15 +114,6 @@ alloc_class chunk0( ECX, EBX, EBP, EDI, EAX, EDX, ESI, ESP,
FPR3L, FPR3H, FPR4L, FPR4H, FPR5L, FPR5H,
FPR6L, FPR6H, FPR7L, FPR7H );
-alloc_class chunk1( XMM0a, XMM0b,
- XMM1a, XMM1b,
- XMM2a, XMM2b,
- XMM3a, XMM3b,
- XMM4a, XMM4b,
- XMM5a, XMM5b,
- XMM6a, XMM6b,
- XMM7a, XMM7b, EFLAGS);
-
//----------Architecture Description Register Classes--------------------------
// Several register classes are automatically defined based upon information in
@@ -159,12 +126,12 @@ alloc_class chunk1( XMM0a, XMM0b,
// Class for all registers
reg_class any_reg(EAX, EDX, EBP, EDI, ESI, ECX, EBX, ESP);
// Class for general registers
-reg_class e_reg(EAX, EDX, EBP, EDI, ESI, ECX, EBX);
+reg_class int_reg(EAX, EDX, EBP, EDI, ESI, ECX, EBX);
// Class for general registers which may be used for implicit null checks on win95
// Also safe for use by tailjump. We don't want to allocate in rbp,
-reg_class e_reg_no_rbp(EAX, EDX, EDI, ESI, ECX, EBX);
+reg_class int_reg_no_rbp(EAX, EDX, EDI, ESI, ECX, EBX);
// Class of "X" registers
-reg_class x_reg(EBX, ECX, EDX, EAX);
+reg_class int_x_reg(EBX, ECX, EDX, EAX);
// Class of registers that can appear in an address with no offset.
// EBP and ESP require an extra instruction byte for zero offset.
// Used in fast-unlock
@@ -193,8 +160,6 @@ reg_class ebp_reg(EBP);
reg_class sp_reg(ESP);
// Singleton class for instruction pointer
// reg_class ip_reg(EIP);
-// Singleton class for condition codes
-reg_class int_flags(EFLAGS);
// Class of integer register pairs
reg_class long_reg( EAX,EDX, ECX,EBX, EBP,EDI );
// Class of integer register pairs that aligns with calling convention
@@ -206,29 +171,18 @@ reg_class nadx_reg( EBX,ECX,ESI,EDI,EBP );
// Floating point registers. Notice FPR0 is not a choice.
// FPR0 is not ever allocated; we use clever encodings to fake
// a 2-address instructions out of Intels FP stack.
-reg_class flt_reg( FPR1L,FPR2L,FPR3L,FPR4L,FPR5L,FPR6L,FPR7L );
+reg_class fp_flt_reg( FPR1L,FPR2L,FPR3L,FPR4L,FPR5L,FPR6L,FPR7L );
-// make a register class for SSE registers
-reg_class xmm_reg(XMM0a, XMM1a, XMM2a, XMM3a, XMM4a, XMM5a, XMM6a, XMM7a);
+reg_class fp_dbl_reg( FPR1L,FPR1H, FPR2L,FPR2H, FPR3L,FPR3H,
+ FPR4L,FPR4H, FPR5L,FPR5H, FPR6L,FPR6H,
+ FPR7L,FPR7H );
-// make a double register class for SSE2 registers
-reg_class xdb_reg(XMM0a,XMM0b, XMM1a,XMM1b, XMM2a,XMM2b, XMM3a,XMM3b,
- XMM4a,XMM4b, XMM5a,XMM5b, XMM6a,XMM6b, XMM7a,XMM7b );
+reg_class fp_flt_reg0( FPR1L );
+reg_class fp_dbl_reg0( FPR1L,FPR1H );
+reg_class fp_dbl_reg1( FPR2L,FPR2H );
+reg_class fp_dbl_notreg0( FPR2L,FPR2H, FPR3L,FPR3H, FPR4L,FPR4H,
+ FPR5L,FPR5H, FPR6L,FPR6H, FPR7L,FPR7H );
-reg_class dbl_reg( FPR1L,FPR1H, FPR2L,FPR2H, FPR3L,FPR3H,
- FPR4L,FPR4H, FPR5L,FPR5H, FPR6L,FPR6H,
- FPR7L,FPR7H );
-
-reg_class flt_reg0( FPR1L );
-reg_class dbl_reg0( FPR1L,FPR1H );
-reg_class dbl_reg1( FPR2L,FPR2H );
-reg_class dbl_notreg0( FPR2L,FPR2H, FPR3L,FPR3H, FPR4L,FPR4H,
- FPR5L,FPR5H, FPR6L,FPR6H, FPR7L,FPR7H );
-
-// XMM6 and XMM7 could be used as temporary registers for long, float and
-// double values for SSE2.
-reg_class xdb_reg6( XMM6a,XMM6b );
-reg_class xdb_reg7( XMM7a,XMM7b );
%}
@@ -412,7 +366,7 @@ void store_to_stackslot(CodeBuffer &cbuf, int opcode, int rm_field, int disp) {
}
}
- // eRegI ereg, memory mem) %{ // emit_reg_mem
+ // rRegI ereg, memory mem) %{ // emit_reg_mem
void encode_RegMem( CodeBuffer &cbuf, int reg_encoding, int base, int index, int scale, int displace, bool displace_is_oop ) {
// There is no index & no scale, use form without SIB byte
if ((index == 0x4) &&
@@ -787,7 +741,7 @@ static int impl_x_helper( CodeBuffer *cbuf, bool do_size, bool is_load,
#endif
}
int offset_size = (offset == 0) ? 0 : ((offset <= 127) ? 1 : 4);
- // VEX_2bytes prefix is used if UseAVX > 0, so it takes the same 2 bytes.
+ // VEX_2bytes prefix is used if UseAVX > 0, so it takes the same 2 bytes as SIMD prefix.
return size+5+offset_size;
}
@@ -821,7 +775,7 @@ static int impl_movx_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int dst
}
#endif
}
- // VEX_2bytes prefix is used if UseAVX > 0, and it takes the same 2 bytes.
+ // VEX_2bytes prefix is used if UseAVX > 0, and it takes the same 2 bytes as SIMD prefix.
// Only MOVAPS SSE prefix uses 1 byte.
int sz = 4;
if (!(src_lo+1 == src_hi && dst_lo+1 == dst_hi) &&
@@ -903,6 +857,108 @@ static int impl_fp_store_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int
return impl_helper(cbuf,do_size,false,offset,st_op,op,op_str,size, st);
}
+// Next two methods are shared by 32- and 64-bit VM. They are defined in x86.ad.
+static int vec_mov_helper(CodeBuffer *cbuf, bool do_size, int src_lo, int dst_lo,
+ int src_hi, int dst_hi, uint ireg, outputStream* st);
+
+static int vec_spill_helper(CodeBuffer *cbuf, bool do_size, bool is_load,
+ int stack_offset, int reg, uint ireg, outputStream* st);
+
+static int vec_stack_to_stack_helper(CodeBuffer *cbuf, bool do_size, int src_offset,
+ int dst_offset, uint ireg, outputStream* st) {
+ int calc_size = 0;
+ int src_offset_size = (src_offset == 0) ? 0 : ((src_offset < 0x80) ? 1 : 4);
+ int dst_offset_size = (dst_offset == 0) ? 0 : ((dst_offset < 0x80) ? 1 : 4);
+ switch (ireg) {
+ case Op_VecS:
+ calc_size = 3+src_offset_size + 3+dst_offset_size;
+ break;
+ case Op_VecD:
+ calc_size = 3+src_offset_size + 3+dst_offset_size;
+ src_offset += 4;
+ dst_offset += 4;
+ src_offset_size = (src_offset == 0) ? 0 : ((src_offset < 0x80) ? 1 : 4);
+ dst_offset_size = (dst_offset == 0) ? 0 : ((dst_offset < 0x80) ? 1 : 4);
+ calc_size += 3+src_offset_size + 3+dst_offset_size;
+ break;
+ case Op_VecX:
+ calc_size = 6 + 6 + 5+src_offset_size + 5+dst_offset_size;
+ break;
+ case Op_VecY:
+ calc_size = 6 + 6 + 5+src_offset_size + 5+dst_offset_size;
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ if (cbuf) {
+ MacroAssembler _masm(cbuf);
+ int offset = __ offset();
+ switch (ireg) {
+ case Op_VecS:
+ __ pushl(Address(rsp, src_offset));
+ __ popl (Address(rsp, dst_offset));
+ break;
+ case Op_VecD:
+ __ pushl(Address(rsp, src_offset));
+ __ popl (Address(rsp, dst_offset));
+ __ pushl(Address(rsp, src_offset+4));
+ __ popl (Address(rsp, dst_offset+4));
+ break;
+ case Op_VecX:
+ __ movdqu(Address(rsp, -16), xmm0);
+ __ movdqu(xmm0, Address(rsp, src_offset));
+ __ movdqu(Address(rsp, dst_offset), xmm0);
+ __ movdqu(xmm0, Address(rsp, -16));
+ break;
+ case Op_VecY:
+ __ vmovdqu(Address(rsp, -32), xmm0);
+ __ vmovdqu(xmm0, Address(rsp, src_offset));
+ __ vmovdqu(Address(rsp, dst_offset), xmm0);
+ __ vmovdqu(xmm0, Address(rsp, -32));
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+ int size = __ offset() - offset;
+ assert(size == calc_size, "incorrect size calculattion");
+ return size;
+#ifndef PRODUCT
+ } else if (!do_size) {
+ switch (ireg) {
+ case Op_VecS:
+ st->print("pushl [rsp + #%d]\t# 32-bit mem-mem spill\n\t"
+ "popl [rsp + #%d]",
+ src_offset, dst_offset);
+ break;
+ case Op_VecD:
+ st->print("pushl [rsp + #%d]\t# 64-bit mem-mem spill\n\t"
+ "popq [rsp + #%d]\n\t"
+ "pushl [rsp + #%d]\n\t"
+ "popq [rsp + #%d]",
+ src_offset, dst_offset, src_offset+4, dst_offset+4);
+ break;
+ case Op_VecX:
+ st->print("movdqu [rsp - #16], xmm0\t# 128-bit mem-mem spill\n\t"
+ "movdqu xmm0, [rsp + #%d]\n\t"
+ "movdqu [rsp + #%d], xmm0\n\t"
+ "movdqu xmm0, [rsp - #16]",
+ src_offset, dst_offset);
+ break;
+ case Op_VecY:
+ st->print("vmovdqu [rsp - #32], xmm0\t# 256-bit mem-mem spill\n\t"
+ "vmovdqu xmm0, [rsp + #%d]\n\t"
+ "vmovdqu [rsp + #%d], xmm0\n\t"
+ "vmovdqu xmm0, [rsp - #32]",
+ src_offset, dst_offset);
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+#endif
+ }
+ return calc_size;
+}
+
uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bool do_size, outputStream* st ) const {
// Get registers to move
OptoReg::Name src_second = ra_->get_reg_second(in(1));
@@ -923,6 +979,29 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
if( src_first == dst_first && src_second == dst_second )
return size; // Self copy, no move
+ if (bottom_type()->isa_vect() != NULL) {
+ uint ireg = ideal_reg();
+ assert((src_first_rc != rc_int && dst_first_rc != rc_int), "sanity");
+ assert((src_first_rc != rc_float && dst_first_rc != rc_float), "sanity");
+ assert((ireg == Op_VecS || ireg == Op_VecD || ireg == Op_VecX || ireg == Op_VecY), "sanity");
+ if( src_first_rc == rc_stack && dst_first_rc == rc_stack ) {
+ // mem -> mem
+ int src_offset = ra_->reg2offset(src_first);
+ int dst_offset = ra_->reg2offset(dst_first);
+ return vec_stack_to_stack_helper(cbuf, do_size, src_offset, dst_offset, ireg, st);
+ } else if (src_first_rc == rc_xmm && dst_first_rc == rc_xmm ) {
+ return vec_mov_helper(cbuf, do_size, src_first, dst_first, src_second, dst_second, ireg, st);
+ } else if (src_first_rc == rc_xmm && dst_first_rc == rc_stack ) {
+ int stack_offset = ra_->reg2offset(dst_first);
+ return vec_spill_helper(cbuf, do_size, false, stack_offset, src_first, ireg, st);
+ } else if (src_first_rc == rc_stack && dst_first_rc == rc_xmm ) {
+ int stack_offset = ra_->reg2offset(src_first);
+ return vec_spill_helper(cbuf, do_size, true, stack_offset, dst_first, ireg, st);
+ } else {
+ ShouldNotReachHere();
+ }
+ }
+
// --------------------------------------
// Check for mem-mem move. push/pop to move.
if( src_first_rc == rc_stack && dst_first_rc == rc_stack ) {
@@ -1313,16 +1392,6 @@ const bool Matcher::convL2FSupported(void) {
return true;
}
-// Vector width in bytes
-const uint Matcher::vector_width_in_bytes(void) {
- return UseSSE >= 2 ? 8 : 0;
-}
-
-// Vector ideal reg
-const uint Matcher::vector_ideal_reg(void) {
- return Op_RegD;
-}
-
// Is this branch offset short enough that a short branch can be used?
//
// NOTE: If the platform does not provide any short branch variants, then
@@ -1452,7 +1521,7 @@ const bool Matcher::int_in_long = false;
// arguments in those registers not be available to the callee.
bool Matcher::can_be_java_arg( int reg ) {
if( reg == ECX_num || reg == EDX_num ) return true;
- if( (reg == XMM0a_num || reg == XMM1a_num) && UseSSE>=1 ) return true;
+ if( (reg == XMM0_num || reg == XMM1_num ) && UseSSE>=1 ) return true;
if( (reg == XMM0b_num || reg == XMM1b_num) && UseSSE>=2 ) return true;
return false;
}
@@ -1565,16 +1634,16 @@ encode %{
emit_opcode(cbuf,0x66);
%}
- enc_class RegReg (eRegI dst, eRegI src) %{ // RegReg(Many)
+ enc_class RegReg (rRegI dst, rRegI src) %{ // RegReg(Many)
emit_rm(cbuf, 0x3, $dst$$reg, $src$$reg);
%}
- enc_class OpcRegReg (immI opcode, eRegI dst, eRegI src) %{ // OpcRegReg(Many)
+ enc_class OpcRegReg (immI opcode, rRegI dst, rRegI src) %{ // OpcRegReg(Many)
emit_opcode(cbuf,$opcode$$constant);
emit_rm(cbuf, 0x3, $dst$$reg, $src$$reg);
%}
- enc_class mov_r32_imm0( eRegI dst ) %{
+ enc_class mov_r32_imm0( rRegI dst ) %{
emit_opcode( cbuf, 0xB8 + $dst$$reg ); // 0xB8+ rd -- MOV r32 ,imm32
emit_d32 ( cbuf, 0x0 ); // imm32==0x0
%}
@@ -1621,7 +1690,7 @@ encode %{
%}
// Dense encoding for older common ops
- enc_class Opc_plus(immI opcode, eRegI reg) %{
+ enc_class Opc_plus(immI opcode, rRegI reg) %{
emit_opcode(cbuf, $opcode$$constant + $reg$$reg);
%}
@@ -1637,7 +1706,7 @@ encode %{
}
%}
- enc_class OpcSErm (eRegI dst, immI imm) %{ // OpcSEr/m
+ enc_class OpcSErm (rRegI dst, immI imm) %{ // OpcSEr/m
// Emit primary opcode and set sign-extend bit
// Check for 8-bit immediate, and set sign extend bit in opcode
if (($imm$$constant >= -128) && ($imm$$constant <= 127)) {
@@ -1682,7 +1751,7 @@ encode %{
else emit_d32(cbuf,con);
%}
- enc_class OpcSReg (eRegI dst) %{ // BSWAP
+ enc_class OpcSReg (rRegI dst) %{ // BSWAP
emit_cc(cbuf, $secondary, $dst$$reg );
%}
@@ -1700,7 +1769,7 @@ encode %{
emit_rm(cbuf, 0x3, destlo, desthi);
%}
- enc_class RegOpc (eRegI div) %{ // IDIV, IMOD, JMP indirect, ...
+ enc_class RegOpc (rRegI div) %{ // IDIV, IMOD, JMP indirect, ...
emit_rm(cbuf, 0x3, $secondary, $div$$reg );
%}
@@ -1891,20 +1960,20 @@ encode %{
// runtime_call_Relocation::spec(), RELOC_IMM32 );
// %}
- enc_class RegOpcImm (eRegI dst, immI8 shift) %{ // SHL, SAR, SHR
+ enc_class RegOpcImm (rRegI dst, immI8 shift) %{ // SHL, SAR, SHR
$$$emit8$primary;
emit_rm(cbuf, 0x3, $secondary, $dst$$reg);
$$$emit8$shift$$constant;
%}
- enc_class LdImmI (eRegI dst, immI src) %{ // Load Immediate
+ enc_class LdImmI (rRegI dst, immI src) %{ // Load Immediate
// Load immediate does not have a zero or sign extended version
// for 8-bit immediates
emit_opcode(cbuf, 0xB8 + $dst$$reg);
$$$emit32$src$$constant;
%}
- enc_class LdImmP (eRegI dst, immI src) %{ // Load Immediate
+ enc_class LdImmP (rRegI dst, immI src) %{ // Load Immediate
// Load immediate does not have a zero or sign extended version
// for 8-bit immediates
emit_opcode(cbuf, $primary + $dst$$reg);
@@ -1943,15 +2012,15 @@ encode %{
// Encode a reg-reg copy. If it is useless, then empty encoding.
- enc_class enc_Copy( eRegI dst, eRegI src ) %{
+ enc_class enc_Copy( rRegI dst, rRegI src ) %{
encode_Copy( cbuf, $dst$$reg, $src$$reg );
%}
- enc_class enc_CopyL_Lo( eRegI dst, eRegL src ) %{
+ enc_class enc_CopyL_Lo( rRegI dst, eRegL src ) %{
encode_Copy( cbuf, $dst$$reg, $src$$reg );
%}
- enc_class RegReg (eRegI dst, eRegI src) %{ // RegReg(Many)
+ enc_class RegReg (rRegI dst, rRegI src) %{ // RegReg(Many)
emit_rm(cbuf, 0x3, $dst$$reg, $src$$reg);
%}
@@ -1973,7 +2042,7 @@ encode %{
emit_rm(cbuf, 0x3, HIGH_FROM_LOW($dst$$reg), HIGH_FROM_LOW($src$$reg));
%}
- enc_class RegReg_HiLo( eRegL src, eRegI dst ) %{
+ enc_class RegReg_HiLo( eRegL src, rRegI dst ) %{
emit_rm(cbuf, 0x3, $dst$$reg, HIGH_FROM_LOW($src$$reg));
%}
@@ -2068,7 +2137,7 @@ encode %{
cbuf.set_insts_mark(); // Mark start of opcode for reloc info in mem operand
%}
- enc_class RegMem (eRegI ereg, memory mem) %{ // emit_reg_mem
+ enc_class RegMem (rRegI ereg, memory mem) %{ // emit_reg_mem
int reg_encoding = $ereg$$reg;
int base = $mem$$base;
int index = $mem$$index;
@@ -2132,7 +2201,7 @@ encode %{
// Clone of RegMem but accepts an extra parameter to access each
// half of a double in memory; it never needs relocation info.
- enc_class Mov_MemD_half_to_Reg (immI opcode, memory mem, immI disp_for_half, eRegI rm_reg) %{
+ enc_class Mov_MemD_half_to_Reg (immI opcode, memory mem, immI disp_for_half, rRegI rm_reg) %{
emit_opcode(cbuf,$opcode$$constant);
int reg_encoding = $rm_reg$$reg;
int base = $mem$$base;
@@ -2168,7 +2237,7 @@ encode %{
encode_RegMem(cbuf, rm_byte_opcode, base, index, scale, displace, disp_is_oop);
%}
- enc_class RegLea (eRegI dst, eRegI src0, immI src1 ) %{ // emit_reg_lea
+ enc_class RegLea (rRegI dst, rRegI src0, immI src1 ) %{ // emit_reg_lea
int reg_encoding = $dst$$reg;
int base = $src0$$reg; // 0xFFFFFFFF indicates no base
int index = 0x04; // 0x04 indicates no index
@@ -2178,7 +2247,7 @@ encode %{
encode_RegMem(cbuf, reg_encoding, base, index, scale, displace, disp_is_oop);
%}
- enc_class min_enc (eRegI dst, eRegI src) %{ // MIN
+ enc_class min_enc (rRegI dst, rRegI src) %{ // MIN
// Compare dst,src
emit_opcode(cbuf,0x3B);
emit_rm(cbuf, 0x3, $dst$$reg, $src$$reg);
@@ -2190,7 +2259,7 @@ encode %{
emit_rm(cbuf, 0x3, $dst$$reg, $src$$reg);
%}
- enc_class max_enc (eRegI dst, eRegI src) %{ // MAX
+ enc_class max_enc (rRegI dst, rRegI src) %{ // MAX
// Compare dst,src
emit_opcode(cbuf,0x3B);
emit_rm(cbuf, 0x3, $dst$$reg, $src$$reg);
@@ -2221,7 +2290,7 @@ encode %{
encode_RegMem(cbuf, reg_encoding, base, index, scale, displace, disp_is_oop);
%}
- enc_class neg_reg(eRegI dst) %{
+ enc_class neg_reg(rRegI dst) %{
// NEG $dst
emit_opcode(cbuf,0xF7);
emit_rm(cbuf, 0x3, 0x03, $dst$$reg );
@@ -2251,7 +2320,7 @@ encode %{
emit_rm(cbuf, 0x3, $p$$reg, tmpReg);
%}
- enc_class enc_cmpLTP_mem(eRegI p, eRegI q, memory mem, eCXRegI tmp) %{ // cadd_cmpLT
+ enc_class enc_cmpLTP_mem(rRegI p, rRegI q, memory mem, eCXRegI tmp) %{ // cadd_cmpLT
int tmpReg = $tmp$$reg;
// SUB $p,$q
@@ -2390,12 +2459,12 @@ encode %{
%}
// Special case for moving an integer register to a stack slot.
- enc_class OpcPRegSS( stackSlotI dst, eRegI src ) %{ // RegSS
+ enc_class OpcPRegSS( stackSlotI dst, rRegI src ) %{ // RegSS
store_to_stackslot( cbuf, $primary, $src$$reg, $dst$$disp );
%}
// Special case for moving a register to a stack slot.
- enc_class RegSS( stackSlotI dst, eRegI src ) %{ // RegSS
+ enc_class RegSS( stackSlotI dst, rRegI src ) %{ // RegSS
// Opcode already emitted
emit_rm( cbuf, 0x02, $src$$reg, ESP_enc ); // R/M byte
emit_rm( cbuf, 0x00, ESP_enc, ESP_enc); // SIB byte
@@ -2640,7 +2709,7 @@ encode %{
// equal_result = 0;
// nan_result = -1;
- enc_class CmpF_Result(eRegI dst) %{
+ enc_class CmpF_Result(rRegI dst) %{
// fnstsw_ax();
emit_opcode( cbuf, 0xDF);
emit_opcode( cbuf, 0xE0);
@@ -2685,7 +2754,7 @@ encode %{
// done:
%}
- enc_class convert_int_long( regL dst, eRegI src ) %{
+ enc_class convert_int_long( regL dst, rRegI src ) %{
// mov $dst.lo,$src
int dst_encoding = $dst$$reg;
int src_encoding = $src$$reg;
@@ -2754,7 +2823,7 @@ encode %{
emit_rm( cbuf, 0x3, 0x4, $src$$reg);
%}
- enc_class long_multiply( eADXRegL dst, eRegL src, eRegI tmp ) %{
+ enc_class long_multiply( eADXRegL dst, eRegL src, rRegI tmp ) %{
// Basic idea: lo(result) = lo(x_lo * y_lo)
// hi(result) = hi(x_lo * y_lo) + lo(x_hi * y_lo) + lo(x_lo * y_hi)
// MOV $tmp,$src.lo
@@ -2780,7 +2849,7 @@ encode %{
emit_rm( cbuf, 0x3, HIGH_FROM_LOW($dst$$reg), $tmp$$reg );
%}
- enc_class long_multiply_con( eADXRegL dst, immL_127 src, eRegI tmp ) %{
+ enc_class long_multiply_con( eADXRegL dst, immL_127 src, rRegI tmp ) %{
// Basic idea: lo(result) = lo(src * y_lo)
// hi(result) = hi(src * y_lo) + lo(src * y_hi)
// IMUL $tmp,EDX,$src
@@ -2836,7 +2905,7 @@ encode %{
emit_d8(cbuf, 4*4);
%}
- enc_class long_cmp_flags0( eRegL src, eRegI tmp ) %{
+ enc_class long_cmp_flags0( eRegL src, rRegI tmp ) %{
// MOV $tmp,$src.lo
emit_opcode(cbuf, 0x8B);
emit_rm(cbuf, 0x3, $tmp$$reg, $src$$reg);
@@ -2857,7 +2926,7 @@ encode %{
emit_rm(cbuf, 0x3, HIGH_FROM_LOW($src1$$reg), HIGH_FROM_LOW($src2$$reg) );
%}
- enc_class long_cmp_flags2( eRegL src1, eRegL src2, eRegI tmp ) %{
+ enc_class long_cmp_flags2( eRegL src1, eRegL src2, rRegI tmp ) %{
// CMP $src1.lo,$src2.lo\t! Long compare; set flags for low bits
emit_opcode( cbuf, 0x3B );
emit_rm(cbuf, 0x3, $src1$$reg, $src2$$reg );
@@ -2869,7 +2938,7 @@ encode %{
emit_rm(cbuf, 0x3, $tmp$$reg, HIGH_FROM_LOW($src2$$reg) );
%}
- enc_class long_cmp_flags3( eRegL src, eRegI tmp ) %{
+ enc_class long_cmp_flags3( eRegL src, rRegI tmp ) %{
// XOR $tmp,$tmp
emit_opcode(cbuf,0x33); // XOR
emit_rm(cbuf,0x3, $tmp$$reg, $tmp$$reg);
@@ -3762,9 +3831,9 @@ frame %{
// in SSE2+ mode we want to keep the FPU stack clean so pretend
// that C functions return float and double results in XMM0.
if( ideal_reg == Op_RegD && UseSSE>=2 )
- return OptoRegPair(XMM0b_num,XMM0a_num);
+ return OptoRegPair(XMM0b_num,XMM0_num);
if( ideal_reg == Op_RegF && UseSSE>=2 )
- return OptoRegPair(OptoReg::Bad,XMM0a_num);
+ return OptoRegPair(OptoReg::Bad,XMM0_num);
return OptoRegPair(hi[ideal_reg],lo[ideal_reg]);
%}
@@ -3775,9 +3844,9 @@ frame %{
static int lo[Op_RegL+1] = { 0, 0, OptoReg::Bad, EAX_num, EAX_num, FPR1L_num, FPR1L_num, EAX_num };
static int hi[Op_RegL+1] = { 0, 0, OptoReg::Bad, OptoReg::Bad, OptoReg::Bad, OptoReg::Bad, FPR1H_num, EDX_num };
if( ideal_reg == Op_RegD && UseSSE>=2 )
- return OptoRegPair(XMM0b_num,XMM0a_num);
+ return OptoRegPair(XMM0b_num,XMM0_num);
if( ideal_reg == Op_RegF && UseSSE>=1 )
- return OptoRegPair(OptoReg::Bad,XMM0a_num);
+ return OptoRegPair(OptoReg::Bad,XMM0_num);
return OptoRegPair(hi[ideal_reg],lo[ideal_reg]);
%}
@@ -4147,8 +4216,8 @@ operand immI_65535() %{
// Register Operands
// Integer Register
-operand eRegI() %{
- constraint(ALLOC_IN_RC(e_reg));
+operand rRegI() %{
+ constraint(ALLOC_IN_RC(int_reg));
match(RegI);
match(xRegI);
match(eAXRegI);
@@ -4163,8 +4232,8 @@ operand eRegI() %{
%}
// Subset of Integer Register
-operand xRegI(eRegI reg) %{
- constraint(ALLOC_IN_RC(x_reg));
+operand xRegI(rRegI reg) %{
+ constraint(ALLOC_IN_RC(int_x_reg));
match(reg);
match(eAXRegI);
match(eBXRegI);
@@ -4179,7 +4248,7 @@ operand xRegI(eRegI reg) %{
operand eAXRegI(xRegI reg) %{
constraint(ALLOC_IN_RC(eax_reg));
match(reg);
- match(eRegI);
+ match(rRegI);
format %{ "EAX" %}
interface(REG_INTER);
@@ -4189,7 +4258,7 @@ operand eAXRegI(xRegI reg) %{
operand eBXRegI(xRegI reg) %{
constraint(ALLOC_IN_RC(ebx_reg));
match(reg);
- match(eRegI);
+ match(rRegI);
format %{ "EBX" %}
interface(REG_INTER);
@@ -4198,7 +4267,7 @@ operand eBXRegI(xRegI reg) %{
operand eCXRegI(xRegI reg) %{
constraint(ALLOC_IN_RC(ecx_reg));
match(reg);
- match(eRegI);
+ match(rRegI);
format %{ "ECX" %}
interface(REG_INTER);
@@ -4207,7 +4276,7 @@ operand eCXRegI(xRegI reg) %{
operand eDXRegI(xRegI reg) %{
constraint(ALLOC_IN_RC(edx_reg));
match(reg);
- match(eRegI);
+ match(rRegI);
format %{ "EDX" %}
interface(REG_INTER);
@@ -4216,7 +4285,7 @@ operand eDXRegI(xRegI reg) %{
operand eDIRegI(xRegI reg) %{
constraint(ALLOC_IN_RC(edi_reg));
match(reg);
- match(eRegI);
+ match(rRegI);
format %{ "EDI" %}
interface(REG_INTER);
@@ -4263,7 +4332,7 @@ operand ncxRegI() %{
operand eSIRegI(xRegI reg) %{
constraint(ALLOC_IN_RC(esi_reg));
match(reg);
- match(eRegI);
+ match(rRegI);
format %{ "ESI" %}
interface(REG_INTER);
@@ -4284,7 +4353,7 @@ operand anyRegP() %{
%}
operand eRegP() %{
- constraint(ALLOC_IN_RC(e_reg));
+ constraint(ALLOC_IN_RC(int_reg));
match(RegP);
match(eAXRegP);
match(eBXRegP);
@@ -4297,7 +4366,7 @@ operand eRegP() %{
// On windows95, EBP is not safe to use for implicit null tests.
operand eRegP_no_EBP() %{
- constraint(ALLOC_IN_RC(e_reg_no_rbp));
+ constraint(ALLOC_IN_RC(int_reg_no_rbp));
match(RegP);
match(eAXRegP);
match(eBXRegP);
@@ -4477,7 +4546,7 @@ operand flagsReg_long_LEGT() %{
// Float register operands
operand regDPR() %{
predicate( UseSSE < 2 );
- constraint(ALLOC_IN_RC(dbl_reg));
+ constraint(ALLOC_IN_RC(fp_dbl_reg));
match(RegD);
match(regDPR1);
match(regDPR2);
@@ -4487,7 +4556,7 @@ operand regDPR() %{
operand regDPR1(regDPR reg) %{
predicate( UseSSE < 2 );
- constraint(ALLOC_IN_RC(dbl_reg0));
+ constraint(ALLOC_IN_RC(fp_dbl_reg0));
match(reg);
format %{ "FPR1" %}
interface(REG_INTER);
@@ -4495,7 +4564,7 @@ operand regDPR1(regDPR reg) %{
operand regDPR2(regDPR reg) %{
predicate( UseSSE < 2 );
- constraint(ALLOC_IN_RC(dbl_reg1));
+ constraint(ALLOC_IN_RC(fp_dbl_reg1));
match(reg);
format %{ "FPR2" %}
interface(REG_INTER);
@@ -4503,45 +4572,16 @@ operand regDPR2(regDPR reg) %{
operand regnotDPR1(regDPR reg) %{
predicate( UseSSE < 2 );
- constraint(ALLOC_IN_RC(dbl_notreg0));
+ constraint(ALLOC_IN_RC(fp_dbl_notreg0));
match(reg);
format %{ %}
interface(REG_INTER);
%}
-// XMM Double register operands
-operand regD() %{
- predicate( UseSSE>=2 );
- constraint(ALLOC_IN_RC(xdb_reg));
- match(RegD);
- match(regD6);
- match(regD7);
- format %{ %}
- interface(REG_INTER);
-%}
-
-// XMM6 double register operands
-operand regD6(regD reg) %{
- predicate( UseSSE>=2 );
- constraint(ALLOC_IN_RC(xdb_reg6));
- match(reg);
- format %{ "XMM6" %}
- interface(REG_INTER);
-%}
-
-// XMM7 double register operands
-operand regD7(regD reg) %{
- predicate( UseSSE>=2 );
- constraint(ALLOC_IN_RC(xdb_reg7));
- match(reg);
- format %{ "XMM7" %}
- interface(REG_INTER);
-%}
-
// Float register operands
operand regFPR() %{
predicate( UseSSE < 2 );
- constraint(ALLOC_IN_RC(flt_reg));
+ constraint(ALLOC_IN_RC(fp_flt_reg));
match(RegF);
match(regFPR1);
format %{ %}
@@ -4551,21 +4591,30 @@ operand regFPR() %{
// Float register operands
operand regFPR1(regFPR reg) %{
predicate( UseSSE < 2 );
- constraint(ALLOC_IN_RC(flt_reg0));
+ constraint(ALLOC_IN_RC(fp_flt_reg0));
match(reg);
format %{ "FPR1" %}
interface(REG_INTER);
%}
-// XMM register operands
+// XMM Float register operands
operand regF() %{
predicate( UseSSE>=1 );
- constraint(ALLOC_IN_RC(xmm_reg));
+ constraint(ALLOC_IN_RC(float_reg));
match(RegF);
format %{ %}
interface(REG_INTER);
%}
+// XMM Double register operands
+operand regD() %{
+ predicate( UseSSE>=2 );
+ constraint(ALLOC_IN_RC(double_reg));
+ match(RegD);
+ format %{ %}
+ interface(REG_INTER);
+%}
+
//----------Memory Operands----------------------------------------------------
// Direct Memory Operand
@@ -4583,7 +4632,7 @@ operand direct(immP addr) %{
// Indirect Memory Operand
operand indirect(eRegP reg) %{
- constraint(ALLOC_IN_RC(e_reg));
+ constraint(ALLOC_IN_RC(int_reg));
match(reg);
format %{ "[$reg]" %}
@@ -4622,7 +4671,7 @@ operand indOffset32(eRegP reg, immI off) %{
%}
// Indirect Memory Plus Long Offset Operand
-operand indOffset32X(eRegI reg, immP off) %{
+operand indOffset32X(rRegI reg, immP off) %{
match(AddP off reg);
format %{ "[$reg + $off]" %}
@@ -4635,7 +4684,7 @@ operand indOffset32X(eRegI reg, immP off) %{
%}
// Indirect Memory Plus Index Register Plus Offset Operand
-operand indIndexOffset(eRegP reg, eRegI ireg, immI off) %{
+operand indIndexOffset(eRegP reg, rRegI ireg, immI off) %{
match(AddP (AddP reg ireg) off);
op_cost(10);
@@ -4649,7 +4698,7 @@ operand indIndexOffset(eRegP reg, eRegI ireg, immI off) %{
%}
// Indirect Memory Plus Index Register Plus Offset Operand
-operand indIndex(eRegP reg, eRegI ireg) %{
+operand indIndex(eRegP reg, rRegI ireg) %{
match(AddP reg ireg);
op_cost(10);
@@ -4667,7 +4716,7 @@ operand indIndex(eRegP reg, eRegI ireg) %{
// // -------------------------------------------------------------------------
// // Scaled Memory Operands
// // Indirect Memory Times Scale Plus Offset Operand
-// operand indScaleOffset(immP off, eRegI ireg, immI2 scale) %{
+// operand indScaleOffset(immP off, rRegI ireg, immI2 scale) %{
// match(AddP off (LShiftI ireg scale));
//
// op_cost(10);
@@ -4681,7 +4730,7 @@ operand indIndex(eRegP reg, eRegI ireg) %{
// %}
// Indirect Memory Times Scale Plus Index Register
-operand indIndexScale(eRegP reg, eRegI ireg, immI2 scale) %{
+operand indIndexScale(eRegP reg, rRegI ireg, immI2 scale) %{
match(AddP reg (LShiftI ireg scale));
op_cost(10);
@@ -4695,7 +4744,7 @@ operand indIndexScale(eRegP reg, eRegI ireg, immI2 scale) %{
%}
// Indirect Memory Times Scale Plus Index Register Plus Offset Operand
-operand indIndexScaleOffset(eRegP reg, immI off, eRegI ireg, immI2 scale) %{
+operand indIndexScaleOffset(eRegP reg, immI off, rRegI ireg, immI2 scale) %{
match(AddP (AddP reg (LShiftI ireg scale)) off);
op_cost(10);
@@ -4823,7 +4872,7 @@ operand stackSlotL(sRegL reg) %{
// Indirect Memory Operand
operand indirect_win95_safe(eRegP_no_EBP reg)
%{
- constraint(ALLOC_IN_RC(e_reg));
+ constraint(ALLOC_IN_RC(int_reg));
match(reg);
op_cost(100);
@@ -4867,7 +4916,7 @@ operand indOffset32_win95_safe(eRegP_no_EBP reg, immI off)
%}
// Indirect Memory Plus Index Register Plus Offset Operand
-operand indIndexOffset_win95_safe(eRegP_no_EBP reg, eRegI ireg, immI off)
+operand indIndexOffset_win95_safe(eRegP_no_EBP reg, rRegI ireg, immI off)
%{
match(AddP (AddP reg ireg) off);
@@ -4882,7 +4931,7 @@ operand indIndexOffset_win95_safe(eRegP_no_EBP reg, eRegI ireg, immI off)
%}
// Indirect Memory Times Scale Plus Index Register
-operand indIndexScale_win95_safe(eRegP_no_EBP reg, eRegI ireg, immI2 scale)
+operand indIndexScale_win95_safe(eRegP_no_EBP reg, rRegI ireg, immI2 scale)
%{
match(AddP reg (LShiftI ireg scale));
@@ -4897,7 +4946,7 @@ operand indIndexScale_win95_safe(eRegP_no_EBP reg, eRegI ireg, immI2 scale)
%}
// Indirect Memory Times Scale Plus Index Register Plus Offset Operand
-operand indIndexScaleOffset_win95_safe(eRegP_no_EBP reg, immI off, eRegI ireg, immI2 scale)
+operand indIndexScaleOffset_win95_safe(eRegP_no_EBP reg, immI off, rRegI ireg, immI2 scale)
%{
match(AddP (AddP reg (LShiftI ireg scale)) off);
@@ -5086,7 +5135,7 @@ pipe_desc(S0, S1, S2, S3, S4, S5);
// Or: _mem if it requires the big decoder and a memory unit.
// Integer ALU reg operation
-pipe_class ialu_reg(eRegI dst) %{
+pipe_class ialu_reg(rRegI dst) %{
single_instruction;
dst : S4(write);
dst : S3(read);
@@ -5104,7 +5153,7 @@ pipe_class ialu_reg_long(eRegL dst) %{
%}
// Integer ALU reg operation using big decoder
-pipe_class ialu_reg_fat(eRegI dst) %{
+pipe_class ialu_reg_fat(rRegI dst) %{
single_instruction;
dst : S4(write);
dst : S3(read);
@@ -5122,7 +5171,7 @@ pipe_class ialu_reg_long_fat(eRegL dst) %{
%}
// Integer ALU reg-reg operation
-pipe_class ialu_reg_reg(eRegI dst, eRegI src) %{
+pipe_class ialu_reg_reg(rRegI dst, rRegI src) %{
single_instruction;
dst : S4(write);
src : S3(read);
@@ -5140,7 +5189,7 @@ pipe_class ialu_reg_reg_long(eRegL dst, eRegL src) %{
%}
// Integer ALU reg-reg operation
-pipe_class ialu_reg_reg_fat(eRegI dst, memory src) %{
+pipe_class ialu_reg_reg_fat(rRegI dst, memory src) %{
single_instruction;
dst : S4(write);
src : S3(read);
@@ -5158,7 +5207,7 @@ pipe_class ialu_reg_reg_long_fat(eRegL dst, eRegL src) %{
%}
// Integer ALU reg-mem operation
-pipe_class ialu_reg_mem(eRegI dst, memory mem) %{
+pipe_class ialu_reg_mem(rRegI dst, memory mem) %{
single_instruction;
dst : S5(write);
mem : S3(read);
@@ -5187,7 +5236,7 @@ pipe_class ialu_mem(memory mem)
%}
// Integer Store to Memory
-pipe_class ialu_mem_reg(memory mem, eRegI src) %{
+pipe_class ialu_mem_reg(memory mem, rRegI src) %{
single_instruction;
mem : S3(read);
src : S5(read);
@@ -5216,7 +5265,7 @@ pipe_class ialu_mem_imm(memory mem) %{
%}
// Integer ALU0 reg-reg operation
-pipe_class ialu_reg_reg_alu0(eRegI dst, eRegI src) %{
+pipe_class ialu_reg_reg_alu0(rRegI dst, rRegI src) %{
single_instruction;
dst : S4(write);
src : S3(read);
@@ -5225,7 +5274,7 @@ pipe_class ialu_reg_reg_alu0(eRegI dst, eRegI src) %{
%}
// Integer ALU0 reg-mem operation
-pipe_class ialu_reg_mem_alu0(eRegI dst, memory mem) %{
+pipe_class ialu_reg_mem_alu0(rRegI dst, memory mem) %{
single_instruction;
dst : S5(write);
mem : S3(read);
@@ -5235,7 +5284,7 @@ pipe_class ialu_reg_mem_alu0(eRegI dst, memory mem) %{
%}
// Integer ALU reg-reg operation
-pipe_class ialu_cr_reg_reg(eFlagsReg cr, eRegI src1, eRegI src2) %{
+pipe_class ialu_cr_reg_reg(eFlagsReg cr, rRegI src1, rRegI src2) %{
single_instruction;
cr : S4(write);
src1 : S3(read);
@@ -5245,7 +5294,7 @@ pipe_class ialu_cr_reg_reg(eFlagsReg cr, eRegI src1, eRegI src2) %{
%}
// Integer ALU reg-imm operation
-pipe_class ialu_cr_reg_imm(eFlagsReg cr, eRegI src1) %{
+pipe_class ialu_cr_reg_imm(eFlagsReg cr, rRegI src1) %{
single_instruction;
cr : S4(write);
src1 : S3(read);
@@ -5254,7 +5303,7 @@ pipe_class ialu_cr_reg_imm(eFlagsReg cr, eRegI src1) %{
%}
// Integer ALU reg-mem operation
-pipe_class ialu_cr_reg_mem(eFlagsReg cr, eRegI src1, memory src2) %{
+pipe_class ialu_cr_reg_mem(eFlagsReg cr, rRegI src1, memory src2) %{
single_instruction;
cr : S4(write);
src1 : S3(read);
@@ -5265,7 +5314,7 @@ pipe_class ialu_cr_reg_mem(eFlagsReg cr, eRegI src1, memory src2) %{
%}
// Conditional move reg-reg
-pipe_class pipe_cmplt( eRegI p, eRegI q, eRegI y ) %{
+pipe_class pipe_cmplt( rRegI p, rRegI q, rRegI y ) %{
instruction_count(4);
y : S4(read);
q : S3(read);
@@ -5274,7 +5323,7 @@ pipe_class pipe_cmplt( eRegI p, eRegI q, eRegI y ) %{
%}
// Conditional move reg-reg
-pipe_class pipe_cmov_reg( eRegI dst, eRegI src, eFlagsReg cr ) %{
+pipe_class pipe_cmov_reg( rRegI dst, rRegI src, eFlagsReg cr ) %{
single_instruction;
dst : S4(write);
src : S3(read);
@@ -5283,7 +5332,7 @@ pipe_class pipe_cmov_reg( eRegI dst, eRegI src, eFlagsReg cr ) %{
%}
// Conditional move reg-mem
-pipe_class pipe_cmov_mem( eFlagsReg cr, eRegI dst, memory src) %{
+pipe_class pipe_cmov_mem( eFlagsReg cr, rRegI dst, memory src) %{
single_instruction;
dst : S4(write);
src : S3(read);
@@ -5534,7 +5583,7 @@ define %{
// in the encode section of the architecture description.
//----------BSWAP-Instruction--------------------------------------------------
-instruct bytes_reverse_int(eRegI dst) %{
+instruct bytes_reverse_int(rRegI dst) %{
match(Set dst (ReverseBytesI dst));
format %{ "BSWAP $dst" %}
@@ -5555,7 +5604,7 @@ instruct bytes_reverse_long(eRegL dst) %{
ins_pipe( ialu_reg_reg);
%}
-instruct bytes_reverse_unsigned_short(eRegI dst, eFlagsReg cr) %{
+instruct bytes_reverse_unsigned_short(rRegI dst, eFlagsReg cr) %{
match(Set dst (ReverseBytesUS dst));
effect(KILL cr);
@@ -5568,7 +5617,7 @@ instruct bytes_reverse_unsigned_short(eRegI dst, eFlagsReg cr) %{
ins_pipe( ialu_reg );
%}
-instruct bytes_reverse_short(eRegI dst, eFlagsReg cr) %{
+instruct bytes_reverse_short(rRegI dst, eFlagsReg cr) %{
match(Set dst (ReverseBytesS dst));
effect(KILL cr);
@@ -5584,7 +5633,7 @@ instruct bytes_reverse_short(eRegI dst, eFlagsReg cr) %{
//---------- Zeros Count Instructions ------------------------------------------
-instruct countLeadingZerosI(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct countLeadingZerosI(rRegI dst, rRegI src, eFlagsReg cr) %{
predicate(UseCountLeadingZerosInstruction);
match(Set dst (CountLeadingZerosI src));
effect(KILL cr);
@@ -5596,7 +5645,7 @@ instruct countLeadingZerosI(eRegI dst, eRegI src, eFlagsReg cr) %{
ins_pipe(ialu_reg);
%}
-instruct countLeadingZerosI_bsr(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct countLeadingZerosI_bsr(rRegI dst, rRegI src, eFlagsReg cr) %{
predicate(!UseCountLeadingZerosInstruction);
match(Set dst (CountLeadingZerosI src));
effect(KILL cr);
@@ -5621,7 +5670,7 @@ instruct countLeadingZerosI_bsr(eRegI dst, eRegI src, eFlagsReg cr) %{
ins_pipe(ialu_reg);
%}
-instruct countLeadingZerosL(eRegI dst, eRegL src, eFlagsReg cr) %{
+instruct countLeadingZerosL(rRegI dst, eRegL src, eFlagsReg cr) %{
predicate(UseCountLeadingZerosInstruction);
match(Set dst (CountLeadingZerosL src));
effect(TEMP dst, KILL cr);
@@ -5644,7 +5693,7 @@ instruct countLeadingZerosL(eRegI dst, eRegL src, eFlagsReg cr) %{
ins_pipe(ialu_reg);
%}
-instruct countLeadingZerosL_bsr(eRegI dst, eRegL src, eFlagsReg cr) %{
+instruct countLeadingZerosL_bsr(rRegI dst, eRegL src, eFlagsReg cr) %{
predicate(!UseCountLeadingZerosInstruction);
match(Set dst (CountLeadingZerosL src));
effect(TEMP dst, KILL cr);
@@ -5680,7 +5729,7 @@ instruct countLeadingZerosL_bsr(eRegI dst, eRegL src, eFlagsReg cr) %{
ins_pipe(ialu_reg);
%}
-instruct countTrailingZerosI(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct countTrailingZerosI(rRegI dst, rRegI src, eFlagsReg cr) %{
match(Set dst (CountTrailingZerosI src));
effect(KILL cr);
@@ -5699,7 +5748,7 @@ instruct countTrailingZerosI(eRegI dst, eRegI src, eFlagsReg cr) %{
ins_pipe(ialu_reg);
%}
-instruct countTrailingZerosL(eRegI dst, eRegL src, eFlagsReg cr) %{
+instruct countTrailingZerosL(rRegI dst, eRegL src, eFlagsReg cr) %{
match(Set dst (CountTrailingZerosL src));
effect(TEMP dst, KILL cr);
@@ -5731,7 +5780,7 @@ instruct countTrailingZerosL(eRegI dst, eRegL src, eFlagsReg cr) %{
//---------- Population Count Instructions -------------------------------------
-instruct popCountI(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct popCountI(rRegI dst, rRegI src, eFlagsReg cr) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountI src));
effect(KILL cr);
@@ -5743,7 +5792,7 @@ instruct popCountI(eRegI dst, eRegI src, eFlagsReg cr) %{
ins_pipe(ialu_reg);
%}
-instruct popCountI_mem(eRegI dst, memory mem, eFlagsReg cr) %{
+instruct popCountI_mem(rRegI dst, memory mem, eFlagsReg cr) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountI (LoadI mem)));
effect(KILL cr);
@@ -5756,7 +5805,7 @@ instruct popCountI_mem(eRegI dst, memory mem, eFlagsReg cr) %{
%}
// Note: Long.bitCount(long) returns an int.
-instruct popCountL(eRegI dst, eRegL src, eRegI tmp, eFlagsReg cr) %{
+instruct popCountL(rRegI dst, eRegL src, rRegI tmp, eFlagsReg cr) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountL src));
effect(KILL cr, TEMP tmp, TEMP dst);
@@ -5773,7 +5822,7 @@ instruct popCountL(eRegI dst, eRegL src, eRegI tmp, eFlagsReg cr) %{
%}
// Note: Long.bitCount(long) returns an int.
-instruct popCountL_mem(eRegI dst, memory mem, eRegI tmp, eFlagsReg cr) %{
+instruct popCountL_mem(rRegI dst, memory mem, rRegI tmp, eFlagsReg cr) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountL (LoadL mem)));
effect(KILL cr, TEMP tmp, TEMP dst);
@@ -5877,7 +5926,7 @@ instruct loadUB2L_immI8(eRegL dst, memory mem, immI8 mask, eFlagsReg cr) %{
%}
// Load Short (16bit signed)
-instruct loadS(eRegI dst, memory mem) %{
+instruct loadS(rRegI dst, memory mem) %{
match(Set dst (LoadS mem));
ins_cost(125);
@@ -5891,7 +5940,7 @@ instruct loadS(eRegI dst, memory mem) %{
%}
// Load Short (16 bit signed) to Byte (8 bit signed)
-instruct loadS2B(eRegI dst, memory mem, immI_24 twentyfour) %{
+instruct loadS2B(rRegI dst, memory mem, immI_24 twentyfour) %{
match(Set dst (RShiftI (LShiftI (LoadS mem) twentyfour) twentyfour));
ins_cost(125);
@@ -5922,7 +5971,7 @@ instruct loadS2L(eRegL dst, memory mem, eFlagsReg cr) %{
%}
// Load Unsigned Short/Char (16bit unsigned)
-instruct loadUS(eRegI dst, memory mem) %{
+instruct loadUS(rRegI dst, memory mem) %{
match(Set dst (LoadUS mem));
ins_cost(125);
@@ -5936,7 +5985,7 @@ instruct loadUS(eRegI dst, memory mem) %{
%}
// Load Unsigned Short/Char (16 bit UNsigned) to Byte (8 bit signed)
-instruct loadUS2B(eRegI dst, memory mem, immI_24 twentyfour) %{
+instruct loadUS2B(rRegI dst, memory mem, immI_24 twentyfour) %{
match(Set dst (RShiftI (LShiftI (LoadUS mem) twentyfour) twentyfour));
ins_cost(125);
@@ -5997,7 +6046,7 @@ instruct loadUS2L_immI16(eRegL dst, memory mem, immI16 mask, eFlagsReg cr) %{
%}
// Load Integer
-instruct loadI(eRegI dst, memory mem) %{
+instruct loadI(rRegI dst, memory mem) %{
match(Set dst (LoadI mem));
ins_cost(125);
@@ -6011,7 +6060,7 @@ instruct loadI(eRegI dst, memory mem) %{
%}
// Load Integer (32 bit signed) to Byte (8 bit signed)
-instruct loadI2B(eRegI dst, memory mem, immI_24 twentyfour) %{
+instruct loadI2B(rRegI dst, memory mem, immI_24 twentyfour) %{
match(Set dst (RShiftI (LShiftI (LoadI mem) twentyfour) twentyfour));
ins_cost(125);
@@ -6023,7 +6072,7 @@ instruct loadI2B(eRegI dst, memory mem, immI_24 twentyfour) %{
%}
// Load Integer (32 bit signed) to Unsigned Byte (8 bit UNsigned)
-instruct loadI2UB(eRegI dst, memory mem, immI_255 mask) %{
+instruct loadI2UB(rRegI dst, memory mem, immI_255 mask) %{
match(Set dst (AndI (LoadI mem) mask));
ins_cost(125);
@@ -6035,7 +6084,7 @@ instruct loadI2UB(eRegI dst, memory mem, immI_255 mask) %{
%}
// Load Integer (32 bit signed) to Short (16 bit signed)
-instruct loadI2S(eRegI dst, memory mem, immI_16 sixteen) %{
+instruct loadI2S(rRegI dst, memory mem, immI_16 sixteen) %{
match(Set dst (RShiftI (LShiftI (LoadI mem) sixteen) sixteen));
ins_cost(125);
@@ -6047,7 +6096,7 @@ instruct loadI2S(eRegI dst, memory mem, immI_16 sixteen) %{
%}
// Load Integer (32 bit signed) to Unsigned Short/Char (16 bit UNsigned)
-instruct loadI2US(eRegI dst, memory mem, immI_65535 mask) %{
+instruct loadI2US(rRegI dst, memory mem, immI_65535 mask) %{
match(Set dst (AndI (LoadI mem) mask));
ins_cost(125);
@@ -6208,7 +6257,7 @@ instruct loadLX_reg_volatile(eRegL dst, memory mem, regD tmp) %{
%}
// Load Range
-instruct loadRange(eRegI dst, memory mem) %{
+instruct loadRange(rRegI dst, memory mem) %{
match(Set dst (LoadRange mem));
ins_cost(125);
@@ -6305,66 +6354,6 @@ instruct loadFPR(regFPR dst, memory mem) %{
ins_pipe( fpu_reg_mem );
%}
-// Load Aligned Packed Byte to XMM register
-instruct loadA8B(regD dst, memory mem) %{
- predicate(UseSSE>=1);
- match(Set dst (Load8B mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed8B" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Load Aligned Packed Short to XMM register
-instruct loadA4S(regD dst, memory mem) %{
- predicate(UseSSE>=1);
- match(Set dst (Load4S mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed4S" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Load Aligned Packed Char to XMM register
-instruct loadA4C(regD dst, memory mem) %{
- predicate(UseSSE>=1);
- match(Set dst (Load4C mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed4C" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Load Aligned Packed Integer to XMM register
-instruct load2IU(regD dst, memory mem) %{
- predicate(UseSSE>=1);
- match(Set dst (Load2I mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed2I" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Load Aligned Packed Single to XMM
-instruct loadA2F(regD dst, memory mem) %{
- predicate(UseSSE>=1);
- match(Set dst (Load2F mem));
- ins_cost(145);
- format %{ "MOVQ $dst,$mem\t! packed2F" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
// Load Effective Address
instruct leaP8(eRegP dst, indOffset8 mem) %{
match(Set dst mem);
@@ -6417,7 +6406,7 @@ instruct leaPIdxScaleOff(eRegP dst, indIndexScaleOffset mem) %{
%}
// Load Constant
-instruct loadConI(eRegI dst, immI src) %{
+instruct loadConI(rRegI dst, immI src) %{
match(Set dst src);
format %{ "MOV $dst,$src" %}
@@ -6426,7 +6415,7 @@ instruct loadConI(eRegI dst, immI src) %{
%}
// Load Constant zero
-instruct loadConI0(eRegI dst, immI0 src, eFlagsReg cr) %{
+instruct loadConI0(rRegI dst, immI0 src, eFlagsReg cr) %{
match(Set dst src);
effect(KILL cr);
@@ -6594,7 +6583,7 @@ instruct loadConD0(regD dst, immD0 src) %{
%}
// Load Stack Slot
-instruct loadSSI(eRegI dst, stackSlotI src) %{
+instruct loadSSI(rRegI dst, stackSlotI src) %{
match(Set dst src);
ins_cost(125);
@@ -6821,7 +6810,7 @@ instruct storeB(memory mem, xRegI src) %{
%}
// Store Char/Short
-instruct storeC(memory mem, eRegI src) %{
+instruct storeC(memory mem, rRegI src) %{
match(Set mem (StoreC mem src));
ins_cost(125);
@@ -6832,7 +6821,7 @@ instruct storeC(memory mem, eRegI src) %{
%}
// Store Integer
-instruct storeI(memory mem, eRegI src) %{
+instruct storeI(memory mem, rRegI src) %{
match(Set mem (StoreI mem src));
ins_cost(125);
@@ -6976,42 +6965,6 @@ instruct storeImmB(memory mem, immI8 src) %{
ins_pipe( ialu_mem_imm );
%}
-// Store Aligned Packed Byte XMM register to memory
-instruct storeA8B(memory mem, regD src) %{
- predicate(UseSSE>=1);
- match(Set mem (Store8B mem src));
- ins_cost(145);
- format %{ "MOVQ $mem,$src\t! packed8B" %}
- ins_encode %{
- __ movq($mem$$Address, $src$$XMMRegister);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Store Aligned Packed Char/Short XMM register to memory
-instruct storeA4C(memory mem, regD src) %{
- predicate(UseSSE>=1);
- match(Set mem (Store4C mem src));
- ins_cost(145);
- format %{ "MOVQ $mem,$src\t! packed4C" %}
- ins_encode %{
- __ movq($mem$$Address, $src$$XMMRegister);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Store Aligned Packed Integer XMM register to memory
-instruct storeA2I(memory mem, regD src) %{
- predicate(UseSSE>=1);
- match(Set mem (Store2I mem src));
- ins_cost(145);
- format %{ "MOVQ $mem,$src\t! packed2I" %}
- ins_encode %{
- __ movq($mem$$Address, $src$$XMMRegister);
- %}
- ins_pipe( pipe_slow );
-%}
-
// Store CMS card-mark Immediate
instruct storeImmCM(memory mem, immI8 src) %{
match(Set mem (StoreCM mem src));
@@ -7073,18 +7026,6 @@ instruct storeF(memory mem, regF src) %{
ins_pipe( pipe_slow );
%}
-// Store Aligned Packed Single Float XMM register to memory
-instruct storeA2F(memory mem, regD src) %{
- predicate(UseSSE>=1);
- match(Set mem (Store2F mem src));
- ins_cost(145);
- format %{ "MOVQ $mem,$src\t! packed2F" %}
- ins_encode %{
- __ movq($mem$$Address, $src$$XMMRegister);
- %}
- ins_pipe( pipe_slow );
-%}
-
// Store Float
instruct storeFPR( memory mem, regFPR1 src) %{
predicate(UseSSE==0);
@@ -7146,7 +7087,7 @@ instruct storeF_imm( memory mem, immF src) %{
%}
// Store Integer to stack slot
-instruct storeSSI(stackSlotI dst, eRegI src) %{
+instruct storeSSI(stackSlotI dst, rRegI src) %{
match(Set dst src);
ins_cost(100);
@@ -7271,7 +7212,7 @@ instruct castX2P(eAXRegP dst, eAXRegI src) %{
ins_pipe(empty);
%}
-instruct castP2X(eRegI dst, eRegP src ) %{
+instruct castP2X(rRegI dst, eRegP src ) %{
match(Set dst (CastP2X src));
ins_cost(50);
format %{ "MOV $dst, $src\t# CastP2X" %}
@@ -7281,7 +7222,7 @@ instruct castP2X(eRegI dst, eRegP src ) %{
//----------Conditional Move---------------------------------------------------
// Conditional move
-instruct jmovI_reg(cmpOp cop, eFlagsReg cr, eRegI dst, eRegI src) %{
+instruct jmovI_reg(cmpOp cop, eFlagsReg cr, rRegI dst, rRegI src) %{
predicate(!VM_Version::supports_cmov() );
match(Set dst (CMoveI (Binary cop cr) (Binary dst src)));
ins_cost(200);
@@ -7298,7 +7239,7 @@ instruct jmovI_reg(cmpOp cop, eFlagsReg cr, eRegI dst, eRegI src) %{
ins_pipe( pipe_cmov_reg );
%}
-instruct jmovI_regU(cmpOpU cop, eFlagsRegU cr, eRegI dst, eRegI src) %{
+instruct jmovI_regU(cmpOpU cop, eFlagsRegU cr, rRegI dst, rRegI src) %{
predicate(!VM_Version::supports_cmov() );
match(Set dst (CMoveI (Binary cop cr) (Binary dst src)));
ins_cost(200);
@@ -7315,7 +7256,7 @@ instruct jmovI_regU(cmpOpU cop, eFlagsRegU cr, eRegI dst, eRegI src) %{
ins_pipe( pipe_cmov_reg );
%}
-instruct cmovI_reg(eRegI dst, eRegI src, eFlagsReg cr, cmpOp cop ) %{
+instruct cmovI_reg(rRegI dst, rRegI src, eFlagsReg cr, cmpOp cop ) %{
predicate(VM_Version::supports_cmov() );
match(Set dst (CMoveI (Binary cop cr) (Binary dst src)));
ins_cost(200);
@@ -7325,7 +7266,7 @@ instruct cmovI_reg(eRegI dst, eRegI src, eFlagsReg cr, cmpOp cop ) %{
ins_pipe( pipe_cmov_reg );
%}
-instruct cmovI_regU( cmpOpU cop, eFlagsRegU cr, eRegI dst, eRegI src ) %{
+instruct cmovI_regU( cmpOpU cop, eFlagsRegU cr, rRegI dst, rRegI src ) %{
predicate(VM_Version::supports_cmov() );
match(Set dst (CMoveI (Binary cop cr) (Binary dst src)));
ins_cost(200);
@@ -7335,7 +7276,7 @@ instruct cmovI_regU( cmpOpU cop, eFlagsRegU cr, eRegI dst, eRegI src ) %{
ins_pipe( pipe_cmov_reg );
%}
-instruct cmovI_regUCF( cmpOpUCF cop, eFlagsRegUCF cr, eRegI dst, eRegI src ) %{
+instruct cmovI_regUCF( cmpOpUCF cop, eFlagsRegUCF cr, rRegI dst, rRegI src ) %{
predicate(VM_Version::supports_cmov() );
match(Set dst (CMoveI (Binary cop cr) (Binary dst src)));
ins_cost(200);
@@ -7345,7 +7286,7 @@ instruct cmovI_regUCF( cmpOpUCF cop, eFlagsRegUCF cr, eRegI dst, eRegI src ) %{
%}
// Conditional move
-instruct cmovI_mem(cmpOp cop, eFlagsReg cr, eRegI dst, memory src) %{
+instruct cmovI_mem(cmpOp cop, eFlagsReg cr, rRegI dst, memory src) %{
predicate(VM_Version::supports_cmov() );
match(Set dst (CMoveI (Binary cop cr) (Binary dst (LoadI src))));
ins_cost(250);
@@ -7356,7 +7297,7 @@ instruct cmovI_mem(cmpOp cop, eFlagsReg cr, eRegI dst, memory src) %{
%}
// Conditional move
-instruct cmovI_memU(cmpOpU cop, eFlagsRegU cr, eRegI dst, memory src) %{
+instruct cmovI_memU(cmpOpU cop, eFlagsRegU cr, rRegI dst, memory src) %{
predicate(VM_Version::supports_cmov() );
match(Set dst (CMoveI (Binary cop cr) (Binary dst (LoadI src))));
ins_cost(250);
@@ -7366,7 +7307,7 @@ instruct cmovI_memU(cmpOpU cop, eFlagsRegU cr, eRegI dst, memory src) %{
ins_pipe( pipe_cmov_mem );
%}
-instruct cmovI_memUCF(cmpOpUCF cop, eFlagsRegUCF cr, eRegI dst, memory src) %{
+instruct cmovI_memUCF(cmpOpUCF cop, eFlagsRegUCF cr, rRegI dst, memory src) %{
predicate(VM_Version::supports_cmov() );
match(Set dst (CMoveI (Binary cop cr) (Binary dst (LoadI src))));
ins_cost(250);
@@ -7620,7 +7561,7 @@ instruct cmovL_regUCF(cmpOpUCF cop, eFlagsRegUCF cr, eRegL dst, eRegL src) %{
//----------Arithmetic Instructions--------------------------------------------
//----------Addition Instructions----------------------------------------------
// Integer Addition Instructions
-instruct addI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct addI_eReg(rRegI dst, rRegI src, eFlagsReg cr) %{
match(Set dst (AddI dst src));
effect(KILL cr);
@@ -7631,7 +7572,7 @@ instruct addI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
ins_pipe( ialu_reg_reg );
%}
-instruct addI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
+instruct addI_eReg_imm(rRegI dst, immI src, eFlagsReg cr) %{
match(Set dst (AddI dst src));
effect(KILL cr);
@@ -7641,7 +7582,7 @@ instruct addI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
ins_pipe( ialu_reg );
%}
-instruct incI_eReg(eRegI dst, immI1 src, eFlagsReg cr) %{
+instruct incI_eReg(rRegI dst, immI1 src, eFlagsReg cr) %{
predicate(UseIncDec);
match(Set dst (AddI dst src));
effect(KILL cr);
@@ -7653,7 +7594,7 @@ instruct incI_eReg(eRegI dst, immI1 src, eFlagsReg cr) %{
ins_pipe( ialu_reg );
%}
-instruct leaI_eReg_immI(eRegI dst, eRegI src0, immI src1) %{
+instruct leaI_eReg_immI(rRegI dst, rRegI src0, immI src1) %{
match(Set dst (AddI src0 src1));
ins_cost(110);
@@ -7673,7 +7614,7 @@ instruct leaP_eReg_immI(eRegP dst, eRegP src0, immI src1) %{
ins_pipe( ialu_reg_reg );
%}
-instruct decI_eReg(eRegI dst, immI_M1 src, eFlagsReg cr) %{
+instruct decI_eReg(rRegI dst, immI_M1 src, eFlagsReg cr) %{
predicate(UseIncDec);
match(Set dst (AddI dst src));
effect(KILL cr);
@@ -7685,7 +7626,7 @@ instruct decI_eReg(eRegI dst, immI_M1 src, eFlagsReg cr) %{
ins_pipe( ialu_reg );
%}
-instruct addP_eReg(eRegP dst, eRegI src, eFlagsReg cr) %{
+instruct addP_eReg(eRegP dst, rRegI src, eFlagsReg cr) %{
match(Set dst (AddP dst src));
effect(KILL cr);
@@ -7707,7 +7648,7 @@ instruct addP_eReg_imm(eRegP dst, immI src, eFlagsReg cr) %{
ins_pipe( ialu_reg );
%}
-instruct addI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
+instruct addI_eReg_mem(rRegI dst, memory src, eFlagsReg cr) %{
match(Set dst (AddI dst (LoadI src)));
effect(KILL cr);
@@ -7718,7 +7659,7 @@ instruct addI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
ins_pipe( ialu_reg_mem );
%}
-instruct addI_mem_eReg(memory dst, eRegI src, eFlagsReg cr) %{
+instruct addI_mem_eReg(memory dst, rRegI src, eFlagsReg cr) %{
match(Set dst (StoreI dst (AddI (LoadI dst) src)));
effect(KILL cr);
@@ -7780,7 +7721,7 @@ instruct castPP( eRegP dst ) %{
ins_pipe( empty );
%}
-instruct castII( eRegI dst ) %{
+instruct castII( rRegI dst ) %{
match(Set dst (CastII dst));
format %{ "#castII of $dst" %}
ins_encode( /*empty encoding*/ );
@@ -7814,7 +7755,7 @@ instruct storePConditional( memory heap_top_ptr, eAXRegP oldval, eRegP newval, e
// Conditional-store of an int value.
// ZF flag is set on success, reset otherwise. Implemented with a CMPXCHG on Intel.
-instruct storeIConditional( memory mem, eAXRegI oldval, eRegI newval, eFlagsReg cr ) %{
+instruct storeIConditional( memory mem, eAXRegI oldval, rRegI newval, eFlagsReg cr ) %{
match(Set cr (StoreIConditional mem (Binary oldval newval)));
effect(KILL oldval);
format %{ "CMPXCHG $mem,$newval\t# If EAX==$mem Then store $newval into $mem" %}
@@ -7847,7 +7788,7 @@ instruct storeLConditional( memory mem, eADXRegL oldval, eBCXRegL newval, eFlags
// No flag versions for CompareAndSwap{P,I,L} because matcher can't match them
-instruct compareAndSwapL( eRegI res, eSIRegP mem_ptr, eADXRegL oldval, eBCXRegL newval, eFlagsReg cr ) %{
+instruct compareAndSwapL( rRegI res, eSIRegP mem_ptr, eADXRegL oldval, eBCXRegL newval, eFlagsReg cr ) %{
match(Set res (CompareAndSwapL mem_ptr (Binary oldval newval)));
effect(KILL cr, KILL oldval);
format %{ "CMPXCHG8 [$mem_ptr],$newval\t# If EDX:EAX==[$mem_ptr] Then store $newval into [$mem_ptr]\n\t"
@@ -7860,7 +7801,7 @@ instruct compareAndSwapL( eRegI res, eSIRegP mem_ptr, eADXRegL oldval, eBCXRegL
ins_pipe( pipe_cmpxchg );
%}
-instruct compareAndSwapP( eRegI res, pRegP mem_ptr, eAXRegP oldval, eCXRegP newval, eFlagsReg cr) %{
+instruct compareAndSwapP( rRegI res, pRegP mem_ptr, eAXRegP oldval, eCXRegP newval, eFlagsReg cr) %{
match(Set res (CompareAndSwapP mem_ptr (Binary oldval newval)));
effect(KILL cr, KILL oldval);
format %{ "CMPXCHG [$mem_ptr],$newval\t# If EAX==[$mem_ptr] Then store $newval into [$mem_ptr]\n\t"
@@ -7872,7 +7813,7 @@ instruct compareAndSwapP( eRegI res, pRegP mem_ptr, eAXRegP oldval, eCXRegP new
ins_pipe( pipe_cmpxchg );
%}
-instruct compareAndSwapI( eRegI res, pRegP mem_ptr, eAXRegI oldval, eCXRegI newval, eFlagsReg cr) %{
+instruct compareAndSwapI( rRegI res, pRegP mem_ptr, eAXRegI oldval, eCXRegI newval, eFlagsReg cr) %{
match(Set res (CompareAndSwapI mem_ptr (Binary oldval newval)));
effect(KILL cr, KILL oldval);
format %{ "CMPXCHG [$mem_ptr],$newval\t# If EAX==[$mem_ptr] Then store $newval into [$mem_ptr]\n\t"
@@ -7886,7 +7827,7 @@ instruct compareAndSwapI( eRegI res, pRegP mem_ptr, eAXRegI oldval, eCXRegI newv
//----------Subtraction Instructions-------------------------------------------
// Integer Subtraction Instructions
-instruct subI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct subI_eReg(rRegI dst, rRegI src, eFlagsReg cr) %{
match(Set dst (SubI dst src));
effect(KILL cr);
@@ -7897,7 +7838,7 @@ instruct subI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
ins_pipe( ialu_reg_reg );
%}
-instruct subI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
+instruct subI_eReg_imm(rRegI dst, immI src, eFlagsReg cr) %{
match(Set dst (SubI dst src));
effect(KILL cr);
@@ -7908,7 +7849,7 @@ instruct subI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
ins_pipe( ialu_reg );
%}
-instruct subI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
+instruct subI_eReg_mem(rRegI dst, memory src, eFlagsReg cr) %{
match(Set dst (SubI dst (LoadI src)));
effect(KILL cr);
@@ -7919,7 +7860,7 @@ instruct subI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
ins_pipe( ialu_reg_mem );
%}
-instruct subI_mem_eReg(memory dst, eRegI src, eFlagsReg cr) %{
+instruct subI_mem_eReg(memory dst, rRegI src, eFlagsReg cr) %{
match(Set dst (StoreI dst (SubI (LoadI dst) src)));
effect(KILL cr);
@@ -7931,7 +7872,7 @@ instruct subI_mem_eReg(memory dst, eRegI src, eFlagsReg cr) %{
%}
// Subtract from a pointer
-instruct subP_eReg(eRegP dst, eRegI src, immI0 zero, eFlagsReg cr) %{
+instruct subP_eReg(eRegP dst, rRegI src, immI0 zero, eFlagsReg cr) %{
match(Set dst (AddP dst (SubI zero src)));
effect(KILL cr);
@@ -7942,7 +7883,7 @@ instruct subP_eReg(eRegP dst, eRegI src, immI0 zero, eFlagsReg cr) %{
ins_pipe( ialu_reg_reg );
%}
-instruct negI_eReg(eRegI dst, immI0 zero, eFlagsReg cr) %{
+instruct negI_eReg(rRegI dst, immI0 zero, eFlagsReg cr) %{
match(Set dst (SubI zero dst));
effect(KILL cr);
@@ -7957,7 +7898,7 @@ instruct negI_eReg(eRegI dst, immI0 zero, eFlagsReg cr) %{
//----------Multiplication/Division Instructions-------------------------------
// Integer Multiplication Instructions
// Multiply Register
-instruct mulI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct mulI_eReg(rRegI dst, rRegI src, eFlagsReg cr) %{
match(Set dst (MulI dst src));
effect(KILL cr);
@@ -7970,7 +7911,7 @@ instruct mulI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
%}
// Multiply 32-bit Immediate
-instruct mulI_eReg_imm(eRegI dst, eRegI src, immI imm, eFlagsReg cr) %{
+instruct mulI_eReg_imm(rRegI dst, rRegI src, immI imm, eFlagsReg cr) %{
match(Set dst (MulI src imm));
effect(KILL cr);
@@ -8026,7 +7967,7 @@ instruct mulI_imm_RShift_high(eDXRegI dst, nadxRegI src1, eADXRegL_low_only src2
%}
// Multiply Memory 32-bit Immediate
-instruct mulI_mem_imm(eRegI dst, memory src, immI imm, eFlagsReg cr) %{
+instruct mulI_mem_imm(rRegI dst, memory src, immI imm, eFlagsReg cr) %{
match(Set dst (MulI (LoadI src) imm));
effect(KILL cr);
@@ -8038,7 +7979,7 @@ instruct mulI_mem_imm(eRegI dst, memory src, immI imm, eFlagsReg cr) %{
%}
// Multiply Memory
-instruct mulI(eRegI dst, memory src, eFlagsReg cr) %{
+instruct mulI(rRegI dst, memory src, eFlagsReg cr) %{
match(Set dst (MulI dst (LoadI src)));
effect(KILL cr);
@@ -8075,7 +8016,7 @@ instruct mulIS_eReg(eADXRegL dst, immL_32bits mask, eFlagsReg flags, eAXRegI src
%}
// Multiply Register Long
-instruct mulL_eReg(eADXRegL dst, eRegL src, eRegI tmp, eFlagsReg cr) %{
+instruct mulL_eReg(eADXRegL dst, eRegL src, rRegI tmp, eFlagsReg cr) %{
match(Set dst (MulL dst src));
effect(KILL cr, TEMP tmp);
ins_cost(4*100+3*400);
@@ -8093,7 +8034,7 @@ instruct mulL_eReg(eADXRegL dst, eRegL src, eRegI tmp, eFlagsReg cr) %{
%}
// Multiply Register Long where the left operand's high 32 bits are zero
-instruct mulL_eReg_lhi0(eADXRegL dst, eRegL src, eRegI tmp, eFlagsReg cr) %{
+instruct mulL_eReg_lhi0(eADXRegL dst, eRegL src, rRegI tmp, eFlagsReg cr) %{
predicate(is_operand_hi32_zero(n->in(1)));
match(Set dst (MulL dst src));
effect(KILL cr, TEMP tmp);
@@ -8114,7 +8055,7 @@ instruct mulL_eReg_lhi0(eADXRegL dst, eRegL src, eRegI tmp, eFlagsReg cr) %{
%}
// Multiply Register Long where the right operand's high 32 bits are zero
-instruct mulL_eReg_rhi0(eADXRegL dst, eRegL src, eRegI tmp, eFlagsReg cr) %{
+instruct mulL_eReg_rhi0(eADXRegL dst, eRegL src, rRegI tmp, eFlagsReg cr) %{
predicate(is_operand_hi32_zero(n->in(2)));
match(Set dst (MulL dst src));
effect(KILL cr, TEMP tmp);
@@ -8150,7 +8091,7 @@ instruct mulL_eReg_hi0(eADXRegL dst, eRegL src, eFlagsReg cr) %{
%}
// Multiply Register Long by small constant
-instruct mulL_eReg_con(eADXRegL dst, immL_127 src, eRegI tmp, eFlagsReg cr) %{
+instruct mulL_eReg_con(eADXRegL dst, immL_127 src, rRegI tmp, eFlagsReg cr) %{
match(Set dst (MulL dst src));
effect(KILL cr, TEMP tmp);
ins_cost(2*100+2*400);
@@ -8248,7 +8189,7 @@ instruct modL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI
%}
// Divide Register Long (no special case since divisor != -1)
-instruct divL_eReg_imm32( eADXRegL dst, immL32 imm, eRegI tmp, eRegI tmp2, eFlagsReg cr ) %{
+instruct divL_eReg_imm32( eADXRegL dst, immL32 imm, rRegI tmp, rRegI tmp2, eFlagsReg cr ) %{
match(Set dst (DivL dst imm));
effect( TEMP tmp, TEMP tmp2, KILL cr );
ins_cost(1000);
@@ -8319,7 +8260,7 @@ instruct divL_eReg_imm32( eADXRegL dst, immL32 imm, eRegI tmp, eRegI tmp2, eFlag
%}
// Remainder Register Long (remainder fit into 32 bits)
-instruct modL_eReg_imm32( eADXRegL dst, immL32 imm, eRegI tmp, eRegI tmp2, eFlagsReg cr ) %{
+instruct modL_eReg_imm32( eADXRegL dst, immL32 imm, rRegI tmp, rRegI tmp2, eFlagsReg cr ) %{
match(Set dst (ModL dst imm));
effect( TEMP tmp, TEMP tmp2, KILL cr );
ins_cost(1000);
@@ -8387,7 +8328,7 @@ instruct modL_eReg_imm32( eADXRegL dst, immL32 imm, eRegI tmp, eRegI tmp2, eFlag
// Integer Shift Instructions
// Shift Left by one
-instruct shlI_eReg_1(eRegI dst, immI1 shift, eFlagsReg cr) %{
+instruct shlI_eReg_1(rRegI dst, immI1 shift, eFlagsReg cr) %{
match(Set dst (LShiftI dst shift));
effect(KILL cr);
@@ -8399,7 +8340,7 @@ instruct shlI_eReg_1(eRegI dst, immI1 shift, eFlagsReg cr) %{
%}
// Shift Left by 8-bit immediate
-instruct salI_eReg_imm(eRegI dst, immI8 shift, eFlagsReg cr) %{
+instruct salI_eReg_imm(rRegI dst, immI8 shift, eFlagsReg cr) %{
match(Set dst (LShiftI dst shift));
effect(KILL cr);
@@ -8411,7 +8352,7 @@ instruct salI_eReg_imm(eRegI dst, immI8 shift, eFlagsReg cr) %{
%}
// Shift Left by variable
-instruct salI_eReg_CL(eRegI dst, eCXRegI shift, eFlagsReg cr) %{
+instruct salI_eReg_CL(rRegI dst, eCXRegI shift, eFlagsReg cr) %{
match(Set dst (LShiftI dst shift));
effect(KILL cr);
@@ -8423,7 +8364,7 @@ instruct salI_eReg_CL(eRegI dst, eCXRegI shift, eFlagsReg cr) %{
%}
// Arithmetic shift right by one
-instruct sarI_eReg_1(eRegI dst, immI1 shift, eFlagsReg cr) %{
+instruct sarI_eReg_1(rRegI dst, immI1 shift, eFlagsReg cr) %{
match(Set dst (RShiftI dst shift));
effect(KILL cr);
@@ -8445,7 +8386,7 @@ instruct sarI_mem_1(memory dst, immI1 shift, eFlagsReg cr) %{
%}
// Arithmetic Shift Right by 8-bit immediate
-instruct sarI_eReg_imm(eRegI dst, immI8 shift, eFlagsReg cr) %{
+instruct sarI_eReg_imm(rRegI dst, immI8 shift, eFlagsReg cr) %{
match(Set dst (RShiftI dst shift));
effect(KILL cr);
@@ -8468,7 +8409,7 @@ instruct sarI_mem_imm(memory dst, immI8 shift, eFlagsReg cr) %{
%}
// Arithmetic Shift Right by variable
-instruct sarI_eReg_CL(eRegI dst, eCXRegI shift, eFlagsReg cr) %{
+instruct sarI_eReg_CL(rRegI dst, eCXRegI shift, eFlagsReg cr) %{
match(Set dst (RShiftI dst shift));
effect(KILL cr);
@@ -8480,7 +8421,7 @@ instruct sarI_eReg_CL(eRegI dst, eCXRegI shift, eFlagsReg cr) %{
%}
// Logical shift right by one
-instruct shrI_eReg_1(eRegI dst, immI1 shift, eFlagsReg cr) %{
+instruct shrI_eReg_1(rRegI dst, immI1 shift, eFlagsReg cr) %{
match(Set dst (URShiftI dst shift));
effect(KILL cr);
@@ -8492,7 +8433,7 @@ instruct shrI_eReg_1(eRegI dst, immI1 shift, eFlagsReg cr) %{
%}
// Logical Shift Right by 8-bit immediate
-instruct shrI_eReg_imm(eRegI dst, immI8 shift, eFlagsReg cr) %{
+instruct shrI_eReg_imm(rRegI dst, immI8 shift, eFlagsReg cr) %{
match(Set dst (URShiftI dst shift));
effect(KILL cr);
@@ -8506,7 +8447,7 @@ instruct shrI_eReg_imm(eRegI dst, immI8 shift, eFlagsReg cr) %{
// Logical Shift Right by 24, followed by Arithmetic Shift Left by 24.
// This idiom is used by the compiler for the i2b bytecode.
-instruct i2b(eRegI dst, xRegI src, immI_24 twentyfour) %{
+instruct i2b(rRegI dst, xRegI src, immI_24 twentyfour) %{
match(Set dst (RShiftI (LShiftI src twentyfour) twentyfour));
size(3);
@@ -8519,7 +8460,7 @@ instruct i2b(eRegI dst, xRegI src, immI_24 twentyfour) %{
// Logical Shift Right by 16, followed by Arithmetic Shift Left by 16.
// This idiom is used by the compiler the i2s bytecode.
-instruct i2s(eRegI dst, xRegI src, immI_16 sixteen) %{
+instruct i2s(rRegI dst, xRegI src, immI_16 sixteen) %{
match(Set dst (RShiftI (LShiftI src sixteen) sixteen));
size(3);
@@ -8532,7 +8473,7 @@ instruct i2s(eRegI dst, xRegI src, immI_16 sixteen) %{
// Logical Shift Right by variable
-instruct shrI_eReg_CL(eRegI dst, eCXRegI shift, eFlagsReg cr) %{
+instruct shrI_eReg_CL(rRegI dst, eCXRegI shift, eFlagsReg cr) %{
match(Set dst (URShiftI dst shift));
effect(KILL cr);
@@ -8548,7 +8489,7 @@ instruct shrI_eReg_CL(eRegI dst, eCXRegI shift, eFlagsReg cr) %{
//----------Integer Logical Instructions---------------------------------------
// And Instructions
// And Register with Register
-instruct andI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct andI_eReg(rRegI dst, rRegI src, eFlagsReg cr) %{
match(Set dst (AndI dst src));
effect(KILL cr);
@@ -8560,7 +8501,7 @@ instruct andI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
%}
// And Register with Immediate
-instruct andI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
+instruct andI_eReg_imm(rRegI dst, immI src, eFlagsReg cr) %{
match(Set dst (AndI dst src));
effect(KILL cr);
@@ -8572,7 +8513,7 @@ instruct andI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
%}
// And Register with Memory
-instruct andI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
+instruct andI_eReg_mem(rRegI dst, memory src, eFlagsReg cr) %{
match(Set dst (AndI dst (LoadI src)));
effect(KILL cr);
@@ -8584,7 +8525,7 @@ instruct andI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
%}
// And Memory with Register
-instruct andI_mem_eReg(memory dst, eRegI src, eFlagsReg cr) %{
+instruct andI_mem_eReg(memory dst, rRegI src, eFlagsReg cr) %{
match(Set dst (StoreI dst (AndI (LoadI dst) src)));
effect(KILL cr);
@@ -8610,7 +8551,7 @@ instruct andI_mem_imm(memory dst, immI src, eFlagsReg cr) %{
// Or Instructions
// Or Register with Register
-instruct orI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct orI_eReg(rRegI dst, rRegI src, eFlagsReg cr) %{
match(Set dst (OrI dst src));
effect(KILL cr);
@@ -8621,7 +8562,7 @@ instruct orI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
ins_pipe( ialu_reg_reg );
%}
-instruct orI_eReg_castP2X(eRegI dst, eRegP src, eFlagsReg cr) %{
+instruct orI_eReg_castP2X(rRegI dst, eRegP src, eFlagsReg cr) %{
match(Set dst (OrI dst (CastP2X src)));
effect(KILL cr);
@@ -8634,7 +8575,7 @@ instruct orI_eReg_castP2X(eRegI dst, eRegP src, eFlagsReg cr) %{
// Or Register with Immediate
-instruct orI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
+instruct orI_eReg_imm(rRegI dst, immI src, eFlagsReg cr) %{
match(Set dst (OrI dst src));
effect(KILL cr);
@@ -8646,7 +8587,7 @@ instruct orI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
%}
// Or Register with Memory
-instruct orI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
+instruct orI_eReg_mem(rRegI dst, memory src, eFlagsReg cr) %{
match(Set dst (OrI dst (LoadI src)));
effect(KILL cr);
@@ -8658,7 +8599,7 @@ instruct orI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
%}
// Or Memory with Register
-instruct orI_mem_eReg(memory dst, eRegI src, eFlagsReg cr) %{
+instruct orI_mem_eReg(memory dst, rRegI src, eFlagsReg cr) %{
match(Set dst (StoreI dst (OrI (LoadI dst) src)));
effect(KILL cr);
@@ -8684,7 +8625,7 @@ instruct orI_mem_imm(memory dst, immI src, eFlagsReg cr) %{
// ROL/ROR
// ROL expand
-instruct rolI_eReg_imm1(eRegI dst, immI1 shift, eFlagsReg cr) %{
+instruct rolI_eReg_imm1(rRegI dst, immI1 shift, eFlagsReg cr) %{
effect(USE_DEF dst, USE shift, KILL cr);
format %{ "ROL $dst, $shift" %}
@@ -8693,7 +8634,7 @@ instruct rolI_eReg_imm1(eRegI dst, immI1 shift, eFlagsReg cr) %{
ins_pipe( ialu_reg );
%}
-instruct rolI_eReg_imm8(eRegI dst, immI8 shift, eFlagsReg cr) %{
+instruct rolI_eReg_imm8(rRegI dst, immI8 shift, eFlagsReg cr) %{
effect(USE_DEF dst, USE shift, KILL cr);
format %{ "ROL $dst, $shift" %}
@@ -8713,7 +8654,7 @@ instruct rolI_eReg_CL(ncxRegI dst, eCXRegI shift, eFlagsReg cr) %{
// end of ROL expand
// ROL 32bit by one once
-instruct rolI_eReg_i1(eRegI dst, immI1 lshift, immI_M1 rshift, eFlagsReg cr) %{
+instruct rolI_eReg_i1(rRegI dst, immI1 lshift, immI_M1 rshift, eFlagsReg cr) %{
match(Set dst ( OrI (LShiftI dst lshift) (URShiftI dst rshift)));
expand %{
@@ -8722,7 +8663,7 @@ instruct rolI_eReg_i1(eRegI dst, immI1 lshift, immI_M1 rshift, eFlagsReg cr) %{
%}
// ROL 32bit var by imm8 once
-instruct rolI_eReg_i8(eRegI dst, immI8 lshift, immI8 rshift, eFlagsReg cr) %{
+instruct rolI_eReg_i8(rRegI dst, immI8 lshift, immI8 rshift, eFlagsReg cr) %{
predicate( 0 == ((n->in(1)->in(2)->get_int() + n->in(2)->in(2)->get_int()) & 0x1f));
match(Set dst ( OrI (LShiftI dst lshift) (URShiftI dst rshift)));
@@ -8750,7 +8691,7 @@ instruct rolI_eReg_Var_C32(ncxRegI dst, eCXRegI shift, immI_32 c32, eFlagsReg cr
%}
// ROR expand
-instruct rorI_eReg_imm1(eRegI dst, immI1 shift, eFlagsReg cr) %{
+instruct rorI_eReg_imm1(rRegI dst, immI1 shift, eFlagsReg cr) %{
effect(USE_DEF dst, USE shift, KILL cr);
format %{ "ROR $dst, $shift" %}
@@ -8759,7 +8700,7 @@ instruct rorI_eReg_imm1(eRegI dst, immI1 shift, eFlagsReg cr) %{
ins_pipe( ialu_reg );
%}
-instruct rorI_eReg_imm8(eRegI dst, immI8 shift, eFlagsReg cr) %{
+instruct rorI_eReg_imm8(rRegI dst, immI8 shift, eFlagsReg cr) %{
effect (USE_DEF dst, USE shift, KILL cr);
format %{ "ROR $dst, $shift" %}
@@ -8779,7 +8720,7 @@ instruct rorI_eReg_CL(ncxRegI dst, eCXRegI shift, eFlagsReg cr)%{
// end of ROR expand
// ROR right once
-instruct rorI_eReg_i1(eRegI dst, immI1 rshift, immI_M1 lshift, eFlagsReg cr) %{
+instruct rorI_eReg_i1(rRegI dst, immI1 rshift, immI_M1 lshift, eFlagsReg cr) %{
match(Set dst ( OrI (URShiftI dst rshift) (LShiftI dst lshift)));
expand %{
@@ -8788,7 +8729,7 @@ instruct rorI_eReg_i1(eRegI dst, immI1 rshift, immI_M1 lshift, eFlagsReg cr) %{
%}
// ROR 32bit by immI8 once
-instruct rorI_eReg_i8(eRegI dst, immI8 rshift, immI8 lshift, eFlagsReg cr) %{
+instruct rorI_eReg_i8(rRegI dst, immI8 rshift, immI8 lshift, eFlagsReg cr) %{
predicate( 0 == ((n->in(1)->in(2)->get_int() + n->in(2)->in(2)->get_int()) & 0x1f));
match(Set dst ( OrI (URShiftI dst rshift) (LShiftI dst lshift)));
@@ -8817,7 +8758,7 @@ instruct rorI_eReg_Var_C32(ncxRegI dst, eCXRegI shift, immI_32 c32, eFlagsReg cr
// Xor Instructions
// Xor Register with Register
-instruct xorI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
+instruct xorI_eReg(rRegI dst, rRegI src, eFlagsReg cr) %{
match(Set dst (XorI dst src));
effect(KILL cr);
@@ -8829,7 +8770,7 @@ instruct xorI_eReg(eRegI dst, eRegI src, eFlagsReg cr) %{
%}
// Xor Register with Immediate -1
-instruct xorI_eReg_im1(eRegI dst, immI_M1 imm) %{
+instruct xorI_eReg_im1(rRegI dst, immI_M1 imm) %{
match(Set dst (XorI dst imm));
size(2);
@@ -8841,7 +8782,7 @@ instruct xorI_eReg_im1(eRegI dst, immI_M1 imm) %{
%}
// Xor Register with Immediate
-instruct xorI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
+instruct xorI_eReg_imm(rRegI dst, immI src, eFlagsReg cr) %{
match(Set dst (XorI dst src));
effect(KILL cr);
@@ -8853,7 +8794,7 @@ instruct xorI_eReg_imm(eRegI dst, immI src, eFlagsReg cr) %{
%}
// Xor Register with Memory
-instruct xorI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
+instruct xorI_eReg_mem(rRegI dst, memory src, eFlagsReg cr) %{
match(Set dst (XorI dst (LoadI src)));
effect(KILL cr);
@@ -8865,7 +8806,7 @@ instruct xorI_eReg_mem(eRegI dst, memory src, eFlagsReg cr) %{
%}
// Xor Memory with Register
-instruct xorI_mem_eReg(memory dst, eRegI src, eFlagsReg cr) %{
+instruct xorI_mem_eReg(memory dst, rRegI src, eFlagsReg cr) %{
match(Set dst (StoreI dst (XorI (LoadI dst) src)));
effect(KILL cr);
@@ -8890,14 +8831,14 @@ instruct xorI_mem_imm(memory dst, immI src, eFlagsReg cr) %{
//----------Convert Int to Boolean---------------------------------------------
-instruct movI_nocopy(eRegI dst, eRegI src) %{
+instruct movI_nocopy(rRegI dst, rRegI src) %{
effect( DEF dst, USE src );
format %{ "MOV $dst,$src" %}
ins_encode( enc_Copy( dst, src) );
ins_pipe( ialu_reg_reg );
%}
-instruct ci2b( eRegI dst, eRegI src, eFlagsReg cr ) %{
+instruct ci2b( rRegI dst, rRegI src, eFlagsReg cr ) %{
effect( USE_DEF dst, USE src, KILL cr );
size(4);
@@ -8908,7 +8849,7 @@ instruct ci2b( eRegI dst, eRegI src, eFlagsReg cr ) %{
ins_pipe( ialu_reg_reg_long );
%}
-instruct convI2B( eRegI dst, eRegI src, eFlagsReg cr ) %{
+instruct convI2B( rRegI dst, rRegI src, eFlagsReg cr ) %{
match(Set dst (Conv2B src));
expand %{
@@ -8917,14 +8858,14 @@ instruct convI2B( eRegI dst, eRegI src, eFlagsReg cr ) %{
%}
%}
-instruct movP_nocopy(eRegI dst, eRegP src) %{
+instruct movP_nocopy(rRegI dst, eRegP src) %{
effect( DEF dst, USE src );
format %{ "MOV $dst,$src" %}
ins_encode( enc_Copy( dst, src) );
ins_pipe( ialu_reg_reg );
%}
-instruct cp2b( eRegI dst, eRegP src, eFlagsReg cr ) %{
+instruct cp2b( rRegI dst, eRegP src, eFlagsReg cr ) %{
effect( USE_DEF dst, USE src, KILL cr );
format %{ "NEG $dst\n\t"
"ADC $dst,$src" %}
@@ -8933,7 +8874,7 @@ instruct cp2b( eRegI dst, eRegP src, eFlagsReg cr ) %{
ins_pipe( ialu_reg_reg_long );
%}
-instruct convP2B( eRegI dst, eRegP src, eFlagsReg cr ) %{
+instruct convP2B( rRegI dst, eRegP src, eFlagsReg cr ) %{
match(Set dst (Conv2B src));
expand %{
@@ -8958,7 +8899,7 @@ instruct cmpLTMask( eCXRegI dst, ncxRegI p, ncxRegI q, eFlagsReg cr ) %{
ins_pipe( pipe_slow );
%}
-instruct cmpLTMask0( eRegI dst, immI0 zero, eFlagsReg cr ) %{
+instruct cmpLTMask0( rRegI dst, immI0 zero, eFlagsReg cr ) %{
match(Set dst (CmpLTMask dst zero));
effect( DEF dst, KILL cr );
ins_cost(100);
@@ -9430,7 +9371,7 @@ instruct cmpDPR_cc(eFlagsRegU cr, regDPR src1, regDPR src2, eAXRegI rax) %{
%}
// Compare vs zero into -1,0,1
-instruct cmpDPR_0(eRegI dst, regDPR src1, immDPR0 zero, eAXRegI rax, eFlagsReg cr) %{
+instruct cmpDPR_0(rRegI dst, regDPR src1, immDPR0 zero, eAXRegI rax, eFlagsReg cr) %{
predicate(UseSSE<=1);
match(Set dst (CmpD3 src1 zero));
effect(KILL cr, KILL rax);
@@ -9444,7 +9385,7 @@ instruct cmpDPR_0(eRegI dst, regDPR src1, immDPR0 zero, eAXRegI rax, eFlagsReg c
%}
// Compare into -1,0,1
-instruct cmpDPR_reg(eRegI dst, regDPR src1, regDPR src2, eAXRegI rax, eFlagsReg cr) %{
+instruct cmpDPR_reg(rRegI dst, regDPR src1, regDPR src2, eAXRegI rax, eFlagsReg cr) %{
predicate(UseSSE<=1);
match(Set dst (CmpD3 src1 src2));
effect(KILL cr, KILL rax);
@@ -10222,7 +10163,7 @@ instruct cmpFPR_cc(eFlagsRegU cr, regFPR src1, regFPR src2, eAXRegI rax) %{
%}
// Compare vs zero into -1,0,1
-instruct cmpFPR_0(eRegI dst, regFPR src1, immFPR0 zero, eAXRegI rax, eFlagsReg cr) %{
+instruct cmpFPR_0(rRegI dst, regFPR src1, immFPR0 zero, eAXRegI rax, eFlagsReg cr) %{
predicate(UseSSE == 0);
match(Set dst (CmpF3 src1 zero));
effect(KILL cr, KILL rax);
@@ -10236,7 +10177,7 @@ instruct cmpFPR_0(eRegI dst, regFPR src1, immFPR0 zero, eAXRegI rax, eFlagsReg c
%}
// Compare into -1,0,1
-instruct cmpFPR_reg(eRegI dst, regFPR src1, regFPR src2, eAXRegI rax, eFlagsReg cr) %{
+instruct cmpFPR_reg(rRegI dst, regFPR src1, regFPR src2, eAXRegI rax, eFlagsReg cr) %{
predicate(UseSSE == 0);
match(Set dst (CmpF3 src1 src2));
effect(KILL cr, KILL rax);
@@ -11156,7 +11097,7 @@ instruct convI2DPR_reg(regDPR dst, stackSlotI src) %{
ins_pipe( fpu_reg_mem );
%}
-instruct convI2D_reg(regD dst, eRegI src) %{
+instruct convI2D_reg(regD dst, rRegI src) %{
predicate( UseSSE>=2 && !UseXmmI2D );
match(Set dst (ConvI2D src));
format %{ "CVTSI2SD $dst,$src" %}
@@ -11176,7 +11117,7 @@ instruct convI2D_mem(regD dst, memory mem) %{
ins_pipe( pipe_slow );
%}
-instruct convXI2D_reg(regD dst, eRegI src)
+instruct convXI2D_reg(regD dst, rRegI src)
%{
predicate( UseSSE>=2 && UseXmmI2D );
match(Set dst (ConvI2D src));
@@ -11264,7 +11205,7 @@ instruct convI2FPR_mem(regFPR dst, memory mem) %{
%}
// Convert an int to a float in xmm; no rounding step needed.
-instruct convI2F_reg(regF dst, eRegI src) %{
+instruct convI2F_reg(regF dst, rRegI src) %{
predicate( UseSSE==1 || UseSSE>=2 && !UseXmmI2F );
match(Set dst (ConvI2F src));
format %{ "CVTSI2SS $dst, $src" %}
@@ -11274,7 +11215,7 @@ instruct convI2F_reg(regF dst, eRegI src) %{
ins_pipe( pipe_slow );
%}
- instruct convXI2F_reg(regF dst, eRegI src)
+ instruct convXI2F_reg(regF dst, rRegI src)
%{
predicate( UseSSE>=2 && UseXmmI2F );
match(Set dst (ConvI2F src));
@@ -11288,7 +11229,7 @@ instruct convI2F_reg(regF dst, eRegI src) %{
ins_pipe(pipe_slow); // XXX
%}
-instruct convI2L_reg( eRegL dst, eRegI src, eFlagsReg cr) %{
+instruct convI2L_reg( eRegL dst, rRegI src, eFlagsReg cr) %{
match(Set dst (ConvI2L src));
effect(KILL cr);
ins_cost(375);
@@ -11300,7 +11241,7 @@ instruct convI2L_reg( eRegL dst, eRegI src, eFlagsReg cr) %{
%}
// Zero-extend convert int to long
-instruct convI2L_reg_zex(eRegL dst, eRegI src, immL_32bits mask, eFlagsReg flags ) %{
+instruct convI2L_reg_zex(eRegL dst, rRegI src, immL_32bits mask, eFlagsReg flags ) %{
match(Set dst (AndL (ConvI2L src) mask) );
effect( KILL flags );
ins_cost(250);
@@ -11380,7 +11321,7 @@ instruct convL2FPR_reg( stackSlotF dst, eRegL src, eFlagsReg cr) %{
ins_pipe( pipe_slow );
%}
-instruct convL2I_reg( eRegI dst, eRegL src ) %{
+instruct convL2I_reg( rRegI dst, eRegL src ) %{
match(Set dst (ConvL2I src));
effect( DEF dst, USE src );
format %{ "MOV $dst,$src.lo" %}
@@ -11389,7 +11330,7 @@ instruct convL2I_reg( eRegI dst, eRegL src ) %{
%}
-instruct MoveF2I_stack_reg(eRegI dst, stackSlotF src) %{
+instruct MoveF2I_stack_reg(rRegI dst, stackSlotF src) %{
match(Set dst (MoveF2I src));
effect( DEF dst, USE src );
ins_cost(100);
@@ -11424,7 +11365,7 @@ instruct MoveF2I_reg_stack_sse(stackSlotI dst, regF src) %{
ins_pipe( pipe_slow );
%}
-instruct MoveF2I_reg_reg_sse(eRegI dst, regF src) %{
+instruct MoveF2I_reg_reg_sse(rRegI dst, regF src) %{
predicate(UseSSE>=2);
match(Set dst (MoveF2I src));
effect( DEF dst, USE src );
@@ -11436,7 +11377,7 @@ instruct MoveF2I_reg_reg_sse(eRegI dst, regF src) %{
ins_pipe( pipe_slow );
%}
-instruct MoveI2F_reg_stack(stackSlotF dst, eRegI src) %{
+instruct MoveI2F_reg_stack(stackSlotF dst, rRegI src) %{
match(Set dst (MoveI2F src));
effect( DEF dst, USE src );
@@ -11476,7 +11417,7 @@ instruct MoveI2F_stack_reg_sse(regF dst, stackSlotI src) %{
ins_pipe( pipe_slow );
%}
-instruct MoveI2F_reg_reg_sse(regF dst, eRegI src) %{
+instruct MoveI2F_reg_reg_sse(regF dst, rRegI src) %{
predicate(UseSSE>=2);
match(Set dst (MoveI2F src));
effect( DEF dst, USE src );
@@ -11610,186 +11551,6 @@ instruct MoveL2D_reg_reg_sse(regD dst, eRegL src, regD tmp) %{
ins_pipe( pipe_slow );
%}
-// Replicate scalar to packed byte (1 byte) values in xmm
-instruct Repl8B_reg(regD dst, regD src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate8B src));
- format %{ "MOVDQA $dst,$src\n\t"
- "PUNPCKLBW $dst,$dst\n\t"
- "PSHUFLW $dst,$dst,0x00\t! replicate8B" %}
- ins_encode %{
- if ($dst$$reg != $src$$reg) {
- __ movdqa($dst$$XMMRegister, $src$$XMMRegister);
- }
- __ punpcklbw($dst$$XMMRegister, $dst$$XMMRegister);
- __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Replicate scalar to packed byte (1 byte) values in xmm
-instruct Repl8B_eRegI(regD dst, eRegI src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate8B src));
- format %{ "MOVD $dst,$src\n\t"
- "PUNPCKLBW $dst,$dst\n\t"
- "PSHUFLW $dst,$dst,0x00\t! replicate8B" %}
- ins_encode %{
- __ movdl($dst$$XMMRegister, $src$$Register);
- __ punpcklbw($dst$$XMMRegister, $dst$$XMMRegister);
- __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Replicate scalar zero to packed byte (1 byte) values in xmm
-instruct Repl8B_immI0(regD dst, immI0 zero) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate8B zero));
- format %{ "PXOR $dst,$dst\t! replicate8B" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed shore (2 byte) values in xmm
-instruct Repl4S_reg(regD dst, regD src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate4S src));
- format %{ "PSHUFLW $dst,$src,0x00\t! replicate4S" %}
- ins_encode %{
- __ pshuflw($dst$$XMMRegister, $src$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed shore (2 byte) values in xmm
-instruct Repl4S_eRegI(regD dst, eRegI src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate4S src));
- format %{ "MOVD $dst,$src\n\t"
- "PSHUFLW $dst,$dst,0x00\t! replicate4S" %}
- ins_encode %{
- __ movdl($dst$$XMMRegister, $src$$Register);
- __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar zero to packed short (2 byte) values in xmm
-instruct Repl4S_immI0(regD dst, immI0 zero) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate4S zero));
- format %{ "PXOR $dst,$dst\t! replicate4S" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed char (2 byte) values in xmm
-instruct Repl4C_reg(regD dst, regD src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate4C src));
- format %{ "PSHUFLW $dst,$src,0x00\t! replicate4C" %}
- ins_encode %{
- __ pshuflw($dst$$XMMRegister, $src$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed char (2 byte) values in xmm
-instruct Repl4C_eRegI(regD dst, eRegI src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate4C src));
- format %{ "MOVD $dst,$src\n\t"
- "PSHUFLW $dst,$dst,0x00\t! replicate4C" %}
- ins_encode %{
- __ movdl($dst$$XMMRegister, $src$$Register);
- __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar zero to packed char (2 byte) values in xmm
-instruct Repl4C_immI0(regD dst, immI0 zero) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate4C zero));
- format %{ "PXOR $dst,$dst\t! replicate4C" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed integer (4 byte) values in xmm
-instruct Repl2I_reg(regD dst, regD src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate2I src));
- format %{ "PSHUFD $dst,$src,0x00\t! replicate2I" %}
- ins_encode %{
- __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed integer (4 byte) values in xmm
-instruct Repl2I_eRegI(regD dst, eRegI src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate2I src));
- format %{ "MOVD $dst,$src\n\t"
- "PSHUFD $dst,$dst,0x00\t! replicate2I" %}
- ins_encode %{
- __ movdl($dst$$XMMRegister, $src$$Register);
- __ pshufd($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar zero to packed integer (2 byte) values in xmm
-instruct Repl2I_immI0(regD dst, immI0 zero) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate2I zero));
- format %{ "PXOR $dst,$dst\t! replicate2I" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed single precision floating point values in xmm
-instruct Repl2F_reg(regD dst, regD src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate2F src));
- format %{ "PSHUFD $dst,$src,0xe0\t! replicate2F" %}
- ins_encode %{
- __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0xe0);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed single precision floating point values in xmm
-instruct Repl2F_regF(regD dst, regF src) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate2F src));
- format %{ "PSHUFD $dst,$src,0xe0\t! replicate2F" %}
- ins_encode %{
- __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0xe0);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed single precision floating point values in xmm
-instruct Repl2F_immF0(regD dst, immF0 zero) %{
- predicate(UseSSE>=2);
- match(Set dst (Replicate2F zero));
- format %{ "PXOR $dst,$dst\t! replicate2F" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
// =======================================================================
// fast clearing of an array
@@ -11898,7 +11659,7 @@ instruct array_equals(eDIRegP ary1, eSIRegP ary2, eAXRegI result,
//----------Control Flow Instructions------------------------------------------
// Signed compare Instructions
-instruct compI_eReg(eFlagsReg cr, eRegI op1, eRegI op2) %{
+instruct compI_eReg(eFlagsReg cr, rRegI op1, rRegI op2) %{
match(Set cr (CmpI op1 op2));
effect( DEF cr, USE op1, USE op2 );
format %{ "CMP $op1,$op2" %}
@@ -11907,7 +11668,7 @@ instruct compI_eReg(eFlagsReg cr, eRegI op1, eRegI op2) %{
ins_pipe( ialu_cr_reg_reg );
%}
-instruct compI_eReg_imm(eFlagsReg cr, eRegI op1, immI op2) %{
+instruct compI_eReg_imm(eFlagsReg cr, rRegI op1, immI op2) %{
match(Set cr (CmpI op1 op2));
effect( DEF cr, USE op1 );
format %{ "CMP $op1,$op2" %}
@@ -11918,7 +11679,7 @@ instruct compI_eReg_imm(eFlagsReg cr, eRegI op1, immI op2) %{
%}
// Cisc-spilled version of cmpI_eReg
-instruct compI_eReg_mem(eFlagsReg cr, eRegI op1, memory op2) %{
+instruct compI_eReg_mem(eFlagsReg cr, rRegI op1, memory op2) %{
match(Set cr (CmpI op1 (LoadI op2)));
format %{ "CMP $op1,$op2" %}
@@ -11928,7 +11689,7 @@ instruct compI_eReg_mem(eFlagsReg cr, eRegI op1, memory op2) %{
ins_pipe( ialu_cr_reg_mem );
%}
-instruct testI_reg( eFlagsReg cr, eRegI src, immI0 zero ) %{
+instruct testI_reg( eFlagsReg cr, rRegI src, immI0 zero ) %{
match(Set cr (CmpI src zero));
effect( DEF cr, USE src );
@@ -11938,7 +11699,7 @@ instruct testI_reg( eFlagsReg cr, eRegI src, immI0 zero ) %{
ins_pipe( ialu_cr_reg_imm );
%}
-instruct testI_reg_imm( eFlagsReg cr, eRegI src, immI con, immI0 zero ) %{
+instruct testI_reg_imm( eFlagsReg cr, rRegI src, immI con, immI0 zero ) %{
match(Set cr (CmpI (AndI src con) zero));
format %{ "TEST $src,$con" %}
@@ -11947,7 +11708,7 @@ instruct testI_reg_imm( eFlagsReg cr, eRegI src, immI con, immI0 zero ) %{
ins_pipe( ialu_cr_reg_imm );
%}
-instruct testI_reg_mem( eFlagsReg cr, eRegI src, memory mem, immI0 zero ) %{
+instruct testI_reg_mem( eFlagsReg cr, rRegI src, memory mem, immI0 zero ) %{
match(Set cr (CmpI (AndI src mem) zero));
format %{ "TEST $src,$mem" %}
@@ -11958,7 +11719,7 @@ instruct testI_reg_mem( eFlagsReg cr, eRegI src, memory mem, immI0 zero ) %{
// Unsigned compare Instructions; really, same as signed except they
// produce an eFlagsRegU instead of eFlagsReg.
-instruct compU_eReg(eFlagsRegU cr, eRegI op1, eRegI op2) %{
+instruct compU_eReg(eFlagsRegU cr, rRegI op1, rRegI op2) %{
match(Set cr (CmpU op1 op2));
format %{ "CMPu $op1,$op2" %}
@@ -11967,7 +11728,7 @@ instruct compU_eReg(eFlagsRegU cr, eRegI op1, eRegI op2) %{
ins_pipe( ialu_cr_reg_reg );
%}
-instruct compU_eReg_imm(eFlagsRegU cr, eRegI op1, immI op2) %{
+instruct compU_eReg_imm(eFlagsRegU cr, rRegI op1, immI op2) %{
match(Set cr (CmpU op1 op2));
format %{ "CMPu $op1,$op2" %}
@@ -11977,7 +11738,7 @@ instruct compU_eReg_imm(eFlagsRegU cr, eRegI op1, immI op2) %{
%}
// // Cisc-spilled version of cmpU_eReg
-instruct compU_eReg_mem(eFlagsRegU cr, eRegI op1, memory op2) %{
+instruct compU_eReg_mem(eFlagsRegU cr, rRegI op1, memory op2) %{
match(Set cr (CmpU op1 (LoadI op2)));
format %{ "CMPu $op1,$op2" %}
@@ -11988,7 +11749,7 @@ instruct compU_eReg_mem(eFlagsRegU cr, eRegI op1, memory op2) %{
%}
// // Cisc-spilled version of cmpU_eReg
-//instruct compU_mem_eReg(eFlagsRegU cr, memory op1, eRegI op2) %{
+//instruct compU_mem_eReg(eFlagsRegU cr, memory op1, rRegI op2) %{
// match(Set cr (CmpU (LoadI op1) op2));
//
// format %{ "CMPu $op1,$op2" %}
@@ -11997,7 +11758,7 @@ instruct compU_eReg_mem(eFlagsRegU cr, eRegI op1, memory op2) %{
// ins_encode( OpcP, RegMem( op1, op2) );
//%}
-instruct testU_reg( eFlagsRegU cr, eRegI src, immI0 zero ) %{
+instruct testU_reg( eFlagsRegU cr, rRegI src, immI0 zero ) %{
match(Set cr (CmpU src zero));
format %{ "TESTu $src,$src" %}
@@ -12093,7 +11854,7 @@ instruct testP_Reg_mem( eFlagsReg cr, memory op, immI0 zero ) %{
// *** Min and Max using the conditional move are slower than the
// *** branch version on a Pentium III.
// // Conditional move for min
-//instruct cmovI_reg_lt( eRegI op2, eRegI op1, eFlagsReg cr ) %{
+//instruct cmovI_reg_lt( rRegI op2, rRegI op1, eFlagsReg cr ) %{
// effect( USE_DEF op2, USE op1, USE cr );
// format %{ "CMOVlt $op2,$op1\t! min" %}
// opcode(0x4C,0x0F);
@@ -12102,7 +11863,7 @@ instruct testP_Reg_mem( eFlagsReg cr, memory op, immI0 zero ) %{
//%}
//
//// Min Register with Register (P6 version)
-//instruct minI_eReg_p6( eRegI op1, eRegI op2 ) %{
+//instruct minI_eReg_p6( rRegI op1, rRegI op2 ) %{
// predicate(VM_Version::supports_cmov() );
// match(Set op2 (MinI op1 op2));
// ins_cost(200);
@@ -12114,7 +11875,7 @@ instruct testP_Reg_mem( eFlagsReg cr, memory op, immI0 zero ) %{
//%}
// Min Register with Register (generic version)
-instruct minI_eReg(eRegI dst, eRegI src, eFlagsReg flags) %{
+instruct minI_eReg(rRegI dst, rRegI src, eFlagsReg flags) %{
match(Set dst (MinI dst src));
effect(KILL flags);
ins_cost(300);
@@ -12129,7 +11890,7 @@ instruct minI_eReg(eRegI dst, eRegI src, eFlagsReg flags) %{
// *** Min and Max using the conditional move are slower than the
// *** branch version on a Pentium III.
// // Conditional move for max
-//instruct cmovI_reg_gt( eRegI op2, eRegI op1, eFlagsReg cr ) %{
+//instruct cmovI_reg_gt( rRegI op2, rRegI op1, eFlagsReg cr ) %{
// effect( USE_DEF op2, USE op1, USE cr );
// format %{ "CMOVgt $op2,$op1\t! max" %}
// opcode(0x4F,0x0F);
@@ -12138,7 +11899,7 @@ instruct minI_eReg(eRegI dst, eRegI src, eFlagsReg flags) %{
//%}
//
// // Max Register with Register (P6 version)
-//instruct maxI_eReg_p6( eRegI op1, eRegI op2 ) %{
+//instruct maxI_eReg_p6( rRegI op1, rRegI op2 ) %{
// predicate(VM_Version::supports_cmov() );
// match(Set op2 (MaxI op1 op2));
// ins_cost(200);
@@ -12150,7 +11911,7 @@ instruct minI_eReg(eRegI dst, eRegI src, eFlagsReg flags) %{
//%}
// Max Register with Register (generic version)
-instruct maxI_eReg(eRegI dst, eRegI src, eFlagsReg flags) %{
+instruct maxI_eReg(rRegI dst, rRegI src, eFlagsReg flags) %{
match(Set dst (MaxI dst src));
effect(KILL flags);
ins_cost(300);
@@ -12211,7 +11972,7 @@ instruct loopLimit_eReg(eAXRegI limit, nadxRegI init, immI stride, eDXRegI limit
// ============================================================================
// Branch Instructions
// Jump Table
-instruct jumpXtnd(eRegI switch_val) %{
+instruct jumpXtnd(rRegI switch_val) %{
match(Jump switch_val);
ins_cost(350);
format %{ "JMP [$constantaddress](,$switch_val,1)\n\t" %}
@@ -12629,7 +12390,7 @@ instruct cmpL_zero_flags_LTGE( flagsReg_long_LTGE flags, eRegL src, immL0 zero )
// Manifest a CmpL result in the normal flags. Only good for LT or GE
// compares. Can be used for LE or GT compares by reversing arguments.
// NOT GOOD FOR EQ/NE tests.
-instruct cmpL_reg_flags_LTGE( flagsReg_long_LTGE flags, eRegL src1, eRegL src2, eRegI tmp ) %{
+instruct cmpL_reg_flags_LTGE( flagsReg_long_LTGE flags, eRegL src1, eRegL src2, rRegI tmp ) %{
match( Set flags (CmpL src1 src2 ));
effect( TEMP tmp );
ins_cost(300);
@@ -12675,7 +12436,7 @@ instruct cmovLL_mem_LTGE(cmpOp cmp, flagsReg_long_LTGE flags, eRegL dst, load_lo
%}
// Compare 2 longs and CMOVE ints.
-instruct cmovII_reg_LTGE(cmpOp cmp, flagsReg_long_LTGE flags, eRegI dst, eRegI src) %{
+instruct cmovII_reg_LTGE(cmpOp cmp, flagsReg_long_LTGE flags, rRegI dst, rRegI src) %{
predicate(VM_Version::supports_cmov() && ( _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::lt || _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::ge ));
match(Set dst (CMoveI (Binary cmp flags) (Binary dst src)));
ins_cost(200);
@@ -12685,7 +12446,7 @@ instruct cmovII_reg_LTGE(cmpOp cmp, flagsReg_long_LTGE flags, eRegI dst, eRegI s
ins_pipe( pipe_cmov_reg );
%}
-instruct cmovII_mem_LTGE(cmpOp cmp, flagsReg_long_LTGE flags, eRegI dst, memory src) %{
+instruct cmovII_mem_LTGE(cmpOp cmp, flagsReg_long_LTGE flags, rRegI dst, memory src) %{
predicate(VM_Version::supports_cmov() && ( _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::lt || _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::ge ));
match(Set dst (CMoveI (Binary cmp flags) (Binary dst (LoadI src))));
ins_cost(250);
@@ -12746,7 +12507,7 @@ instruct cmovFF_reg_LTGE(cmpOp cmp, flagsReg_long_LTGE flags, regF dst, regF src
//======
// Manifest a CmpL result in the normal flags. Only good for EQ/NE compares.
-instruct cmpL_zero_flags_EQNE( flagsReg_long_EQNE flags, eRegL src, immL0 zero, eRegI tmp ) %{
+instruct cmpL_zero_flags_EQNE( flagsReg_long_EQNE flags, eRegL src, immL0 zero, rRegI tmp ) %{
match( Set flags (CmpL src zero ));
effect(TEMP tmp);
ins_cost(200);
@@ -12803,7 +12564,7 @@ instruct cmovLL_mem_EQNE(cmpOp cmp, flagsReg_long_EQNE flags, eRegL dst, load_lo
%}
// Compare 2 longs and CMOVE ints.
-instruct cmovII_reg_EQNE(cmpOp cmp, flagsReg_long_EQNE flags, eRegI dst, eRegI src) %{
+instruct cmovII_reg_EQNE(cmpOp cmp, flagsReg_long_EQNE flags, rRegI dst, rRegI src) %{
predicate(VM_Version::supports_cmov() && ( _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::eq || _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::ne ));
match(Set dst (CMoveI (Binary cmp flags) (Binary dst src)));
ins_cost(200);
@@ -12813,7 +12574,7 @@ instruct cmovII_reg_EQNE(cmpOp cmp, flagsReg_long_EQNE flags, eRegI dst, eRegI s
ins_pipe( pipe_cmov_reg );
%}
-instruct cmovII_mem_EQNE(cmpOp cmp, flagsReg_long_EQNE flags, eRegI dst, memory src) %{
+instruct cmovII_mem_EQNE(cmpOp cmp, flagsReg_long_EQNE flags, rRegI dst, memory src) %{
predicate(VM_Version::supports_cmov() && ( _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::eq || _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::ne ));
match(Set dst (CMoveI (Binary cmp flags) (Binary dst (LoadI src))));
ins_cost(250);
@@ -12875,7 +12636,7 @@ instruct cmovFF_reg_EQNE(cmpOp cmp, flagsReg_long_EQNE flags, regF dst, regF src
//======
// Manifest a CmpL result in the normal flags. Only good for LE or GT compares.
// Same as cmpL_reg_flags_LEGT except must negate src
-instruct cmpL_zero_flags_LEGT( flagsReg_long_LEGT flags, eRegL src, immL0 zero, eRegI tmp ) %{
+instruct cmpL_zero_flags_LEGT( flagsReg_long_LEGT flags, eRegL src, immL0 zero, rRegI tmp ) %{
match( Set flags (CmpL src zero ));
effect( TEMP tmp );
ins_cost(300);
@@ -12889,7 +12650,7 @@ instruct cmpL_zero_flags_LEGT( flagsReg_long_LEGT flags, eRegL src, immL0 zero,
// Manifest a CmpL result in the normal flags. Only good for LE or GT compares.
// Same as cmpL_reg_flags_LTGE except operands swapped. Swapping operands
// requires a commuted test to get the same result.
-instruct cmpL_reg_flags_LEGT( flagsReg_long_LEGT flags, eRegL src1, eRegL src2, eRegI tmp ) %{
+instruct cmpL_reg_flags_LEGT( flagsReg_long_LEGT flags, eRegL src1, eRegL src2, rRegI tmp ) %{
match( Set flags (CmpL src1 src2 ));
effect( TEMP tmp );
ins_cost(300);
@@ -12936,7 +12697,7 @@ instruct cmovLL_mem_LEGT(cmpOp_commute cmp, flagsReg_long_LEGT flags, eRegL dst,
%}
// Compare 2 longs and CMOVE ints.
-instruct cmovII_reg_LEGT(cmpOp_commute cmp, flagsReg_long_LEGT flags, eRegI dst, eRegI src) %{
+instruct cmovII_reg_LEGT(cmpOp_commute cmp, flagsReg_long_LEGT flags, rRegI dst, rRegI src) %{
predicate(VM_Version::supports_cmov() && ( _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::le || _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::gt ));
match(Set dst (CMoveI (Binary cmp flags) (Binary dst src)));
ins_cost(200);
@@ -12946,7 +12707,7 @@ instruct cmovII_reg_LEGT(cmpOp_commute cmp, flagsReg_long_LEGT flags, eRegI dst,
ins_pipe( pipe_cmov_reg );
%}
-instruct cmovII_mem_LEGT(cmpOp_commute cmp, flagsReg_long_LEGT flags, eRegI dst, memory src) %{
+instruct cmovII_mem_LEGT(cmpOp_commute cmp, flagsReg_long_LEGT flags, rRegI dst, memory src) %{
predicate(VM_Version::supports_cmov() && ( _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::le || _kids[0]->_kids[0]->_leaf->as_Bool()->_test._test == BoolTest::gt ));
match(Set dst (CMoveI (Binary cmp flags) (Binary dst (LoadI src))));
ins_cost(250);
@@ -13275,11 +13036,11 @@ instruct tlsLoadP(eRegP dst, eFlagsReg cr) %{
// ---------EXAMPLE----------------------------------------------------------
//
// // pertinent parts of existing instructions in architecture description
-// instruct movI(eRegI dst, eRegI src) %{
+// instruct movI(rRegI dst, rRegI src) %{
// match(Set dst (CopyI src));
// %}
//
-// instruct incI_eReg(eRegI dst, immI1 src, eFlagsReg cr) %{
+// instruct incI_eReg(rRegI dst, immI1 src, eFlagsReg cr) %{
// match(Set dst (AddI dst src));
// effect(KILL cr);
// %}
@@ -13324,11 +13085,11 @@ instruct tlsLoadP(eRegP dst, eFlagsReg cr) %{
// %}
// // Change load of spilled value to only a spill
-// instruct storeI(memory mem, eRegI src) %{
+// instruct storeI(memory mem, rRegI src) %{
// match(Set mem (StoreI mem src));
// %}
//
-// instruct loadI(eRegI dst, memory mem) %{
+// instruct loadI(rRegI dst, memory mem) %{
// match(Set dst (LoadI mem));
// %}
//
diff --git a/hotspot/src/cpu/x86/vm/x86_64.ad b/hotspot/src/cpu/x86/vm/x86_64.ad
index 1a5e1c86c6c..68c6d354012 100644
--- a/hotspot/src/cpu/x86/vm/x86_64.ad
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad
@@ -131,102 +131,6 @@ reg_def R15_H(SOC, SOE, Op_RegI, 15, r15->as_VMReg()->next());
// Floating Point Registers
-// XMM registers. 128-bit registers or 4 words each, labeled (a)-d.
-// Word a in each register holds a Float, words ab hold a Double. We
-// currently do not use the SIMD capabilities, so registers cd are
-// unused at the moment.
-// XMM8-XMM15 must be encoded with REX.
-// Linux ABI: No register preserved across function calls
-// XMM0-XMM7 might hold parameters
-// Windows ABI: XMM6-XMM15 preserved across function calls
-// XMM0-XMM3 might hold parameters
-
-reg_def XMM0 (SOC, SOC, Op_RegF, 0, xmm0->as_VMReg());
-reg_def XMM0_H (SOC, SOC, Op_RegF, 0, xmm0->as_VMReg()->next());
-
-reg_def XMM1 (SOC, SOC, Op_RegF, 1, xmm1->as_VMReg());
-reg_def XMM1_H (SOC, SOC, Op_RegF, 1, xmm1->as_VMReg()->next());
-
-reg_def XMM2 (SOC, SOC, Op_RegF, 2, xmm2->as_VMReg());
-reg_def XMM2_H (SOC, SOC, Op_RegF, 2, xmm2->as_VMReg()->next());
-
-reg_def XMM3 (SOC, SOC, Op_RegF, 3, xmm3->as_VMReg());
-reg_def XMM3_H (SOC, SOC, Op_RegF, 3, xmm3->as_VMReg()->next());
-
-reg_def XMM4 (SOC, SOC, Op_RegF, 4, xmm4->as_VMReg());
-reg_def XMM4_H (SOC, SOC, Op_RegF, 4, xmm4->as_VMReg()->next());
-
-reg_def XMM5 (SOC, SOC, Op_RegF, 5, xmm5->as_VMReg());
-reg_def XMM5_H (SOC, SOC, Op_RegF, 5, xmm5->as_VMReg()->next());
-
-#ifdef _WIN64
-
-reg_def XMM6 (SOC, SOE, Op_RegF, 6, xmm6->as_VMReg());
-reg_def XMM6_H (SOC, SOE, Op_RegF, 6, xmm6->as_VMReg()->next());
-
-reg_def XMM7 (SOC, SOE, Op_RegF, 7, xmm7->as_VMReg());
-reg_def XMM7_H (SOC, SOE, Op_RegF, 7, xmm7->as_VMReg()->next());
-
-reg_def XMM8 (SOC, SOE, Op_RegF, 8, xmm8->as_VMReg());
-reg_def XMM8_H (SOC, SOE, Op_RegF, 8, xmm8->as_VMReg()->next());
-
-reg_def XMM9 (SOC, SOE, Op_RegF, 9, xmm9->as_VMReg());
-reg_def XMM9_H (SOC, SOE, Op_RegF, 9, xmm9->as_VMReg()->next());
-
-reg_def XMM10 (SOC, SOE, Op_RegF, 10, xmm10->as_VMReg());
-reg_def XMM10_H(SOC, SOE, Op_RegF, 10, xmm10->as_VMReg()->next());
-
-reg_def XMM11 (SOC, SOE, Op_RegF, 11, xmm11->as_VMReg());
-reg_def XMM11_H(SOC, SOE, Op_RegF, 11, xmm11->as_VMReg()->next());
-
-reg_def XMM12 (SOC, SOE, Op_RegF, 12, xmm12->as_VMReg());
-reg_def XMM12_H(SOC, SOE, Op_RegF, 12, xmm12->as_VMReg()->next());
-
-reg_def XMM13 (SOC, SOE, Op_RegF, 13, xmm13->as_VMReg());
-reg_def XMM13_H(SOC, SOE, Op_RegF, 13, xmm13->as_VMReg()->next());
-
-reg_def XMM14 (SOC, SOE, Op_RegF, 14, xmm14->as_VMReg());
-reg_def XMM14_H(SOC, SOE, Op_RegF, 14, xmm14->as_VMReg()->next());
-
-reg_def XMM15 (SOC, SOE, Op_RegF, 15, xmm15->as_VMReg());
-reg_def XMM15_H(SOC, SOE, Op_RegF, 15, xmm15->as_VMReg()->next());
-
-#else
-
-reg_def XMM6 (SOC, SOC, Op_RegF, 6, xmm6->as_VMReg());
-reg_def XMM6_H (SOC, SOC, Op_RegF, 6, xmm6->as_VMReg()->next());
-
-reg_def XMM7 (SOC, SOC, Op_RegF, 7, xmm7->as_VMReg());
-reg_def XMM7_H (SOC, SOC, Op_RegF, 7, xmm7->as_VMReg()->next());
-
-reg_def XMM8 (SOC, SOC, Op_RegF, 8, xmm8->as_VMReg());
-reg_def XMM8_H (SOC, SOC, Op_RegF, 8, xmm8->as_VMReg()->next());
-
-reg_def XMM9 (SOC, SOC, Op_RegF, 9, xmm9->as_VMReg());
-reg_def XMM9_H (SOC, SOC, Op_RegF, 9, xmm9->as_VMReg()->next());
-
-reg_def XMM10 (SOC, SOC, Op_RegF, 10, xmm10->as_VMReg());
-reg_def XMM10_H(SOC, SOC, Op_RegF, 10, xmm10->as_VMReg()->next());
-
-reg_def XMM11 (SOC, SOC, Op_RegF, 11, xmm11->as_VMReg());
-reg_def XMM11_H(SOC, SOC, Op_RegF, 11, xmm11->as_VMReg()->next());
-
-reg_def XMM12 (SOC, SOC, Op_RegF, 12, xmm12->as_VMReg());
-reg_def XMM12_H(SOC, SOC, Op_RegF, 12, xmm12->as_VMReg()->next());
-
-reg_def XMM13 (SOC, SOC, Op_RegF, 13, xmm13->as_VMReg());
-reg_def XMM13_H(SOC, SOC, Op_RegF, 13, xmm13->as_VMReg()->next());
-
-reg_def XMM14 (SOC, SOC, Op_RegF, 14, xmm14->as_VMReg());
-reg_def XMM14_H(SOC, SOC, Op_RegF, 14, xmm14->as_VMReg()->next());
-
-reg_def XMM15 (SOC, SOC, Op_RegF, 15, xmm15->as_VMReg());
-reg_def XMM15_H(SOC, SOC, Op_RegF, 15, xmm15->as_VMReg()->next());
-
-#endif // _WIN64
-
-reg_def RFLAGS(SOC, SOC, 0, 16, VMRegImpl::Bad());
-
// Specify priority of register selection within phases of register
// allocation. Highest priority is first. A useful heuristic is to
// give registers a low priority when they are required by machine
@@ -252,26 +156,6 @@ alloc_class chunk0(R10, R10_H,
R15, R15_H,
RSP, RSP_H);
-// XXX probably use 8-15 first on Linux
-alloc_class chunk1(XMM0, XMM0_H,
- XMM1, XMM1_H,
- XMM2, XMM2_H,
- XMM3, XMM3_H,
- XMM4, XMM4_H,
- XMM5, XMM5_H,
- XMM6, XMM6_H,
- XMM7, XMM7_H,
- XMM8, XMM8_H,
- XMM9, XMM9_H,
- XMM10, XMM10_H,
- XMM11, XMM11_H,
- XMM12, XMM12_H,
- XMM13, XMM13_H,
- XMM14, XMM14_H,
- XMM15, XMM15_H);
-
-alloc_class chunk2(RFLAGS);
-
//----------Architecture Description Register Classes--------------------------
// Several register classes are automatically defined based upon information in
@@ -501,47 +385,8 @@ reg_class int_rdi_reg(RDI);
// Singleton class for instruction pointer
// reg_class ip_reg(RIP);
-// Singleton class for condition codes
-reg_class int_flags(RFLAGS);
-
-// Class for all float registers
-reg_class float_reg(XMM0,
- XMM1,
- XMM2,
- XMM3,
- XMM4,
- XMM5,
- XMM6,
- XMM7,
- XMM8,
- XMM9,
- XMM10,
- XMM11,
- XMM12,
- XMM13,
- XMM14,
- XMM15);
-
-// Class for all double registers
-reg_class double_reg(XMM0, XMM0_H,
- XMM1, XMM1_H,
- XMM2, XMM2_H,
- XMM3, XMM3_H,
- XMM4, XMM4_H,
- XMM5, XMM5_H,
- XMM6, XMM6_H,
- XMM7, XMM7_H,
- XMM8, XMM8_H,
- XMM9, XMM9_H,
- XMM10, XMM10_H,
- XMM11, XMM11_H,
- XMM12, XMM12_H,
- XMM13, XMM13_H,
- XMM14, XMM14_H,
- XMM15, XMM15_H);
%}
-
//----------SOURCE BLOCK-------------------------------------------------------
// This is a block of C++ code which provides values, functions, and
// definitions necessary in the rest of the architecture description
@@ -1027,12 +872,84 @@ static enum RC rc_class(OptoReg::Name reg)
return rc_float;
}
+// Next two methods are shared by 32- and 64-bit VM. They are defined in x86.ad.
+static int vec_mov_helper(CodeBuffer *cbuf, bool do_size, int src_lo, int dst_lo,
+ int src_hi, int dst_hi, uint ireg, outputStream* st);
+
+static int vec_spill_helper(CodeBuffer *cbuf, bool do_size, bool is_load,
+ int stack_offset, int reg, uint ireg, outputStream* st);
+
+static void vec_stack_to_stack_helper(CodeBuffer *cbuf, int src_offset,
+ int dst_offset, uint ireg, outputStream* st) {
+ if (cbuf) {
+ MacroAssembler _masm(cbuf);
+ switch (ireg) {
+ case Op_VecS:
+ __ movq(Address(rsp, -8), rax);
+ __ movl(rax, Address(rsp, src_offset));
+ __ movl(Address(rsp, dst_offset), rax);
+ __ movq(rax, Address(rsp, -8));
+ break;
+ case Op_VecD:
+ __ pushq(Address(rsp, src_offset));
+ __ popq (Address(rsp, dst_offset));
+ break;
+ case Op_VecX:
+ __ pushq(Address(rsp, src_offset));
+ __ popq (Address(rsp, dst_offset));
+ __ pushq(Address(rsp, src_offset+8));
+ __ popq (Address(rsp, dst_offset+8));
+ break;
+ case Op_VecY:
+ __ vmovdqu(Address(rsp, -32), xmm0);
+ __ vmovdqu(xmm0, Address(rsp, src_offset));
+ __ vmovdqu(Address(rsp, dst_offset), xmm0);
+ __ vmovdqu(xmm0, Address(rsp, -32));
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+#ifndef PRODUCT
+ } else {
+ switch (ireg) {
+ case Op_VecS:
+ st->print("movq [rsp - #8], rax\t# 32-bit mem-mem spill\n\t"
+ "movl rax, [rsp + #%d]\n\t"
+ "movl [rsp + #%d], rax\n\t"
+ "movq rax, [rsp - #8]",
+ src_offset, dst_offset);
+ break;
+ case Op_VecD:
+ st->print("pushq [rsp + #%d]\t# 64-bit mem-mem spill\n\t"
+ "popq [rsp + #%d]",
+ src_offset, dst_offset);
+ break;
+ case Op_VecX:
+ st->print("pushq [rsp + #%d]\t# 128-bit mem-mem spill\n\t"
+ "popq [rsp + #%d]\n\t"
+ "pushq [rsp + #%d]\n\t"
+ "popq [rsp + #%d]",
+ src_offset, dst_offset, src_offset+8, dst_offset+8);
+ break;
+ case Op_VecY:
+ st->print("vmovdqu [rsp - #32], xmm0\t# 256-bit mem-mem spill\n\t"
+ "vmovdqu xmm0, [rsp + #%d]\n\t"
+ "vmovdqu [rsp + #%d], xmm0\n\t"
+ "vmovdqu xmm0, [rsp - #32]",
+ src_offset, dst_offset);
+ break;
+ default:
+ ShouldNotReachHere();
+ }
+#endif
+ }
+}
+
uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
PhaseRegAlloc* ra_,
bool do_size,
- outputStream* st) const
-{
-
+ outputStream* st) const {
+ assert(cbuf != NULL || st != NULL, "sanity");
// Get registers to move
OptoReg::Name src_second = ra_->get_reg_second(in(1));
OptoReg::Name src_first = ra_->get_reg_first(in(1));
@@ -1050,7 +967,30 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
if (src_first == dst_first && src_second == dst_second) {
// Self copy, no move
return 0;
- } else if (src_first_rc == rc_stack) {
+ }
+ if (bottom_type()->isa_vect() != NULL) {
+ uint ireg = ideal_reg();
+ assert((src_first_rc != rc_int && dst_first_rc != rc_int), "sanity");
+ assert((ireg == Op_VecS || ireg == Op_VecD || ireg == Op_VecX || ireg == Op_VecY), "sanity");
+ if( src_first_rc == rc_stack && dst_first_rc == rc_stack ) {
+ // mem -> mem
+ int src_offset = ra_->reg2offset(src_first);
+ int dst_offset = ra_->reg2offset(dst_first);
+ vec_stack_to_stack_helper(cbuf, src_offset, dst_offset, ireg, st);
+ } else if (src_first_rc == rc_float && dst_first_rc == rc_float ) {
+ vec_mov_helper(cbuf, false, src_first, dst_first, src_second, dst_second, ireg, st);
+ } else if (src_first_rc == rc_float && dst_first_rc == rc_stack ) {
+ int stack_offset = ra_->reg2offset(dst_first);
+ vec_spill_helper(cbuf, false, false, stack_offset, src_first, ireg, st);
+ } else if (src_first_rc == rc_stack && dst_first_rc == rc_float ) {
+ int stack_offset = ra_->reg2offset(src_first);
+ vec_spill_helper(cbuf, false, true, stack_offset, dst_first, ireg, st);
+ } else {
+ ShouldNotReachHere();
+ }
+ return 0;
+ }
+ if (src_first_rc == rc_stack) {
// mem ->
if (dst_first_rc == rc_stack) {
// mem -> mem
@@ -1061,23 +1001,16 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
int src_offset = ra_->reg2offset(src_first);
int dst_offset = ra_->reg2offset(dst_first);
if (cbuf) {
- emit_opcode(*cbuf, 0xFF);
- encode_RegMem(*cbuf, RSI_enc, RSP_enc, 0x4, 0, src_offset, false);
-
- emit_opcode(*cbuf, 0x8F);
- encode_RegMem(*cbuf, RAX_enc, RSP_enc, 0x4, 0, dst_offset, false);
-
+ MacroAssembler _masm(cbuf);
+ __ pushq(Address(rsp, src_offset));
+ __ popq (Address(rsp, dst_offset));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("pushq [rsp + #%d]\t# 64-bit mem-mem spill\n\t"
- "popq [rsp + #%d]",
- src_offset,
- dst_offset);
+ "popq [rsp + #%d]",
+ src_offset, dst_offset);
#endif
}
- return
- 3 + ((src_offset == 0) ? 0 : (src_offset < 0x80 ? 1 : 4)) +
- 3 + ((dst_offset == 0) ? 0 : (dst_offset < 0x80 ? 1 : 4));
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
@@ -1086,46 +1019,22 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
int src_offset = ra_->reg2offset(src_first);
int dst_offset = ra_->reg2offset(dst_first);
if (cbuf) {
- emit_opcode(*cbuf, Assembler::REX_W);
- emit_opcode(*cbuf, 0x89);
- emit_opcode(*cbuf, 0x44);
- emit_opcode(*cbuf, 0x24);
- emit_opcode(*cbuf, 0xF8);
-
- emit_opcode(*cbuf, 0x8B);
- encode_RegMem(*cbuf,
- RAX_enc,
- RSP_enc, 0x4, 0, src_offset,
- false);
-
- emit_opcode(*cbuf, 0x89);
- encode_RegMem(*cbuf,
- RAX_enc,
- RSP_enc, 0x4, 0, dst_offset,
- false);
-
- emit_opcode(*cbuf, Assembler::REX_W);
- emit_opcode(*cbuf, 0x8B);
- emit_opcode(*cbuf, 0x44);
- emit_opcode(*cbuf, 0x24);
- emit_opcode(*cbuf, 0xF8);
-
+ MacroAssembler _masm(cbuf);
+ __ movq(Address(rsp, -8), rax);
+ __ movl(rax, Address(rsp, src_offset));
+ __ movl(Address(rsp, dst_offset), rax);
+ __ movq(rax, Address(rsp, -8));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movq [rsp - #8], rax\t# 32-bit mem-mem spill\n\t"
- "movl rax, [rsp + #%d]\n\t"
- "movl [rsp + #%d], rax\n\t"
- "movq rax, [rsp - #8]",
- src_offset,
- dst_offset);
+ "movl rax, [rsp + #%d]\n\t"
+ "movl [rsp + #%d], rax\n\t"
+ "movq rax, [rsp - #8]",
+ src_offset, dst_offset);
#endif
}
- return
- 5 + // movq
- 3 + ((src_offset == 0) ? 0 : (src_offset < 0x80 ? 1 : 4)) + // movl
- 3 + ((dst_offset == 0) ? 0 : (dst_offset < 0x80 ? 1 : 4)) + // movl
- 5; // movq
}
+ return 0;
} else if (dst_first_rc == rc_int) {
// mem -> gpr
if ((src_first & 1) == 0 && src_first + 1 == src_second &&
@@ -1133,52 +1042,32 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
// 64-bit
int offset = ra_->reg2offset(src_first);
if (cbuf) {
- if (Matcher::_regEncode[dst_first] < 8) {
- emit_opcode(*cbuf, Assembler::REX_W);
- } else {
- emit_opcode(*cbuf, Assembler::REX_WR);
- }
- emit_opcode(*cbuf, 0x8B);
- encode_RegMem(*cbuf,
- Matcher::_regEncode[dst_first],
- RSP_enc, 0x4, 0, offset,
- false);
+ MacroAssembler _masm(cbuf);
+ __ movq(as_Register(Matcher::_regEncode[dst_first]), Address(rsp, offset));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movq %s, [rsp + #%d]\t# spill",
Matcher::regName[dst_first],
offset);
#endif
}
- return
- ((offset == 0) ? 0 : (offset < 0x80 ? 1 : 4)) + 4; // REX
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
assert(!((dst_first & 1) == 0 && dst_first + 1 == dst_second), "no transform");
int offset = ra_->reg2offset(src_first);
if (cbuf) {
- if (Matcher::_regEncode[dst_first] >= 8) {
- emit_opcode(*cbuf, Assembler::REX_R);
- }
- emit_opcode(*cbuf, 0x8B);
- encode_RegMem(*cbuf,
- Matcher::_regEncode[dst_first],
- RSP_enc, 0x4, 0, offset,
- false);
+ MacroAssembler _masm(cbuf);
+ __ movl(as_Register(Matcher::_regEncode[dst_first]), Address(rsp, offset));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movl %s, [rsp + #%d]\t# spill",
Matcher::regName[dst_first],
offset);
#endif
}
- return
- ((offset == 0) ? 0 : (offset < 0x80 ? 1 : 4)) +
- ((Matcher::_regEncode[dst_first] < 8)
- ? 3
- : 4); // REX
}
+ return 0;
} else if (dst_first_rc == rc_float) {
// mem-> xmm
if ((src_first & 1) == 0 && src_first + 1 == src_second &&
@@ -1189,18 +1078,13 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movdbl( as_XMMRegister(Matcher::_regEncode[dst_first]), Address(rsp, offset));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("%s %s, [rsp + #%d]\t# spill",
UseXmmLoadAndClearUpper ? "movsd " : "movlpd",
Matcher::regName[dst_first],
offset);
#endif
}
- return
- ((offset == 0) ? 0 : (offset < 0x80 ? 1 : 4)) +
- ((Matcher::_regEncode[dst_first] >= 8)
- ? 6
- : (5 + ((UseAVX>0)?1:0))); // REX
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
@@ -1210,18 +1094,14 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movflt( as_XMMRegister(Matcher::_regEncode[dst_first]), Address(rsp, offset));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movss %s, [rsp + #%d]\t# spill",
Matcher::regName[dst_first],
offset);
#endif
}
- return
- ((offset == 0) ? 0 : (offset < 0x80 ? 1 : 4)) +
- ((Matcher::_regEncode[dst_first] >= 8)
- ? 6
- : (5 + ((UseAVX>0)?1:0))); // REX
}
+ return 0;
}
} else if (src_first_rc == rc_int) {
// gpr ->
@@ -1232,113 +1112,65 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
// 64-bit
int offset = ra_->reg2offset(dst_first);
if (cbuf) {
- if (Matcher::_regEncode[src_first] < 8) {
- emit_opcode(*cbuf, Assembler::REX_W);
- } else {
- emit_opcode(*cbuf, Assembler::REX_WR);
- }
- emit_opcode(*cbuf, 0x89);
- encode_RegMem(*cbuf,
- Matcher::_regEncode[src_first],
- RSP_enc, 0x4, 0, offset,
- false);
+ MacroAssembler _masm(cbuf);
+ __ movq(Address(rsp, offset), as_Register(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movq [rsp + #%d], %s\t# spill",
offset,
Matcher::regName[src_first]);
#endif
}
- return ((offset == 0) ? 0 : (offset < 0x80 ? 1 : 4)) + 4; // REX
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
assert(!((dst_first & 1) == 0 && dst_first + 1 == dst_second), "no transform");
int offset = ra_->reg2offset(dst_first);
if (cbuf) {
- if (Matcher::_regEncode[src_first] >= 8) {
- emit_opcode(*cbuf, Assembler::REX_R);
- }
- emit_opcode(*cbuf, 0x89);
- encode_RegMem(*cbuf,
- Matcher::_regEncode[src_first],
- RSP_enc, 0x4, 0, offset,
- false);
+ MacroAssembler _masm(cbuf);
+ __ movl(Address(rsp, offset), as_Register(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movl [rsp + #%d], %s\t# spill",
offset,
Matcher::regName[src_first]);
#endif
}
- return
- ((offset == 0) ? 0 : (offset < 0x80 ? 1 : 4)) +
- ((Matcher::_regEncode[src_first] < 8)
- ? 3
- : 4); // REX
}
+ return 0;
} else if (dst_first_rc == rc_int) {
// gpr -> gpr
if ((src_first & 1) == 0 && src_first + 1 == src_second &&
(dst_first & 1) == 0 && dst_first + 1 == dst_second) {
// 64-bit
if (cbuf) {
- if (Matcher::_regEncode[dst_first] < 8) {
- if (Matcher::_regEncode[src_first] < 8) {
- emit_opcode(*cbuf, Assembler::REX_W);
- } else {
- emit_opcode(*cbuf, Assembler::REX_WB);
- }
- } else {
- if (Matcher::_regEncode[src_first] < 8) {
- emit_opcode(*cbuf, Assembler::REX_WR);
- } else {
- emit_opcode(*cbuf, Assembler::REX_WRB);
- }
- }
- emit_opcode(*cbuf, 0x8B);
- emit_rm(*cbuf, 0x3,
- Matcher::_regEncode[dst_first] & 7,
- Matcher::_regEncode[src_first] & 7);
+ MacroAssembler _masm(cbuf);
+ __ movq(as_Register(Matcher::_regEncode[dst_first]),
+ as_Register(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movq %s, %s\t# spill",
Matcher::regName[dst_first],
Matcher::regName[src_first]);
#endif
}
- return 3; // REX
+ return 0;
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
assert(!((dst_first & 1) == 0 && dst_first + 1 == dst_second), "no transform");
if (cbuf) {
- if (Matcher::_regEncode[dst_first] < 8) {
- if (Matcher::_regEncode[src_first] >= 8) {
- emit_opcode(*cbuf, Assembler::REX_B);
- }
- } else {
- if (Matcher::_regEncode[src_first] < 8) {
- emit_opcode(*cbuf, Assembler::REX_R);
- } else {
- emit_opcode(*cbuf, Assembler::REX_RB);
- }
- }
- emit_opcode(*cbuf, 0x8B);
- emit_rm(*cbuf, 0x3,
- Matcher::_regEncode[dst_first] & 7,
- Matcher::_regEncode[src_first] & 7);
+ MacroAssembler _masm(cbuf);
+ __ movl(as_Register(Matcher::_regEncode[dst_first]),
+ as_Register(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movl %s, %s\t# spill",
Matcher::regName[dst_first],
Matcher::regName[src_first]);
#endif
}
- return
- (Matcher::_regEncode[src_first] < 8 && Matcher::_regEncode[dst_first] < 8)
- ? 2
- : 3; // REX
+ return 0;
}
} else if (dst_first_rc == rc_float) {
// gpr -> xmm
@@ -1349,13 +1181,12 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movdq( as_XMMRegister(Matcher::_regEncode[dst_first]), as_Register(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movdq %s, %s\t# spill",
Matcher::regName[dst_first],
Matcher::regName[src_first]);
#endif
}
- return 5; // REX
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
@@ -1364,17 +1195,14 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movdl( as_XMMRegister(Matcher::_regEncode[dst_first]), as_Register(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movdl %s, %s\t# spill",
Matcher::regName[dst_first],
Matcher::regName[src_first]);
#endif
}
- return
- (Matcher::_regEncode[src_first] >= 8 || Matcher::_regEncode[dst_first] >= 8)
- ? 5
- : (4 + ((UseAVX>0)?1:0)); // REX
}
+ return 0;
}
} else if (src_first_rc == rc_float) {
// xmm ->
@@ -1388,17 +1216,12 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movdbl( Address(rsp, offset), as_XMMRegister(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movsd [rsp + #%d], %s\t# spill",
offset,
Matcher::regName[src_first]);
#endif
}
- return
- ((offset == 0) ? 0 : (offset < 0x80 ? 1 : 4)) +
- ((Matcher::_regEncode[src_first] >= 8)
- ? 6
- : (5 + ((UseAVX>0)?1:0))); // REX
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
@@ -1408,18 +1231,14 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movflt(Address(rsp, offset), as_XMMRegister(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movss [rsp + #%d], %s\t# spill",
offset,
Matcher::regName[src_first]);
#endif
}
- return
- ((offset == 0) ? 0 : (offset < 0x80 ? 1 : 4)) +
- ((Matcher::_regEncode[src_first] >=8)
- ? 6
- : (5 + ((UseAVX>0)?1:0))); // REX
}
+ return 0;
} else if (dst_first_rc == rc_int) {
// xmm -> gpr
if ((src_first & 1) == 0 && src_first + 1 == src_second &&
@@ -1429,13 +1248,12 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movdq( as_Register(Matcher::_regEncode[dst_first]), as_XMMRegister(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movdq %s, %s\t# spill",
Matcher::regName[dst_first],
Matcher::regName[src_first]);
#endif
}
- return 5; // REX
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
@@ -1444,17 +1262,14 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movdl( as_Register(Matcher::_regEncode[dst_first]), as_XMMRegister(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("movdl %s, %s\t# spill",
Matcher::regName[dst_first],
Matcher::regName[src_first]);
#endif
}
- return
- (Matcher::_regEncode[src_first] >= 8 || Matcher::_regEncode[dst_first] >= 8)
- ? 5
- : (4 + ((UseAVX>0)?1:0)); // REX
}
+ return 0;
} else if (dst_first_rc == rc_float) {
// xmm -> xmm
if ((src_first & 1) == 0 && src_first + 1 == src_second &&
@@ -1464,17 +1279,13 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movdbl( as_XMMRegister(Matcher::_regEncode[dst_first]), as_XMMRegister(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("%s %s, %s\t# spill",
UseXmmRegToRegMoveAll ? "movapd" : "movsd ",
Matcher::regName[dst_first],
Matcher::regName[src_first]);
#endif
}
- return
- (Matcher::_regEncode[src_first] >= 8 || Matcher::_regEncode[dst_first] >= 8)
- ? 5
- : (4 + ((UseAVX>0)?1:0)); // REX
} else {
// 32-bit
assert(!((src_first & 1) == 0 && src_first + 1 == src_second), "no transform");
@@ -1483,42 +1294,35 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
MacroAssembler _masm(cbuf);
__ movflt( as_XMMRegister(Matcher::_regEncode[dst_first]), as_XMMRegister(Matcher::_regEncode[src_first]));
#ifndef PRODUCT
- } else if (!do_size) {
+ } else {
st->print("%s %s, %s\t# spill",
UseXmmRegToRegMoveAll ? "movaps" : "movss ",
Matcher::regName[dst_first],
Matcher::regName[src_first]);
#endif
}
- return ((UseAVX>0) ? 5:
- ((Matcher::_regEncode[src_first] >= 8 || Matcher::_regEncode[dst_first] >= 8)
- ? (UseXmmRegToRegMoveAll ? 4 : 5)
- : (UseXmmRegToRegMoveAll ? 3 : 4))); // REX
}
+ return 0;
}
}
assert(0," foo ");
Unimplemented();
-
return 0;
}
#ifndef PRODUCT
-void MachSpillCopyNode::format(PhaseRegAlloc *ra_, outputStream* st) const
-{
+void MachSpillCopyNode::format(PhaseRegAlloc *ra_, outputStream* st) const {
implementation(NULL, ra_, false, st);
}
#endif
-void MachSpillCopyNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const
-{
+void MachSpillCopyNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
implementation(&cbuf, ra_, false, NULL);
}
-uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const
-{
- return implementation(NULL, ra_, true, NULL);
+uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const {
+ return MachNode::size(ra_);
}
//=============================================================================
@@ -1735,16 +1539,6 @@ const bool Matcher::convL2FSupported(void) {
return true;
}
-// Vector width in bytes
-const uint Matcher::vector_width_in_bytes(void) {
- return 8;
-}
-
-// Vector ideal reg
-const uint Matcher::vector_ideal_reg(void) {
- return Op_RegD;
-}
-
// Is this branch offset short enough that a short branch can be used?
//
// NOTE: If the platform does not provide any short branch variants, then
@@ -1831,21 +1625,21 @@ const bool Matcher::int_in_long = true;
bool Matcher::can_be_java_arg(int reg)
{
return
- reg == RDI_num || reg == RDI_H_num ||
- reg == RSI_num || reg == RSI_H_num ||
- reg == RDX_num || reg == RDX_H_num ||
- reg == RCX_num || reg == RCX_H_num ||
- reg == R8_num || reg == R8_H_num ||
- reg == R9_num || reg == R9_H_num ||
- reg == R12_num || reg == R12_H_num ||
- reg == XMM0_num || reg == XMM0_H_num ||
- reg == XMM1_num || reg == XMM1_H_num ||
- reg == XMM2_num || reg == XMM2_H_num ||
- reg == XMM3_num || reg == XMM3_H_num ||
- reg == XMM4_num || reg == XMM4_H_num ||
- reg == XMM5_num || reg == XMM5_H_num ||
- reg == XMM6_num || reg == XMM6_H_num ||
- reg == XMM7_num || reg == XMM7_H_num;
+ reg == RDI_num || reg == RDI_H_num ||
+ reg == RSI_num || reg == RSI_H_num ||
+ reg == RDX_num || reg == RDX_H_num ||
+ reg == RCX_num || reg == RCX_H_num ||
+ reg == R8_num || reg == R8_H_num ||
+ reg == R9_num || reg == R9_H_num ||
+ reg == R12_num || reg == R12_H_num ||
+ reg == XMM0_num || reg == XMM0b_num ||
+ reg == XMM1_num || reg == XMM1b_num ||
+ reg == XMM2_num || reg == XMM2b_num ||
+ reg == XMM3_num || reg == XMM3b_num ||
+ reg == XMM4_num || reg == XMM4b_num ||
+ reg == XMM5_num || reg == XMM5b_num ||
+ reg == XMM6_num || reg == XMM6b_num ||
+ reg == XMM7_num || reg == XMM7b_num;
}
bool Matcher::is_spillable_arg(int reg)
@@ -3220,10 +3014,11 @@ frame
OptoReg::Bad, // Op_RegI
RAX_H_num, // Op_RegP
OptoReg::Bad, // Op_RegF
- XMM0_H_num, // Op_RegD
+ XMM0b_num, // Op_RegD
RAX_H_num // Op_RegL
};
- assert(ARRAY_SIZE(hi) == _last_machine_leaf - 1, "missing type");
+ // Excluded flags and vector registers.
+ assert(ARRAY_SIZE(hi) == _last_machine_leaf - 5, "missing type");
return OptoRegPair(hi[ideal_reg], lo[ideal_reg]);
%}
%}
@@ -3985,7 +3780,6 @@ operand regD()
interface(REG_INTER);
%}
-
//----------Memory Operands----------------------------------------------------
// Direct Memory Operand
// operand direct(immP addr)
@@ -5416,61 +5210,6 @@ instruct loadD(regD dst, memory mem)
ins_pipe(pipe_slow); // XXX
%}
-// Load Aligned Packed Byte to XMM register
-instruct loadA8B(regD dst, memory mem) %{
- match(Set dst (Load8B mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed8B" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Load Aligned Packed Short to XMM register
-instruct loadA4S(regD dst, memory mem) %{
- match(Set dst (Load4S mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed4S" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Load Aligned Packed Char to XMM register
-instruct loadA4C(regD dst, memory mem) %{
- match(Set dst (Load4C mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed4C" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Load Aligned Packed Integer to XMM register
-instruct load2IU(regD dst, memory mem) %{
- match(Set dst (Load2I mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed2I" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Load Aligned Packed Single to XMM
-instruct loadA2F(regD dst, memory mem) %{
- match(Set dst (Load2F mem));
- ins_cost(125);
- format %{ "MOVQ $dst,$mem\t! packed2F" %}
- ins_encode %{
- __ movq($dst$$XMMRegister, $mem$$Address);
- %}
- ins_pipe( pipe_slow );
-%}
-
// Load Effective Address
instruct leaP8(rRegP dst, indOffset8 mem)
%{
@@ -6200,39 +5939,6 @@ instruct storeImmB(memory mem, immI8 src)
ins_pipe(ialu_mem_imm);
%}
-// Store Aligned Packed Byte XMM register to memory
-instruct storeA8B(memory mem, regD src) %{
- match(Set mem (Store8B mem src));
- ins_cost(145);
- format %{ "MOVQ $mem,$src\t! packed8B" %}
- ins_encode %{
- __ movq($mem$$Address, $src$$XMMRegister);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Store Aligned Packed Char/Short XMM register to memory
-instruct storeA4C(memory mem, regD src) %{
- match(Set mem (Store4C mem src));
- ins_cost(145);
- format %{ "MOVQ $mem,$src\t! packed4C" %}
- ins_encode %{
- __ movq($mem$$Address, $src$$XMMRegister);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Store Aligned Packed Integer XMM register to memory
-instruct storeA2I(memory mem, regD src) %{
- match(Set mem (Store2I mem src));
- ins_cost(145);
- format %{ "MOVQ $mem,$src\t! packed2I" %}
- ins_encode %{
- __ movq($mem$$Address, $src$$XMMRegister);
- %}
- ins_pipe( pipe_slow );
-%}
-
// Store CMS card-mark Immediate
instruct storeImmCM0_reg(memory mem, immI0 zero)
%{
@@ -6258,17 +5964,6 @@ instruct storeImmCM0(memory mem, immI0 src)
ins_pipe(ialu_mem_imm);
%}
-// Store Aligned Packed Single Float XMM register to memory
-instruct storeA2F(memory mem, regD src) %{
- match(Set mem (Store2F mem src));
- ins_cost(145);
- format %{ "MOVQ $mem,$src\t! packed2F" %}
- ins_encode %{
- __ movq($mem$$Address, $src$$XMMRegister);
- %}
- ins_pipe( pipe_slow );
-%}
-
// Store Float
instruct storeF(memory mem, regF src)
%{
@@ -10377,172 +10072,6 @@ instruct MoveL2D_reg_reg(regD dst, rRegL src) %{
ins_pipe( pipe_slow );
%}
-// Replicate scalar to packed byte (1 byte) values in xmm
-instruct Repl8B_reg(regD dst, regD src) %{
- match(Set dst (Replicate8B src));
- format %{ "MOVDQA $dst,$src\n\t"
- "PUNPCKLBW $dst,$dst\n\t"
- "PSHUFLW $dst,$dst,0x00\t! replicate8B" %}
- ins_encode %{
- if ($dst$$reg != $src$$reg) {
- __ movdqa($dst$$XMMRegister, $src$$XMMRegister);
- }
- __ punpcklbw($dst$$XMMRegister, $dst$$XMMRegister);
- __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Replicate scalar to packed byte (1 byte) values in xmm
-instruct Repl8B_rRegI(regD dst, rRegI src) %{
- match(Set dst (Replicate8B src));
- format %{ "MOVD $dst,$src\n\t"
- "PUNPCKLBW $dst,$dst\n\t"
- "PSHUFLW $dst,$dst,0x00\t! replicate8B" %}
- ins_encode %{
- __ movdl($dst$$XMMRegister, $src$$Register);
- __ punpcklbw($dst$$XMMRegister, $dst$$XMMRegister);
- __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( pipe_slow );
-%}
-
-// Replicate scalar zero to packed byte (1 byte) values in xmm
-instruct Repl8B_immI0(regD dst, immI0 zero) %{
- match(Set dst (Replicate8B zero));
- format %{ "PXOR $dst,$dst\t! replicate8B" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed shore (2 byte) values in xmm
-instruct Repl4S_reg(regD dst, regD src) %{
- match(Set dst (Replicate4S src));
- format %{ "PSHUFLW $dst,$src,0x00\t! replicate4S" %}
- ins_encode %{
- __ pshuflw($dst$$XMMRegister, $src$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed shore (2 byte) values in xmm
-instruct Repl4S_rRegI(regD dst, rRegI src) %{
- match(Set dst (Replicate4S src));
- format %{ "MOVD $dst,$src\n\t"
- "PSHUFLW $dst,$dst,0x00\t! replicate4S" %}
- ins_encode %{
- __ movdl($dst$$XMMRegister, $src$$Register);
- __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar zero to packed short (2 byte) values in xmm
-instruct Repl4S_immI0(regD dst, immI0 zero) %{
- match(Set dst (Replicate4S zero));
- format %{ "PXOR $dst,$dst\t! replicate4S" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed char (2 byte) values in xmm
-instruct Repl4C_reg(regD dst, regD src) %{
- match(Set dst (Replicate4C src));
- format %{ "PSHUFLW $dst,$src,0x00\t! replicate4C" %}
- ins_encode %{
- __ pshuflw($dst$$XMMRegister, $src$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed char (2 byte) values in xmm
-instruct Repl4C_rRegI(regD dst, rRegI src) %{
- match(Set dst (Replicate4C src));
- format %{ "MOVD $dst,$src\n\t"
- "PSHUFLW $dst,$dst,0x00\t! replicate4C" %}
- ins_encode %{
- __ movdl($dst$$XMMRegister, $src$$Register);
- __ pshuflw($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar zero to packed char (2 byte) values in xmm
-instruct Repl4C_immI0(regD dst, immI0 zero) %{
- match(Set dst (Replicate4C zero));
- format %{ "PXOR $dst,$dst\t! replicate4C" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed integer (4 byte) values in xmm
-instruct Repl2I_reg(regD dst, regD src) %{
- match(Set dst (Replicate2I src));
- format %{ "PSHUFD $dst,$src,0x00\t! replicate2I" %}
- ins_encode %{
- __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed integer (4 byte) values in xmm
-instruct Repl2I_rRegI(regD dst, rRegI src) %{
- match(Set dst (Replicate2I src));
- format %{ "MOVD $dst,$src\n\t"
- "PSHUFD $dst,$dst,0x00\t! replicate2I" %}
- ins_encode %{
- __ movdl($dst$$XMMRegister, $src$$Register);
- __ pshufd($dst$$XMMRegister, $dst$$XMMRegister, 0x00);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar zero to packed integer (2 byte) values in xmm
-instruct Repl2I_immI0(regD dst, immI0 zero) %{
- match(Set dst (Replicate2I zero));
- format %{ "PXOR $dst,$dst\t! replicate2I" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed single precision floating point values in xmm
-instruct Repl2F_reg(regD dst, regD src) %{
- match(Set dst (Replicate2F src));
- format %{ "PSHUFD $dst,$src,0xe0\t! replicate2F" %}
- ins_encode %{
- __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0xe0);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed single precision floating point values in xmm
-instruct Repl2F_regF(regD dst, regF src) %{
- match(Set dst (Replicate2F src));
- format %{ "PSHUFD $dst,$src,0xe0\t! replicate2F" %}
- ins_encode %{
- __ pshufd($dst$$XMMRegister, $src$$XMMRegister, 0xe0);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
-// Replicate scalar to packed single precision floating point values in xmm
-instruct Repl2F_immF0(regD dst, immF0 zero) %{
- match(Set dst (Replicate2F zero));
- format %{ "PXOR $dst,$dst\t! replicate2F" %}
- ins_encode %{
- __ pxor($dst$$XMMRegister, $dst$$XMMRegister);
- %}
- ins_pipe( fpu_reg_reg );
-%}
-
// =======================================================================
// fast clearing of an array
diff --git a/hotspot/src/os/bsd/vm/os_bsd.cpp b/hotspot/src/os/bsd/vm/os_bsd.cpp
index f9b21acb464..68ab3fc4c3b 100644
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp
@@ -440,7 +440,7 @@ void os::init_system_properties_values() {
// code needs to be changed accordingly.
// The next few definitions allow the code to be verbatim:
-#define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n))
+#define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n), mtInternal)
#define getenv(n) ::getenv(n)
/*
@@ -1913,11 +1913,11 @@ void os::dll_build_name(char* buffer, size_t buflen,
// release the storage
for (int i = 0 ; i < n ; i++) {
if (pelements[i] != NULL) {
- FREE_C_HEAP_ARRAY(char, pelements[i]);
+ FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal);
}
}
if (pelements != NULL) {
- FREE_C_HEAP_ARRAY(char*, pelements);
+ FREE_C_HEAP_ARRAY(char*, pelements, mtInternal);
}
} else {
snprintf(buffer, buflen, "%s/" JNI_LIB_PREFIX "%s" JNI_LIB_SUFFIX, pname, fname);
@@ -2766,7 +2766,7 @@ void bsd_wrap_code(char* base, size_t size) {
// All it does is to check if there are enough free pages
// left at the time of mmap(). This could be a potential
// problem.
-bool os::commit_memory(char* addr, size_t size, bool exec) {
+bool os::pd_commit_memory(char* addr, size_t size, bool exec) {
int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
#ifdef __OpenBSD__
// XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD
@@ -2790,7 +2790,7 @@ bool os::commit_memory(char* addr, size_t size, bool exec) {
#endif
#endif
-bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
+bool os::pd_commit_memory(char* addr, size_t size, size_t alignment_hint,
bool exec) {
#ifndef _ALLBSD_SOURCE
if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) {
@@ -2806,7 +2806,7 @@ bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
return commit_memory(addr, size, exec);
}
-void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
+void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
#ifndef _ALLBSD_SOURCE
if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) {
// We don't check the return value: madvise(MADV_HUGEPAGE) may not
@@ -2816,7 +2816,7 @@ void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
#endif
}
-void os::free_memory(char *addr, size_t bytes, size_t alignment_hint) {
+void os::pd_free_memory(char *addr, size_t bytes, size_t alignment_hint) {
::madvise(addr, bytes, MADV_DONTNEED);
}
@@ -2958,7 +2958,7 @@ os::Bsd::numa_interleave_memory_func_t os::Bsd::_numa_interleave_memory;
unsigned long* os::Bsd::_numa_all_nodes;
#endif
-bool os::uncommit_memory(char* addr, size_t size) {
+bool os::pd_uncommit_memory(char* addr, size_t size) {
#ifdef __OpenBSD__
// XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD
return ::mprotect(addr, size, PROT_NONE) == 0;
@@ -2969,7 +2969,7 @@ bool os::uncommit_memory(char* addr, size_t size) {
#endif
}
-bool os::create_stack_guard_pages(char* addr, size_t size) {
+bool os::pd_create_stack_guard_pages(char* addr, size_t size) {
return os::commit_memory(addr, size);
}
@@ -3023,12 +3023,12 @@ static int anon_munmap(char * addr, size_t size) {
return ::munmap(addr, size) == 0;
}
-char* os::reserve_memory(size_t bytes, char* requested_addr,
+char* os::pd_reserve_memory(size_t bytes, char* requested_addr,
size_t alignment_hint) {
return anon_mmap(requested_addr, bytes, (requested_addr != NULL));
}
-bool os::release_memory(char* addr, size_t size) {
+bool os::pd_release_memory(char* addr, size_t size) {
return anon_munmap(addr, size);
}
@@ -3331,7 +3331,7 @@ bool os::can_execute_large_page_memory() {
// Reserve memory at an arbitrary address, only if that area is
// available (and not reserved for something else).
-char* os::attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
+char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
const int max_tries = 10;
char* base[max_tries];
size_t size[max_tries];
@@ -4987,7 +4987,7 @@ int os::socket_available(int fd, jint *pbytes) {
}
// Map a block of memory.
-char* os::map_memory(int fd, const char* file_name, size_t file_offset,
+char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
int prot;
@@ -5019,7 +5019,7 @@ char* os::map_memory(int fd, const char* file_name, size_t file_offset,
// Remap a block of memory.
-char* os::remap_memory(int fd, const char* file_name, size_t file_offset,
+char* os::pd_remap_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
// same as map_memory() on this OS
@@ -5029,7 +5029,7 @@ char* os::remap_memory(int fd, const char* file_name, size_t file_offset,
// Unmap a block of memory.
-bool os::unmap_memory(char* addr, size_t bytes) {
+bool os::pd_unmap_memory(char* addr, size_t bytes) {
return munmap(addr, bytes) == 0;
}
@@ -5801,3 +5801,14 @@ bool os::is_headless_jre() {
return true;
}
+
+// Get the default path to the core file
+// Returns the length of the string
+int os::get_core_path(char* buffer, size_t bufferSize) {
+ int n = jio_snprintf(buffer, bufferSize, "/cores");
+
+ // Truncate if theoretical string was longer than bufferSize
+ n = MIN2(n, (int)bufferSize);
+
+ return n;
+}
diff --git a/hotspot/src/os/bsd/vm/os_bsd.hpp b/hotspot/src/os/bsd/vm/os_bsd.hpp
index 271d1e291e9..bb8fe3f211e 100644
--- a/hotspot/src/os/bsd/vm/os_bsd.hpp
+++ b/hotspot/src/os/bsd/vm/os_bsd.hpp
@@ -312,7 +312,7 @@ public:
};
-class PlatformEvent : public CHeapObj {
+class PlatformEvent : public CHeapObj {
private:
double CachePad [4] ; // increase odds that _mutex is sole occupant of cache line
volatile int _Event ;
@@ -347,7 +347,7 @@ class PlatformEvent : public CHeapObj {
void SetAssociation (Thread * a) { _Assoc = a ; }
} ;
-class PlatformParker : public CHeapObj {
+class PlatformParker : public CHeapObj {
protected:
pthread_mutex_t _mutex [1] ;
pthread_cond_t _cond [1] ;
diff --git a/hotspot/src/os/bsd/vm/os_bsd.inline.hpp b/hotspot/src/os/bsd/vm/os_bsd.inline.hpp
index c582a45315a..9980d4631a2 100644
--- a/hotspot/src/os/bsd/vm/os_bsd.inline.hpp
+++ b/hotspot/src/os/bsd/vm/os_bsd.inline.hpp
@@ -95,7 +95,7 @@ inline bool os::allocate_stack_guard_pages() {
// On Bsd, reservations are made on a page by page basis, nothing to do.
-inline void os::split_reserved_memory(char *base, size_t size,
+inline void os::pd_split_reserved_memory(char *base, size_t size,
size_t split, bool realloc) {
}
diff --git a/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp b/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp
index c93289e5909..e9db634135f 100644
--- a/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp
+++ b/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp
@@ -126,7 +126,7 @@ static void save_memory_to_file(char* addr, size_t size) {
}
}
}
- FREE_C_HEAP_ARRAY(char, destfile);
+ FREE_C_HEAP_ARRAY(char, destfile, mtInternal);
}
@@ -153,7 +153,7 @@ static char* get_user_tmp_dir(const char* user) {
const char* tmpdir = os::get_temp_directory();
const char* perfdir = PERFDATA_NAME;
size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3;
- char* dirname = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* dirname = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
// construct the path name to user specific tmp directory
snprintf(dirname, nbytes, "%s/%s_%s", tmpdir, perfdir, user);
@@ -246,7 +246,7 @@ static char* get_user_name(uid_t uid) {
if (bufsize == -1)
bufsize = 1024;
- char* pwbuf = NEW_C_HEAP_ARRAY(char, bufsize);
+ char* pwbuf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
// POSIX interface to getpwuid_r is used on LINUX
struct passwd* p;
@@ -278,14 +278,14 @@ static char* get_user_name(uid_t uid) {
"pw_name zero length");
}
}
- FREE_C_HEAP_ARRAY(char, pwbuf);
+ FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal);
return NULL;
}
- char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1);
+ char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1, mtInternal);
strcpy(user_name, p->pw_name);
- FREE_C_HEAP_ARRAY(char, pwbuf);
+ FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal);
return user_name;
}
@@ -328,7 +328,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// to determine the user name for the process id.
//
struct dirent* dentry;
- char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname));
+ char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal);
errno = 0;
while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) {
@@ -338,7 +338,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
}
char* usrdir_name = NEW_C_HEAP_ARRAY(char,
- strlen(tmpdirname) + strlen(dentry->d_name) + 2);
+ strlen(tmpdirname) + strlen(dentry->d_name) + 2, mtInternal);
strcpy(usrdir_name, tmpdirname);
strcat(usrdir_name, "/");
strcat(usrdir_name, dentry->d_name);
@@ -346,7 +346,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
DIR* subdirp = os::opendir(usrdir_name);
if (subdirp == NULL) {
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
continue;
}
@@ -357,13 +357,13 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// symlink can be exploited.
//
if (!is_directory_secure(usrdir_name)) {
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
os::closedir(subdirp);
continue;
}
struct dirent* udentry;
- char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name));
+ char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal);
errno = 0;
while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) {
@@ -372,7 +372,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
int result;
char* filename = NEW_C_HEAP_ARRAY(char,
- strlen(usrdir_name) + strlen(udentry->d_name) + 2);
+ strlen(usrdir_name) + strlen(udentry->d_name) + 2, mtInternal);
strcpy(filename, usrdir_name);
strcat(filename, "/");
@@ -381,13 +381,13 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// don't follow symbolic links for the file
RESTARTABLE(::lstat(filename, &statbuf), result);
if (result == OS_ERR) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
continue;
}
// skip over files that are not regular files.
if (!S_ISREG(statbuf.st_mode)) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
continue;
}
@@ -397,23 +397,23 @@ static char* get_user_name_slow(int vmid, TRAPS) {
if (statbuf.st_ctime > oldest_ctime) {
char* user = strchr(dentry->d_name, '_') + 1;
- if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user);
- oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1);
+ if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user, mtInternal);
+ oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal);
strcpy(oldest_user, user);
oldest_ctime = statbuf.st_ctime;
}
}
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
}
}
os::closedir(subdirp);
- FREE_C_HEAP_ARRAY(char, udbuf);
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, udbuf, mtInternal);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
}
os::closedir(tmpdirp);
- FREE_C_HEAP_ARRAY(char, tdbuf);
+ FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal);
return(oldest_user);
}
@@ -434,7 +434,7 @@ static char* get_sharedmem_filename(const char* dirname, int vmid) {
// add 2 for the file separator and a null terminator.
size_t nbytes = strlen(dirname) + UINT_CHARS + 2;
- char* name = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* name = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
snprintf(name, nbytes, "%s/%d", dirname, vmid);
return name;
@@ -472,7 +472,7 @@ static void remove_file(const char* path) {
static void remove_file(const char* dirname, const char* filename) {
size_t nbytes = strlen(dirname) + strlen(filename) + 2;
- char* path = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* path = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
strcpy(path, dirname);
strcat(path, "/");
@@ -480,7 +480,7 @@ static void remove_file(const char* dirname, const char* filename) {
remove_file(path);
- FREE_C_HEAP_ARRAY(char, path);
+ FREE_C_HEAP_ARRAY(char, path, mtInternal);
}
@@ -517,7 +517,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
// opendir/readdir.
//
struct dirent* entry;
- char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname));
+ char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal);
errno = 0;
while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) {
@@ -556,7 +556,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
errno = 0;
}
os::closedir(dirp);
- FREE_C_HEAP_ARRAY(char, dbuf);
+ FREE_C_HEAP_ARRAY(char, dbuf, mtInternal);
}
// make the user specific temporary directory. Returns true if
@@ -723,11 +723,11 @@ static char* mmap_create_shared(size_t size) {
fd = create_sharedmem_resources(dirname, filename, size);
- FREE_C_HEAP_ARRAY(char, user_name);
- FREE_C_HEAP_ARRAY(char, dirname);
+ FREE_C_HEAP_ARRAY(char, user_name, mtInternal);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
if (fd == -1) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
return NULL;
}
@@ -743,7 +743,7 @@ static char* mmap_create_shared(size_t size) {
warning("mmap failed - %s\n", strerror(errno));
}
remove_file(filename);
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
return NULL;
}
@@ -869,7 +869,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
// store file, we don't follow them when attaching either.
//
if (!is_directory_secure(dirname)) {
- FREE_C_HEAP_ARRAY(char, dirname);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Process not found");
}
@@ -884,9 +884,9 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
strcpy(rfilename, filename);
// free the c heap resources that are no longer needed
- if (luser != user) FREE_C_HEAP_ARRAY(char, luser);
- FREE_C_HEAP_ARRAY(char, dirname);
- FREE_C_HEAP_ARRAY(char, filename);
+ if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
// open the shared memory file for the give vmid
fd = open_sharedmem_file(rfilename, file_flags, CHECK);
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index 53457ec8db9..df6eb0e71c8 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -371,7 +371,7 @@ void os::init_system_properties_values() {
// code needs to be changed accordingly.
// The next few definitions allow the code to be verbatim:
-#define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n))
+#define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n), mtInternal)
#define getenv(n) ::getenv(n)
/*
@@ -639,7 +639,7 @@ void os::Linux::libpthread_init() {
size_t n = confstr(_CS_GNU_LIBC_VERSION, NULL, 0);
if (n > 0) {
- char *str = (char *)malloc(n);
+ char *str = (char *)malloc(n, mtInternal);
confstr(_CS_GNU_LIBC_VERSION, str, n);
os::Linux::set_glibc_version(str);
} else {
@@ -652,7 +652,7 @@ void os::Linux::libpthread_init() {
n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0);
if (n > 0) {
- char *str = (char *)malloc(n);
+ char *str = (char *)malloc(n, mtInternal);
confstr(_CS_GNU_LIBPTHREAD_VERSION, str, n);
// Vanilla RH-9 (glibc 2.3.2) has a bug that confstr() always tells
// us "NPTL-0.29" even we are running with LinuxThreads. Check if this
@@ -1685,11 +1685,11 @@ void os::dll_build_name(char* buffer, size_t buflen,
// release the storage
for (int i = 0 ; i < n ; i++) {
if (pelements[i] != NULL) {
- FREE_C_HEAP_ARRAY(char, pelements[i]);
+ FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal);
}
}
if (pelements != NULL) {
- FREE_C_HEAP_ARRAY(char*, pelements);
+ FREE_C_HEAP_ARRAY(char*, pelements, mtInternal);
}
} else {
snprintf(buffer, buflen, "%s/lib%s.so", pname, fname);
@@ -2469,7 +2469,7 @@ void linux_wrap_code(char* base, size_t size) {
// All it does is to check if there are enough free pages
// left at the time of mmap(). This could be a potential
// problem.
-bool os::commit_memory(char* addr, size_t size, bool exec) {
+bool os::pd_commit_memory(char* addr, size_t size, bool exec) {
int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
uintptr_t res = (uintptr_t) ::mmap(addr, size, prot,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0);
@@ -2492,7 +2492,7 @@ bool os::commit_memory(char* addr, size_t size, bool exec) {
#define MADV_HUGEPAGE 14
#endif
-bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
+bool os::pd_commit_memory(char* addr, size_t size, size_t alignment_hint,
bool exec) {
if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) {
int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
@@ -2516,7 +2516,7 @@ bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
return false;
}
-void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
+void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) {
// We don't check the return value: madvise(MADV_HUGEPAGE) may not
// be supported or the memory may already be backed by huge pages.
@@ -2524,7 +2524,7 @@ void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
}
}
-void os::free_memory(char *addr, size_t bytes, size_t alignment_hint) {
+void os::pd_free_memory(char *addr, size_t bytes, size_t alignment_hint) {
// This method works by doing an mmap over an existing mmaping and effectively discarding
// the existing pages. However it won't work for SHM-based large pages that cannot be
// uncommitted at all. We don't do anything in this case to avoid creating a segment with
@@ -2646,7 +2646,7 @@ bool os::Linux::libnuma_init() {
if (numa_available() != -1) {
set_numa_all_nodes((unsigned long*)libnuma_dlsym(handle, "numa_all_nodes"));
// Create a cpu -> node mapping
- _cpu_to_node = new (ResourceObj::C_HEAP) GrowableArray(0, true);
+ _cpu_to_node = new (ResourceObj::C_HEAP, mtInternal) GrowableArray(0, true);
rebuild_cpu_to_node_map();
return true;
}
@@ -2676,7 +2676,7 @@ void os::Linux::rebuild_cpu_to_node_map() {
cpu_to_node()->at_grow(cpu_num - 1);
size_t node_num = numa_get_groups_num();
- unsigned long *cpu_map = NEW_C_HEAP_ARRAY(unsigned long, cpu_map_size);
+ unsigned long *cpu_map = NEW_C_HEAP_ARRAY(unsigned long, cpu_map_size, mtInternal);
for (size_t i = 0; i < node_num; i++) {
if (numa_node_to_cpus(i, cpu_map, cpu_map_size * sizeof(unsigned long)) != -1) {
for (size_t j = 0; j < cpu_map_valid_size; j++) {
@@ -2690,7 +2690,7 @@ void os::Linux::rebuild_cpu_to_node_map() {
}
}
}
- FREE_C_HEAP_ARRAY(unsigned long, cpu_map);
+ FREE_C_HEAP_ARRAY(unsigned long, cpu_map, mtInternal);
}
int os::Linux::get_node_by_cpu(int cpu_id) {
@@ -2709,7 +2709,7 @@ os::Linux::numa_tonode_memory_func_t os::Linux::_numa_tonode_memory;
os::Linux::numa_interleave_memory_func_t os::Linux::_numa_interleave_memory;
unsigned long* os::Linux::_numa_all_nodes;
-bool os::uncommit_memory(char* addr, size_t size) {
+bool os::pd_uncommit_memory(char* addr, size_t size) {
uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE,
MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0);
return res != (uintptr_t) MAP_FAILED;
@@ -2774,7 +2774,7 @@ bool get_stack_bounds(uintptr_t *bottom, uintptr_t *top) {
// munmap() the guard pages we don't leave a hole in the stack
// mapping. This only affects the main/initial thread, but guard
// against future OS changes
-bool os::create_stack_guard_pages(char* addr, size_t size) {
+bool os::pd_create_stack_guard_pages(char* addr, size_t size) {
uintptr_t stack_extent, stack_base;
bool chk_bounds = NOT_DEBUG(os::Linux::is_initial_thread()) DEBUG_ONLY(true);
if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) {
@@ -2847,12 +2847,12 @@ static int anon_munmap(char * addr, size_t size) {
return ::munmap(addr, size) == 0;
}
-char* os::reserve_memory(size_t bytes, char* requested_addr,
+char* os::pd_reserve_memory(size_t bytes, char* requested_addr,
size_t alignment_hint) {
return anon_mmap(requested_addr, bytes, (requested_addr != NULL));
}
-bool os::release_memory(char* addr, size_t size) {
+bool os::pd_release_memory(char* addr, size_t size) {
return anon_munmap(addr, size);
}
@@ -3149,7 +3149,7 @@ bool os::can_execute_large_page_memory() {
// Reserve memory at an arbitrary address, only if that area is
// available (and not reserved for something else).
-char* os::attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
+char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
const int max_tries = 10;
char* base[max_tries];
size_t size[max_tries];
@@ -4671,7 +4671,7 @@ int os::socket_available(int fd, jint *pbytes) {
}
// Map a block of memory.
-char* os::map_memory(int fd, const char* file_name, size_t file_offset,
+char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
int prot;
@@ -4701,7 +4701,7 @@ char* os::map_memory(int fd, const char* file_name, size_t file_offset,
// Remap a block of memory.
-char* os::remap_memory(int fd, const char* file_name, size_t file_offset,
+char* os::pd_remap_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
// same as map_memory() on this OS
@@ -4711,7 +4711,7 @@ char* os::remap_memory(int fd, const char* file_name, size_t file_offset,
// Unmap a block of memory.
-bool os::unmap_memory(char* addr, size_t bytes) {
+bool os::pd_unmap_memory(char* addr, size_t bytes) {
return munmap(addr, bytes) == 0;
}
@@ -5447,6 +5447,18 @@ bool os::is_headless_jre() {
return true;
}
+// Get the default path to the core file
+// Returns the length of the string
+int os::get_core_path(char* buffer, size_t bufferSize) {
+ const char* p = get_current_directory(buffer, bufferSize);
+
+ if (p == NULL) {
+ assert(p != NULL, "failed to get current directory");
+ return 0;
+ }
+
+ return strlen(buffer);
+}
#ifdef JAVASE_EMBEDDED
//
diff --git a/hotspot/src/os/linux/vm/os_linux.hpp b/hotspot/src/os/linux/vm/os_linux.hpp
index 7c19517e21e..0f0fa214a04 100644
--- a/hotspot/src/os/linux/vm/os_linux.hpp
+++ b/hotspot/src/os/linux/vm/os_linux.hpp
@@ -287,7 +287,7 @@ public:
};
-class PlatformEvent : public CHeapObj {
+class PlatformEvent : public CHeapObj {
private:
double CachePad [4] ; // increase odds that _mutex is sole occupant of cache line
volatile int _Event ;
@@ -322,7 +322,7 @@ class PlatformEvent : public CHeapObj {
void SetAssociation (Thread * a) { _Assoc = a ; }
} ;
-class PlatformParker : public CHeapObj {
+class PlatformParker : public CHeapObj {
protected:
pthread_mutex_t _mutex [1] ;
pthread_cond_t _cond [1] ;
diff --git a/hotspot/src/os/linux/vm/os_linux.inline.hpp b/hotspot/src/os/linux/vm/os_linux.inline.hpp
index 566c0ad3168..c663c9b6961 100644
--- a/hotspot/src/os/linux/vm/os_linux.inline.hpp
+++ b/hotspot/src/os/linux/vm/os_linux.inline.hpp
@@ -99,7 +99,7 @@ inline bool os::allocate_stack_guard_pages() {
// On Linux, reservations are made on a page by page basis, nothing to do.
-inline void os::split_reserved_memory(char *base, size_t size,
+inline void os::pd_split_reserved_memory(char *base, size_t size,
size_t split, bool realloc) {
}
diff --git a/hotspot/src/os/linux/vm/perfMemory_linux.cpp b/hotspot/src/os/linux/vm/perfMemory_linux.cpp
index 1cd430cfbc7..8839aac6c10 100644
--- a/hotspot/src/os/linux/vm/perfMemory_linux.cpp
+++ b/hotspot/src/os/linux/vm/perfMemory_linux.cpp
@@ -126,7 +126,7 @@ static void save_memory_to_file(char* addr, size_t size) {
}
}
}
- FREE_C_HEAP_ARRAY(char, destfile);
+ FREE_C_HEAP_ARRAY(char, destfile, mtInternal);
}
@@ -153,7 +153,7 @@ static char* get_user_tmp_dir(const char* user) {
const char* tmpdir = os::get_temp_directory();
const char* perfdir = PERFDATA_NAME;
size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3;
- char* dirname = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* dirname = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
// construct the path name to user specific tmp directory
snprintf(dirname, nbytes, "%s/%s_%s", tmpdir, perfdir, user);
@@ -246,7 +246,7 @@ static char* get_user_name(uid_t uid) {
if (bufsize == -1)
bufsize = 1024;
- char* pwbuf = NEW_C_HEAP_ARRAY(char, bufsize);
+ char* pwbuf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
// POSIX interface to getpwuid_r is used on LINUX
struct passwd* p;
@@ -278,14 +278,14 @@ static char* get_user_name(uid_t uid) {
"pw_name zero length");
}
}
- FREE_C_HEAP_ARRAY(char, pwbuf);
+ FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal);
return NULL;
}
- char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1);
+ char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1, mtInternal);
strcpy(user_name, p->pw_name);
- FREE_C_HEAP_ARRAY(char, pwbuf);
+ FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal);
return user_name;
}
@@ -328,7 +328,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// to determine the user name for the process id.
//
struct dirent* dentry;
- char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname));
+ char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal);
errno = 0;
while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) {
@@ -338,7 +338,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
}
char* usrdir_name = NEW_C_HEAP_ARRAY(char,
- strlen(tmpdirname) + strlen(dentry->d_name) + 2);
+ strlen(tmpdirname) + strlen(dentry->d_name) + 2, mtInternal);
strcpy(usrdir_name, tmpdirname);
strcat(usrdir_name, "/");
strcat(usrdir_name, dentry->d_name);
@@ -346,7 +346,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
DIR* subdirp = os::opendir(usrdir_name);
if (subdirp == NULL) {
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
continue;
}
@@ -357,13 +357,13 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// symlink can be exploited.
//
if (!is_directory_secure(usrdir_name)) {
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
os::closedir(subdirp);
continue;
}
struct dirent* udentry;
- char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name));
+ char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal);
errno = 0;
while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) {
@@ -372,7 +372,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
int result;
char* filename = NEW_C_HEAP_ARRAY(char,
- strlen(usrdir_name) + strlen(udentry->d_name) + 2);
+ strlen(usrdir_name) + strlen(udentry->d_name) + 2, mtInternal);
strcpy(filename, usrdir_name);
strcat(filename, "/");
@@ -381,13 +381,13 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// don't follow symbolic links for the file
RESTARTABLE(::lstat(filename, &statbuf), result);
if (result == OS_ERR) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
continue;
}
// skip over files that are not regular files.
if (!S_ISREG(statbuf.st_mode)) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
continue;
}
@@ -397,23 +397,23 @@ static char* get_user_name_slow(int vmid, TRAPS) {
if (statbuf.st_ctime > oldest_ctime) {
char* user = strchr(dentry->d_name, '_') + 1;
- if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user);
- oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1);
+ if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user, mtInternal);
+ oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal);
strcpy(oldest_user, user);
oldest_ctime = statbuf.st_ctime;
}
}
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
}
}
os::closedir(subdirp);
- FREE_C_HEAP_ARRAY(char, udbuf);
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, udbuf, mtInternal);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
}
os::closedir(tmpdirp);
- FREE_C_HEAP_ARRAY(char, tdbuf);
+ FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal);
return(oldest_user);
}
@@ -434,7 +434,7 @@ static char* get_sharedmem_filename(const char* dirname, int vmid) {
// add 2 for the file separator and a null terminator.
size_t nbytes = strlen(dirname) + UINT_CHARS + 2;
- char* name = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* name = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
snprintf(name, nbytes, "%s/%d", dirname, vmid);
return name;
@@ -472,7 +472,7 @@ static void remove_file(const char* path) {
static void remove_file(const char* dirname, const char* filename) {
size_t nbytes = strlen(dirname) + strlen(filename) + 2;
- char* path = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* path = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
strcpy(path, dirname);
strcat(path, "/");
@@ -480,7 +480,7 @@ static void remove_file(const char* dirname, const char* filename) {
remove_file(path);
- FREE_C_HEAP_ARRAY(char, path);
+ FREE_C_HEAP_ARRAY(char, path, mtInternal);
}
@@ -517,7 +517,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
// opendir/readdir.
//
struct dirent* entry;
- char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname));
+ char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal);
errno = 0;
while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) {
@@ -556,7 +556,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
errno = 0;
}
os::closedir(dirp);
- FREE_C_HEAP_ARRAY(char, dbuf);
+ FREE_C_HEAP_ARRAY(char, dbuf, mtInternal);
}
// make the user specific temporary directory. Returns true if
@@ -723,11 +723,11 @@ static char* mmap_create_shared(size_t size) {
fd = create_sharedmem_resources(dirname, filename, size);
- FREE_C_HEAP_ARRAY(char, user_name);
- FREE_C_HEAP_ARRAY(char, dirname);
+ FREE_C_HEAP_ARRAY(char, user_name, mtInternal);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
if (fd == -1) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
return NULL;
}
@@ -743,7 +743,7 @@ static char* mmap_create_shared(size_t size) {
warning("mmap failed - %s\n", strerror(errno));
}
remove_file(filename);
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
return NULL;
}
@@ -869,7 +869,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
// store file, we don't follow them when attaching either.
//
if (!is_directory_secure(dirname)) {
- FREE_C_HEAP_ARRAY(char, dirname);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Process not found");
}
@@ -884,9 +884,9 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
strcpy(rfilename, filename);
// free the c heap resources that are no longer needed
- if (luser != user) FREE_C_HEAP_ARRAY(char, luser);
- FREE_C_HEAP_ARRAY(char, dirname);
- FREE_C_HEAP_ARRAY(char, filename);
+ if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
// open the shared memory file for the give vmid
fd = open_sharedmem_file(rfilename, file_flags, CHECK);
diff --git a/hotspot/src/os/posix/vm/os_posix.cpp b/hotspot/src/os/posix/vm/os_posix.cpp
index 9f05a74a4a0..ce355c1cc9f 100644
--- a/hotspot/src/os/posix/vm/os_posix.cpp
+++ b/hotspot/src/os/posix/vm/os_posix.cpp
@@ -23,6 +23,7 @@
*/
#include "prims/jvm.h"
+#include "runtime/frame.inline.hpp"
#include "runtime/os.hpp"
#include "utilities/vmError.hpp"
@@ -33,19 +34,19 @@
// Check core dump limit and report possible place where core can be found
void os::check_or_create_dump(void* exceptionRecord, void* contextRecord, char* buffer, size_t bufferSize) {
+ int n;
struct rlimit rlim;
- static char cwd[O_BUFLEN];
bool success;
- get_current_directory(cwd, sizeof(cwd));
+ n = get_core_path(buffer, bufferSize);
if (getrlimit(RLIMIT_CORE, &rlim) != 0) {
- jio_snprintf(buffer, bufferSize, "%s/core or core.%d (may not exist)", cwd, current_process_id());
+ jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d (may not exist)", current_process_id());
success = true;
} else {
switch(rlim.rlim_cur) {
case RLIM_INFINITY:
- jio_snprintf(buffer, bufferSize, "%s/core or core.%d", cwd, current_process_id());
+ jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d", current_process_id());
success = true;
break;
case 0:
@@ -53,7 +54,7 @@ void os::check_or_create_dump(void* exceptionRecord, void* contextRecord, char*
success = false;
break;
default:
- jio_snprintf(buffer, bufferSize, "%s/core or core.%d (max size %lu kB). To ensure a full core dump, try \"ulimit -c unlimited\" before starting Java again", cwd, current_process_id(), (unsigned long)(rlim.rlim_cur >> 10));
+ jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d (max size %lu kB). To ensure a full core dump, try \"ulimit -c unlimited\" before starting Java again", current_process_id(), (unsigned long)(rlim.rlim_cur >> 10));
success = true;
break;
}
@@ -61,6 +62,23 @@ void os::check_or_create_dump(void* exceptionRecord, void* contextRecord, char*
VMError::report_coredump_status(buffer, success);
}
+address os::get_caller_pc(int n) {
+#ifdef _NMT_NOINLINE_
+ n ++;
+#endif
+ frame fr = os::current_frame();
+ while (n > 0 && fr.pc() &&
+ !os::is_first_C_frame(&fr) && fr.sender_pc()) {
+ fr = os::get_sender_for_C_frame(&fr);
+ n --;
+ }
+ if (n == 0) {
+ return fr.pc();
+ } else {
+ return NULL;
+ }
+}
+
int os::get_last_error() {
return errno;
}
diff --git a/hotspot/src/os/solaris/dtrace/hs_private.d b/hotspot/src/os/solaris/dtrace/hs_private.d
index 23463a409b3..df395e5c045 100644
--- a/hotspot/src/os/solaris/dtrace/hs_private.d
+++ b/hotspot/src/os/solaris/dtrace/hs_private.d
@@ -23,7 +23,6 @@
*/
provider hs_private {
- probe hashtable__new_entry(void*, uintptr_t, void*);
probe safepoint__begin();
probe safepoint__end();
probe cms__initmark__begin();
diff --git a/hotspot/src/os/solaris/dtrace/libjvm_db.c b/hotspot/src/os/solaris/dtrace/libjvm_db.c
index 2f9a56e919f..62304ec114a 100644
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c
@@ -516,7 +516,7 @@ name_for_methodOop(jvm_agent_t* J, uint64_t methodOopPtr, char * result, size_t
err = read_pointer(J, methodOopPtr + OFFSET_methodOopDesc_constMethod, &constMethod);
CHECK_FAIL(err);
- err = read_pointer(J->P, constMethod + OFFSET_constMethodOopDesc_constants, &constantPool);
+ err = read_pointer(J, constMethod + OFFSET_constMethodOopDesc_constants, &constantPool);
CHECK_FAIL(err);
/* To get name string */
diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp
index c3389a47764..5e11a9d5588 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp
@@ -546,7 +546,7 @@ static bool find_processors_in_pset(psetid_t pset,
// Find the number of processors in the processor set.
if (pset_info(pset, NULL, id_length, NULL) == 0) {
// Make up an array to hold their ids.
- *id_array = NEW_C_HEAP_ARRAY(processorid_t, *id_length);
+ *id_array = NEW_C_HEAP_ARRAY(processorid_t, *id_length, mtInternal);
// Fill in the array with their processor ids.
if (pset_info(pset, NULL, id_length, *id_array) == 0) {
result = true;
@@ -577,7 +577,7 @@ static bool find_processors_online(processorid_t** id_array,
// Find the number of processors online.
*id_length = sysconf(_SC_NPROCESSORS_ONLN);
// Make up an array to hold their ids.
- *id_array = NEW_C_HEAP_ARRAY(processorid_t, *id_length);
+ *id_array = NEW_C_HEAP_ARRAY(processorid_t, *id_length, mtInternal);
// Processors need not be numbered consecutively.
long found = 0;
processorid_t next = 0;
@@ -629,7 +629,7 @@ static bool assign_distribution(processorid_t* id_array,
// The next id, to limit loops.
const processorid_t limit_id = max_id + 1;
// Make up markers for available processors.
- bool* available_id = NEW_C_HEAP_ARRAY(bool, limit_id);
+ bool* available_id = NEW_C_HEAP_ARRAY(bool, limit_id, mtInternal);
for (uint c = 0; c < limit_id; c += 1) {
available_id[c] = false;
}
@@ -666,7 +666,7 @@ static bool assign_distribution(processorid_t* id_array,
}
}
if (available_id != NULL) {
- FREE_C_HEAP_ARRAY(bool, available_id);
+ FREE_C_HEAP_ARRAY(bool, available_id, mtInternal);
}
return true;
}
@@ -698,7 +698,7 @@ bool os::distribute_processes(uint length, uint* distribution) {
}
}
if (id_array != NULL) {
- FREE_C_HEAP_ARRAY(processorid_t, id_array);
+ FREE_C_HEAP_ARRAY(processorid_t, id_array, mtInternal);
}
return result;
}
@@ -771,8 +771,8 @@ void os::init_system_properties_values() {
// code needs to be changed accordingly.
// The next few definitions allow the code to be verbatim:
-#define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n))
-#define free(p) FREE_C_HEAP_ARRAY(char, p)
+#define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n), mtInternal)
+#define free(p) FREE_C_HEAP_ARRAY(char, p, mtInternal)
#define getenv(n) ::getenv(n)
#define EXTENSIONS_DIR "/lib/ext"
@@ -1927,11 +1927,11 @@ void os::dll_build_name(char* buffer, size_t buflen,
// release the storage
for (int i = 0 ; i < n ; i++) {
if (pelements[i] != NULL) {
- FREE_C_HEAP_ARRAY(char, pelements[i]);
+ FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal);
}
}
if (pelements != NULL) {
- FREE_C_HEAP_ARRAY(char*, pelements);
+ FREE_C_HEAP_ARRAY(char*, pelements, mtInternal);
}
} else {
snprintf(buffer, buflen, "%s/lib%s.so", pname, fname);
@@ -2662,17 +2662,17 @@ void os::Solaris::init_signal_mem() {
// pending_signals has one int per signal
// The additional signal is for SIGEXIT - exit signal to signal_thread
- pending_signals = (jint *)os::malloc(sizeof(jint) * (Sigexit+1));
+ pending_signals = (jint *)os::malloc(sizeof(jint) * (Sigexit+1), mtInternal);
memset(pending_signals, 0, (sizeof(jint) * (Sigexit+1)));
if (UseSignalChaining) {
chainedsigactions = (struct sigaction *)malloc(sizeof(struct sigaction)
- * (Maxsignum + 1));
+ * (Maxsignum + 1), mtInternal);
memset(chainedsigactions, 0, (sizeof(struct sigaction) * (Maxsignum + 1)));
- preinstalled_sigs = (int *)os::malloc(sizeof(int) * (Maxsignum + 1));
+ preinstalled_sigs = (int *)os::malloc(sizeof(int) * (Maxsignum + 1), mtInternal);
memset(preinstalled_sigs, 0, (sizeof(int) * (Maxsignum + 1)));
}
- ourSigFlags = (int*)malloc(sizeof(int) * (Maxsignum + 1 ));
+ ourSigFlags = (int*)malloc(sizeof(int) * (Maxsignum + 1 ), mtInternal);
memset(ourSigFlags, 0, sizeof(int) * (Maxsignum + 1));
}
@@ -2760,7 +2760,7 @@ int os::vm_allocation_granularity() {
return page_size;
}
-bool os::commit_memory(char* addr, size_t bytes, bool exec) {
+bool os::pd_commit_memory(char* addr, size_t bytes, bool exec) {
int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
size_t size = bytes;
char *res = Solaris::mmap_chunk(addr, size, MAP_PRIVATE|MAP_FIXED, prot);
@@ -2773,7 +2773,7 @@ bool os::commit_memory(char* addr, size_t bytes, bool exec) {
return false;
}
-bool os::commit_memory(char* addr, size_t bytes, size_t alignment_hint,
+bool os::pd_commit_memory(char* addr, size_t bytes, size_t alignment_hint,
bool exec) {
if (commit_memory(addr, bytes, exec)) {
if (UseMPSS && alignment_hint > (size_t)vm_page_size()) {
@@ -2803,14 +2803,14 @@ bool os::commit_memory(char* addr, size_t bytes, size_t alignment_hint,
}
// Uncommit the pages in a specified region.
-void os::free_memory(char* addr, size_t bytes, size_t alignment_hint) {
+void os::pd_free_memory(char* addr, size_t bytes, size_t alignment_hint) {
if (madvise(addr, bytes, MADV_FREE) < 0) {
debug_only(warning("MADV_FREE failed."));
return;
}
}
-bool os::create_stack_guard_pages(char* addr, size_t size) {
+bool os::pd_create_stack_guard_pages(char* addr, size_t size) {
return os::commit_memory(addr, size);
}
@@ -2819,7 +2819,7 @@ bool os::remove_stack_guard_pages(char* addr, size_t size) {
}
// Change the page size in a given range.
-void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
+void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
assert((intptr_t)addr % alignment_hint == 0, "Address should be aligned.");
assert((intptr_t)(addr + bytes) % alignment_hint == 0, "End should be aligned.");
if (UseLargePages && UseMPSS) {
@@ -3006,7 +3006,7 @@ char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info
return end;
}
-bool os::uncommit_memory(char* addr, size_t bytes) {
+bool os::pd_uncommit_memory(char* addr, size_t bytes) {
size_t size = bytes;
// Map uncommitted pages PROT_NONE so we fail early if we touch an
// uncommitted page. Otherwise, the read/write might succeed if we
@@ -3045,7 +3045,7 @@ char* os::Solaris::anon_mmap(char* requested_addr, size_t bytes, size_t alignmen
return mmap_chunk(addr, bytes, flags, PROT_NONE);
}
-char* os::reserve_memory(size_t bytes, char* requested_addr, size_t alignment_hint) {
+char* os::pd_reserve_memory(size_t bytes, char* requested_addr, size_t alignment_hint) {
char* addr = Solaris::anon_mmap(requested_addr, bytes, alignment_hint, (requested_addr != NULL));
guarantee(requested_addr == NULL || requested_addr == addr,
@@ -3056,7 +3056,7 @@ char* os::reserve_memory(size_t bytes, char* requested_addr, size_t alignment_hi
// Reserve memory at an arbitrary address, only if that area is
// available (and not reserved for something else).
-char* os::attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
+char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
const int max_tries = 10;
char* base[max_tries];
size_t size[max_tries];
@@ -3178,7 +3178,7 @@ char* os::attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
return (i < max_tries) ? requested_addr : NULL;
}
-bool os::release_memory(char* addr, size_t bytes) {
+bool os::pd_release_memory(char* addr, size_t bytes) {
size_t size = bytes;
return munmap(addr, size) == 0;
}
@@ -4792,7 +4792,7 @@ bool isT2_libthread() {
lwpSize = 16*1024;
for (;;) {
::lseek64 (lwpFile, 0, SEEK_SET);
- lwpArray = (prheader_t *)NEW_C_HEAP_ARRAY(char, lwpSize);
+ lwpArray = (prheader_t *)NEW_C_HEAP_ARRAY(char, lwpSize, mtInternal);
if (::read(lwpFile, lwpArray, lwpSize) < 0) {
if (ThreadPriorityVerbose) warning("Error reading /proc/self/lstatus\n");
break;
@@ -4810,10 +4810,10 @@ bool isT2_libthread() {
break;
}
lwpSize = lwpArray->pr_nent * lwpArray->pr_entsize;
- FREE_C_HEAP_ARRAY(char, lwpArray); // retry.
+ FREE_C_HEAP_ARRAY(char, lwpArray, mtInternal); // retry.
}
- FREE_C_HEAP_ARRAY(char, lwpArray);
+ FREE_C_HEAP_ARRAY(char, lwpArray, mtInternal);
::close (lwpFile);
if (ThreadPriorityVerbose) {
if (isT2) tty->print_cr("We are running with a T2 libthread\n");
@@ -5137,9 +5137,9 @@ jint os::init_2(void) {
UseNUMA = false;
} else {
size_t lgrp_limit = os::numa_get_groups_num();
- int *lgrp_ids = NEW_C_HEAP_ARRAY(int, lgrp_limit);
+ int *lgrp_ids = NEW_C_HEAP_ARRAY(int, lgrp_limit, mtInternal);
size_t lgrp_num = os::numa_get_leaf_groups(lgrp_ids, lgrp_limit);
- FREE_C_HEAP_ARRAY(int, lgrp_ids);
+ FREE_C_HEAP_ARRAY(int, lgrp_ids, mtInternal);
if (lgrp_num < 2) {
// There's only one locality group, disable NUMA.
UseNUMA = false;
@@ -5485,7 +5485,7 @@ int os::available(int fd, jlong *bytes) {
}
// Map a block of memory.
-char* os::map_memory(int fd, const char* file_name, size_t file_offset,
+char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
int prot;
@@ -5517,7 +5517,7 @@ char* os::map_memory(int fd, const char* file_name, size_t file_offset,
// Remap a block of memory.
-char* os::remap_memory(int fd, const char* file_name, size_t file_offset,
+char* os::pd_remap_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
// same as map_memory() on this OS
@@ -5527,7 +5527,7 @@ char* os::remap_memory(int fd, const char* file_name, size_t file_offset,
// Unmap a block of memory.
-bool os::unmap_memory(char* addr, size_t bytes) {
+bool os::pd_unmap_memory(char* addr, size_t bytes) {
return munmap(addr, bytes) == 0;
}
@@ -6537,3 +6537,16 @@ int os::bind(int fd, struct sockaddr* him, socklen_t len) {
INTERRUPTIBLE_RETURN_INT_NORESTART(::bind(fd, him, len),\
os::Solaris::clear_interrupted);
}
+
+// Get the default path to the core file
+// Returns the length of the string
+int os::get_core_path(char* buffer, size_t bufferSize) {
+ const char* p = get_current_directory(buffer, bufferSize);
+
+ if (p == NULL) {
+ assert(p != NULL, "failed to get current directory");
+ return 0;
+ }
+
+ return strlen(buffer);
+}
diff --git a/hotspot/src/os/solaris/vm/os_solaris.hpp b/hotspot/src/os/solaris/vm/os_solaris.hpp
index 340aa4b7775..174f2529dbe 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.hpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.hpp
@@ -346,7 +346,7 @@ class Solaris {
};
-class PlatformEvent : public CHeapObj {
+class PlatformEvent : public CHeapObj {
private:
double CachePad [4] ; // increase odds that _mutex is sole occupant of cache line
volatile int _Event ;
@@ -383,7 +383,7 @@ class PlatformEvent : public CHeapObj {
void unpark () ;
} ;
-class PlatformParker : public CHeapObj {
+class PlatformParker : public CHeapObj {
protected:
mutex_t _mutex [1] ;
cond_t _cond [1] ;
diff --git a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
index 7b63badc434..2468100fc43 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
@@ -71,7 +71,7 @@ inline bool os::allocate_stack_guard_pages() {
// On Solaris, reservations are made on a page by page basis, nothing to do.
-inline void os::split_reserved_memory(char *base, size_t size,
+inline void os::pd_split_reserved_memory(char *base, size_t size,
size_t split, bool realloc) {
}
diff --git a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
index 1d1ff260cd8..c841ff8a1b6 100644
--- a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
@@ -128,7 +128,7 @@ static void save_memory_to_file(char* addr, size_t size) {
}
}
}
- FREE_C_HEAP_ARRAY(char, destfile);
+ FREE_C_HEAP_ARRAY(char, destfile, mtInternal);
}
@@ -155,7 +155,7 @@ static char* get_user_tmp_dir(const char* user) {
const char* tmpdir = os::get_temp_directory();
const char* perfdir = PERFDATA_NAME;
size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3;
- char* dirname = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* dirname = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
// construct the path name to user specific tmp directory
snprintf(dirname, nbytes, "%s/%s_%s", tmpdir, perfdir, user);
@@ -248,7 +248,7 @@ static char* get_user_name(uid_t uid) {
if (bufsize == -1)
bufsize = 1024;
- char* pwbuf = NEW_C_HEAP_ARRAY(char, bufsize);
+ char* pwbuf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
#ifdef _GNU_SOURCE
struct passwd* p = NULL;
@@ -269,14 +269,14 @@ static char* get_user_name(uid_t uid) {
"pw_name zero length");
}
}
- FREE_C_HEAP_ARRAY(char, pwbuf);
+ FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal);
return NULL;
}
- char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1);
+ char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1, mtInternal);
strcpy(user_name, p->pw_name);
- FREE_C_HEAP_ARRAY(char, pwbuf);
+ FREE_C_HEAP_ARRAY(char, pwbuf, mtInternal);
return user_name;
}
@@ -319,7 +319,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// to determine the user name for the process id.
//
struct dirent* dentry;
- char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname));
+ char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal);
errno = 0;
while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) {
@@ -329,7 +329,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
}
char* usrdir_name = NEW_C_HEAP_ARRAY(char,
- strlen(tmpdirname) + strlen(dentry->d_name) + 2);
+ strlen(tmpdirname) + strlen(dentry->d_name) + 2, mtInternal);
strcpy(usrdir_name, tmpdirname);
strcat(usrdir_name, "/");
strcat(usrdir_name, dentry->d_name);
@@ -337,7 +337,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
DIR* subdirp = os::opendir(usrdir_name);
if (subdirp == NULL) {
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
continue;
}
@@ -348,13 +348,13 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// symlink can be exploited.
//
if (!is_directory_secure(usrdir_name)) {
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
os::closedir(subdirp);
continue;
}
struct dirent* udentry;
- char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name));
+ char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal);
errno = 0;
while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) {
@@ -363,7 +363,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
int result;
char* filename = NEW_C_HEAP_ARRAY(char,
- strlen(usrdir_name) + strlen(udentry->d_name) + 2);
+ strlen(usrdir_name) + strlen(udentry->d_name) + 2, mtInternal);
strcpy(filename, usrdir_name);
strcat(filename, "/");
@@ -372,13 +372,13 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// don't follow symbolic links for the file
RESTARTABLE(::lstat(filename, &statbuf), result);
if (result == OS_ERR) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
continue;
}
// skip over files that are not regular files.
if (!S_ISREG(statbuf.st_mode)) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
continue;
}
@@ -388,23 +388,23 @@ static char* get_user_name_slow(int vmid, TRAPS) {
if (statbuf.st_ctime > oldest_ctime) {
char* user = strchr(dentry->d_name, '_') + 1;
- if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user);
- oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1);
+ if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user, mtInternal);
+ oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal);
strcpy(oldest_user, user);
oldest_ctime = statbuf.st_ctime;
}
}
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
}
}
os::closedir(subdirp);
- FREE_C_HEAP_ARRAY(char, udbuf);
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, udbuf, mtInternal);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
}
os::closedir(tmpdirp);
- FREE_C_HEAP_ARRAY(char, tdbuf);
+ FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal);
return(oldest_user);
}
@@ -471,7 +471,7 @@ static char* get_sharedmem_filename(const char* dirname, int vmid) {
// add 2 for the file separator and a NULL terminator.
size_t nbytes = strlen(dirname) + UINT_CHARS + 2;
- char* name = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* name = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
snprintf(name, nbytes, "%s/%d", dirname, vmid);
return name;
@@ -509,7 +509,7 @@ static void remove_file(const char* path) {
static void remove_file(const char* dirname, const char* filename) {
size_t nbytes = strlen(dirname) + strlen(filename) + 2;
- char* path = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* path = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
strcpy(path, dirname);
strcat(path, "/");
@@ -517,7 +517,7 @@ static void remove_file(const char* dirname, const char* filename) {
remove_file(path);
- FREE_C_HEAP_ARRAY(char, path);
+ FREE_C_HEAP_ARRAY(char, path, mtInternal);
}
@@ -554,7 +554,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
// opendir/readdir.
//
struct dirent* entry;
- char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname));
+ char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal);
errno = 0;
while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) {
@@ -593,7 +593,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
errno = 0;
}
os::closedir(dirp);
- FREE_C_HEAP_ARRAY(char, dbuf);
+ FREE_C_HEAP_ARRAY(char, dbuf, mtInternal);
}
// make the user specific temporary directory. Returns true if
@@ -738,11 +738,11 @@ static char* mmap_create_shared(size_t size) {
fd = create_sharedmem_resources(dirname, filename, size);
- FREE_C_HEAP_ARRAY(char, user_name);
- FREE_C_HEAP_ARRAY(char, dirname);
+ FREE_C_HEAP_ARRAY(char, user_name, mtInternal);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
if (fd == -1) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
return NULL;
}
@@ -758,7 +758,7 @@ static char* mmap_create_shared(size_t size) {
warning("mmap failed - %s\n", strerror(errno));
}
remove_file(filename);
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
return NULL;
}
@@ -884,7 +884,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
// store file, we don't follow them when attaching either.
//
if (!is_directory_secure(dirname)) {
- FREE_C_HEAP_ARRAY(char, dirname);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Process not found");
}
@@ -899,9 +899,9 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
strcpy(rfilename, filename);
// free the c heap resources that are no longer needed
- if (luser != user) FREE_C_HEAP_ARRAY(char, luser);
- FREE_C_HEAP_ARRAY(char, dirname);
- FREE_C_HEAP_ARRAY(char, filename);
+ if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
// open the shared memory file for the give vmid
fd = open_sharedmem_file(rfilename, file_flags, CHECK);
diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp
index 440b8026233..5534a1ea0a1 100644
--- a/hotspot/src/os/windows/vm/os_windows.cpp
+++ b/hotspot/src/os/windows/vm/os_windows.cpp
@@ -96,7 +96,6 @@
#include
#include // For _beginthreadex(), _endthreadex()
#include // For os::dll_address_to_function_name
-
/* for enumerating dll libraries */
#include
@@ -214,13 +213,13 @@ void os::init_system_properties_values() {
}
}
- home_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + 1);
+ home_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + 1, mtInternal);
if (home_path == NULL)
return;
strcpy(home_path, home_dir);
Arguments::set_java_home(home_path);
- dll_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + strlen(bin) + 1);
+ dll_path = NEW_C_HEAP_ARRAY(char, strlen(home_dir) + strlen(bin) + 1, mtInternal);
if (dll_path == NULL)
return;
strcpy(dll_path, home_dir);
@@ -251,7 +250,7 @@ void os::init_system_properties_values() {
char *path_str = ::getenv("PATH");
library_path = NEW_C_HEAP_ARRAY(char, MAX_PATH * 5 + sizeof(PACKAGE_DIR) +
- sizeof(BIN_DIR) + (path_str ? strlen(path_str) : 0) + 10);
+ sizeof(BIN_DIR) + (path_str ? strlen(path_str) : 0) + 10, mtInternal);
library_path[0] = '\0';
@@ -280,7 +279,7 @@ void os::init_system_properties_values() {
strcat(library_path, ";.");
Arguments::set_library_path(library_path);
- FREE_C_HEAP_ARRAY(char, library_path);
+ FREE_C_HEAP_ARRAY(char, library_path, mtInternal);
}
/* Default extensions directory */
@@ -300,7 +299,7 @@ void os::init_system_properties_values() {
{
#define ENDORSED_DIR "\\lib\\endorsed"
size_t len = strlen(Arguments::get_java_home()) + sizeof(ENDORSED_DIR);
- char * buf = NEW_C_HEAP_ARRAY(char, len);
+ char * buf = NEW_C_HEAP_ARRAY(char, len, mtInternal);
sprintf(buf, "%s%s", Arguments::get_java_home(), ENDORSED_DIR);
Arguments::set_endorsed_dirs(buf);
#undef ENDORSED_DIR
@@ -324,6 +323,23 @@ extern "C" void breakpoint() {
os::breakpoint();
}
+/*
+ * RtlCaptureStackBackTrace Windows API may not exist prior to Windows XP.
+ * So far, this method is only used by Native Memory Tracking, which is
+ * only supported on Windows XP or later.
+ */
+address os::get_caller_pc(int n) {
+#ifdef _NMT_NOINLINE_
+ n ++;
+#endif
+ address pc;
+ if (os::Kernel32Dll::RtlCaptureStackBackTrace(n + 1, 1, (PVOID*)&pc, NULL) == 1) {
+ return pc;
+ }
+ return NULL;
+}
+
+
// os::current_stack_base()
//
// Returns the base of the stack, which is the stack's
@@ -1014,7 +1030,7 @@ DIR *
os::opendir(const char *dirname)
{
assert(dirname != NULL, "just checking"); // hotspot change
- DIR *dirp = (DIR *)malloc(sizeof(DIR));
+ DIR *dirp = (DIR *)malloc(sizeof(DIR), mtInternal);
DWORD fattr; // hotspot change
char alt_dirname[4] = { 0, 0, 0, 0 };
@@ -1036,9 +1052,9 @@ os::opendir(const char *dirname)
dirname = alt_dirname;
}
- dirp->path = (char *)malloc(strlen(dirname) + 5);
+ dirp->path = (char *)malloc(strlen(dirname) + 5, mtInternal);
if (dirp->path == 0) {
- free(dirp);
+ free(dirp, mtInternal);
errno = ENOMEM;
return 0;
}
@@ -1046,13 +1062,13 @@ os::opendir(const char *dirname)
fattr = GetFileAttributes(dirp->path);
if (fattr == 0xffffffff) {
- free(dirp->path);
- free(dirp);
+ free(dirp->path, mtInternal);
+ free(dirp, mtInternal);
errno = ENOENT;
return 0;
} else if ((fattr & FILE_ATTRIBUTE_DIRECTORY) == 0) {
- free(dirp->path);
- free(dirp);
+ free(dirp->path, mtInternal);
+ free(dirp, mtInternal);
errno = ENOTDIR;
return 0;
}
@@ -1070,8 +1086,8 @@ os::opendir(const char *dirname)
dirp->handle = FindFirstFile(dirp->path, &dirp->find_data);
if (dirp->handle == INVALID_HANDLE_VALUE) {
if (GetLastError() != ERROR_FILE_NOT_FOUND) {
- free(dirp->path);
- free(dirp);
+ free(dirp->path, mtInternal);
+ free(dirp, mtInternal);
errno = EACCES;
return 0;
}
@@ -1114,8 +1130,8 @@ os::closedir(DIR *dirp)
}
dirp->handle = INVALID_HANDLE_VALUE;
}
- free(dirp->path);
- free(dirp);
+ free(dirp->path, mtInternal);
+ free(dirp, mtInternal);
return 0;
}
@@ -1176,11 +1192,11 @@ void os::dll_build_name(char *buffer, size_t buflen,
// release the storage
for (int i = 0 ; i < n ; i++) {
if (pelements[i] != NULL) {
- FREE_C_HEAP_ARRAY(char, pelements[i]);
+ FREE_C_HEAP_ARRAY(char, pelements[i], mtInternal);
}
}
if (pelements != NULL) {
- FREE_C_HEAP_ARRAY(char*, pelements);
+ FREE_C_HEAP_ARRAY(char*, pelements, mtInternal);
}
} else {
jio_snprintf(buffer, buflen, "%s\\%s.dll", pname, fname);
@@ -2637,7 +2653,7 @@ private:
void free_node_list() {
if (_numa_used_node_list != NULL) {
- FREE_C_HEAP_ARRAY(int, _numa_used_node_list);
+ FREE_C_HEAP_ARRAY(int, _numa_used_node_list, mtInternal);
}
}
@@ -2659,7 +2675,7 @@ public:
ULONG highest_node_number;
if (!os::Kernel32Dll::GetNumaHighestNodeNumber(&highest_node_number)) return false;
free_node_list();
- _numa_used_node_list = NEW_C_HEAP_ARRAY(int, highest_node_number + 1);
+ _numa_used_node_list = NEW_C_HEAP_ARRAY(int, highest_node_number + 1, mtInternal);
for (unsigned int i = 0; i <= highest_node_number; i++) {
ULONGLONG proc_mask_numa_node;
if (!os::Kernel32Dll::GetNumaNodeProcessorMask(i, &proc_mask_numa_node)) return false;
@@ -2918,7 +2934,7 @@ void os::large_page_init() {
// On win32, one cannot release just a part of reserved memory, it's an
// all or nothing deal. When we split a reservation, we must break the
// reservation into two reservations.
-void os::split_reserved_memory(char *base, size_t size, size_t split,
+void os::pd_split_reserved_memory(char *base, size_t size, size_t split,
bool realloc) {
if (size > 0) {
release_memory(base, size);
@@ -2931,7 +2947,7 @@ void os::split_reserved_memory(char *base, size_t size, size_t split,
}
}
-char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint) {
+char* os::pd_reserve_memory(size_t bytes, char* addr, size_t alignment_hint) {
assert((size_t)addr % os::vm_allocation_granularity() == 0,
"reserve alignment");
assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size");
@@ -2964,7 +2980,7 @@ char* os::reserve_memory(size_t bytes, char* addr, size_t alignment_hint) {
// Reserve memory at an arbitrary address, only if that area is
// available (and not reserved for something else).
-char* os::attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
+char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
// Windows os::reserve_memory() fails of the requested address range is
// not avilable.
return reserve_memory(bytes, requested_addr);
@@ -3027,7 +3043,7 @@ bool os::release_memory_special(char* base, size_t bytes) {
void os::print_statistics() {
}
-bool os::commit_memory(char* addr, size_t bytes, bool exec) {
+bool os::pd_commit_memory(char* addr, size_t bytes, bool exec) {
if (bytes == 0) {
// Don't bother the OS with noops.
return true;
@@ -3075,26 +3091,26 @@ bool os::commit_memory(char* addr, size_t bytes, bool exec) {
return true;
}
-bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
+bool os::pd_commit_memory(char* addr, size_t size, size_t alignment_hint,
bool exec) {
return commit_memory(addr, size, exec);
}
-bool os::uncommit_memory(char* addr, size_t bytes) {
+bool os::pd_uncommit_memory(char* addr, size_t bytes) {
if (bytes == 0) {
// Don't bother the OS with noops.
return true;
}
assert((size_t) addr % os::vm_page_size() == 0, "uncommit on page boundaries");
assert(bytes % os::vm_page_size() == 0, "uncommit in page-sized chunks");
- return VirtualFree(addr, bytes, MEM_DECOMMIT) != 0;
+ return (VirtualFree(addr, bytes, MEM_DECOMMIT) != 0);
}
-bool os::release_memory(char* addr, size_t bytes) {
+bool os::pd_release_memory(char* addr, size_t bytes) {
return VirtualFree(addr, 0, MEM_RELEASE) != 0;
}
-bool os::create_stack_guard_pages(char* addr, size_t size) {
+bool os::pd_create_stack_guard_pages(char* addr, size_t size) {
return os::commit_memory(addr, size);
}
@@ -3141,8 +3157,8 @@ bool os::unguard_memory(char* addr, size_t bytes) {
return VirtualProtect(addr, bytes, PAGE_READWRITE, &old_status) != 0;
}
-void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { }
-void os::free_memory(char *addr, size_t bytes, size_t alignment_hint) { }
+void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) { }
+void os::pd_free_memory(char *addr, size_t bytes, size_t alignment_hint) { }
void os::numa_make_global(char *addr, size_t bytes) { }
void os::numa_make_local(char *addr, size_t bytes, int lgrp_hint) { }
bool os::numa_topology_changed() { return false; }
@@ -4276,14 +4292,14 @@ static int stdinAvailable(int fd, long *pbytes) {
numEvents = MAX_INPUT_EVENTS;
}
- lpBuffer = (INPUT_RECORD *)os::malloc(numEvents * sizeof(INPUT_RECORD));
+ lpBuffer = (INPUT_RECORD *)os::malloc(numEvents * sizeof(INPUT_RECORD), mtInternal);
if (lpBuffer == NULL) {
return FALSE;
}
error = ::PeekConsoleInput(han, lpBuffer, numEvents, &numEventsRead);
if (error == 0) {
- os::free(lpBuffer);
+ os::free(lpBuffer, mtInternal);
return FALSE;
}
@@ -4304,7 +4320,7 @@ static int stdinAvailable(int fd, long *pbytes) {
}
if(lpBuffer != NULL) {
- os::free(lpBuffer);
+ os::free(lpBuffer, mtInternal);
}
*pbytes = (long) actualLength;
@@ -4312,7 +4328,7 @@ static int stdinAvailable(int fd, long *pbytes) {
}
// Map a block of memory.
-char* os::map_memory(int fd, const char* file_name, size_t file_offset,
+char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
HANDLE hFile;
@@ -4432,7 +4448,7 @@ char* os::map_memory(int fd, const char* file_name, size_t file_offset,
// Remap a block of memory.
-char* os::remap_memory(int fd, const char* file_name, size_t file_offset,
+char* os::pd_remap_memory(int fd, const char* file_name, size_t file_offset,
char *addr, size_t bytes, bool read_only,
bool allow_exec) {
// This OS does not allow existing memory maps to be remapped so we
@@ -4445,15 +4461,15 @@ char* os::remap_memory(int fd, const char* file_name, size_t file_offset,
// call above and the map_memory() call below where a thread in native
// code may be able to access an address that is no longer mapped.
- return os::map_memory(fd, file_name, file_offset, addr, bytes, read_only,
- allow_exec);
+ return os::map_memory(fd, file_name, file_offset, addr, bytes,
+ read_only, allow_exec);
}
// Unmap a block of memory.
// Returns true=success, otherwise false.
-bool os::unmap_memory(char* addr, size_t bytes) {
+bool os::pd_unmap_memory(char* addr, size_t bytes) {
BOOL result = UnmapViewOfFile(addr);
if (result == 0) {
if (PrintMiscellaneous && Verbose) {
@@ -4931,11 +4947,15 @@ typedef SIZE_T (WINAPI* GetLargePageMinimum_Fn)(void);
typedef LPVOID (WINAPI *VirtualAllocExNuma_Fn) (HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD);
typedef BOOL (WINAPI *GetNumaHighestNodeNumber_Fn) (PULONG);
typedef BOOL (WINAPI *GetNumaNodeProcessorMask_Fn) (UCHAR, PULONGLONG);
+typedef USHORT (WINAPI* RtlCaptureStackBackTrace_Fn)(ULONG, ULONG, PVOID*, PULONG);
GetLargePageMinimum_Fn os::Kernel32Dll::_GetLargePageMinimum = NULL;
VirtualAllocExNuma_Fn os::Kernel32Dll::_VirtualAllocExNuma = NULL;
GetNumaHighestNodeNumber_Fn os::Kernel32Dll::_GetNumaHighestNodeNumber = NULL;
GetNumaNodeProcessorMask_Fn os::Kernel32Dll::_GetNumaNodeProcessorMask = NULL;
+RtlCaptureStackBackTrace_Fn os::Kernel32Dll::_RtlCaptureStackBackTrace = NULL;
+
+
BOOL os::Kernel32Dll::initialized = FALSE;
SIZE_T os::Kernel32Dll::GetLargePageMinimum() {
assert(initialized && _GetLargePageMinimum != NULL,
@@ -4978,6 +4998,19 @@ BOOL os::Kernel32Dll::GetNumaNodeProcessorMask(UCHAR node, PULONGLONG proc_mask)
return _GetNumaNodeProcessorMask(node, proc_mask);
}
+USHORT os::Kernel32Dll::RtlCaptureStackBackTrace(ULONG FrameToSkip,
+ ULONG FrameToCapture, PVOID* BackTrace, PULONG BackTraceHash) {
+ if (!initialized) {
+ initialize();
+ }
+
+ if (_RtlCaptureStackBackTrace != NULL) {
+ return _RtlCaptureStackBackTrace(FrameToSkip, FrameToCapture,
+ BackTrace, BackTraceHash);
+ } else {
+ return 0;
+ }
+}
void os::Kernel32Dll::initializeCommon() {
if (!initialized) {
@@ -4987,6 +5020,7 @@ void os::Kernel32Dll::initializeCommon() {
_VirtualAllocExNuma = (VirtualAllocExNuma_Fn)::GetProcAddress(handle, "VirtualAllocExNuma");
_GetNumaHighestNodeNumber = (GetNumaHighestNodeNumber_Fn)::GetProcAddress(handle, "GetNumaHighestNodeNumber");
_GetNumaNodeProcessorMask = (GetNumaNodeProcessorMask_Fn)::GetProcAddress(handle, "GetNumaNodeProcessorMask");
+ _RtlCaptureStackBackTrace = (RtlCaptureStackBackTrace_Fn)::GetProcAddress(handle, "RtlCaptureStackBackTrace");
initialized = TRUE;
}
}
@@ -5101,7 +5135,6 @@ Module32First_Fn os::Kernel32Dll::_Module32First = NULL;
Module32Next_Fn os::Kernel32Dll::_Module32Next = NULL;
GetNativeSystemInfo_Fn os::Kernel32Dll::_GetNativeSystemInfo = NULL;
-
void os::Kernel32Dll::initialize() {
if (!initialized) {
HMODULE handle = ::GetModuleHandle("Kernel32.dll");
@@ -5179,8 +5212,6 @@ void os::Kernel32Dll::GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo) {
_GetNativeSystemInfo(lpSystemInfo);
}
-
-
// PSAPI API
diff --git a/hotspot/src/os/windows/vm/os_windows.hpp b/hotspot/src/os/windows/vm/os_windows.hpp
index e0692e5f2f7..33ea7064ba6 100644
--- a/hotspot/src/os/windows/vm/os_windows.hpp
+++ b/hotspot/src/os/windows/vm/os_windows.hpp
@@ -98,7 +98,7 @@ class win32 {
static LONG WINAPI serialize_fault_filter(struct _EXCEPTION_POINTERS* e);
};
-class PlatformEvent : public CHeapObj {
+class PlatformEvent : public CHeapObj {
private:
double CachePad [4] ; // increase odds that _Event is sole occupant of cache line
volatile int _Event ;
@@ -124,7 +124,7 @@ class PlatformEvent : public CHeapObj {
-class PlatformParker : public CHeapObj {
+class PlatformParker : public CHeapObj {
protected:
HANDLE _ParkEvent ;
@@ -182,6 +182,9 @@ public:
static BOOL GetNumaHighestNodeNumber(PULONG);
static BOOL GetNumaNodeProcessorMask(UCHAR, PULONGLONG);
+ // Stack walking
+ static USHORT RtlCaptureStackBackTrace(ULONG, ULONG, PVOID*, PULONG);
+
private:
// GetLargePageMinimum available on Windows Vista/Windows Server 2003
// and later
@@ -191,6 +194,7 @@ private:
static LPVOID (WINAPI *_VirtualAllocExNuma) (HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD);
static BOOL (WINAPI *_GetNumaHighestNodeNumber) (PULONG);
static BOOL (WINAPI *_GetNumaNodeProcessorMask) (UCHAR, PULONGLONG);
+ static USHORT (WINAPI *_RtlCaptureStackBackTrace)(ULONG, ULONG, PVOID*, PULONG);
static BOOL initialized;
static void initialize();
diff --git a/hotspot/src/os/windows/vm/perfMemory_windows.cpp b/hotspot/src/os/windows/vm/perfMemory_windows.cpp
index 4f3280d5906..2358171b78a 100644
--- a/hotspot/src/os/windows/vm/perfMemory_windows.cpp
+++ b/hotspot/src/os/windows/vm/perfMemory_windows.cpp
@@ -120,7 +120,7 @@ static void save_memory_to_file(char* addr, size_t size) {
}
}
- FREE_C_HEAP_ARRAY(char, destfile);
+ FREE_C_HEAP_ARRAY(char, destfile, mtInternal);
}
// Shared Memory Implementation Details
@@ -157,7 +157,7 @@ static char* get_user_tmp_dir(const char* user) {
const char* tmpdir = os::get_temp_directory();
const char* perfdir = PERFDATA_NAME;
size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3;
- char* dirname = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* dirname = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
// construct the path name to user specific tmp directory
_snprintf(dirname, nbytes, "%s\\%s_%s", tmpdir, perfdir, user);
@@ -281,7 +281,7 @@ static char* get_user_name() {
}
}
- char* user_name = NEW_C_HEAP_ARRAY(char, strlen(user)+1);
+ char* user_name = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal);
strcpy(user_name, user);
return user_name;
@@ -315,7 +315,7 @@ static char* get_user_name_slow(int vmid) {
// to determine the user name for the process id.
//
struct dirent* dentry;
- char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname));
+ char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal);
errno = 0;
while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) {
@@ -325,7 +325,7 @@ static char* get_user_name_slow(int vmid) {
}
char* usrdir_name = NEW_C_HEAP_ARRAY(char,
- strlen(tmpdirname) + strlen(dentry->d_name) + 2);
+ strlen(tmpdirname) + strlen(dentry->d_name) + 2, mtInternal);
strcpy(usrdir_name, tmpdirname);
strcat(usrdir_name, "\\");
strcat(usrdir_name, dentry->d_name);
@@ -333,7 +333,7 @@ static char* get_user_name_slow(int vmid) {
DIR* subdirp = os::opendir(usrdir_name);
if (subdirp == NULL) {
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
continue;
}
@@ -344,13 +344,13 @@ static char* get_user_name_slow(int vmid) {
// symlink can be exploited.
//
if (!is_directory_secure(usrdir_name)) {
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
os::closedir(subdirp);
continue;
}
struct dirent* udentry;
- char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name));
+ char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal);
errno = 0;
while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) {
@@ -358,20 +358,20 @@ static char* get_user_name_slow(int vmid) {
struct stat statbuf;
char* filename = NEW_C_HEAP_ARRAY(char,
- strlen(usrdir_name) + strlen(udentry->d_name) + 2);
+ strlen(usrdir_name) + strlen(udentry->d_name) + 2, mtInternal);
strcpy(filename, usrdir_name);
strcat(filename, "\\");
strcat(filename, udentry->d_name);
if (::stat(filename, &statbuf) == OS_ERR) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
continue;
}
// skip over files that are not regular files.
if ((statbuf.st_mode & S_IFMT) != S_IFREG) {
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
continue;
}
@@ -393,22 +393,22 @@ static char* get_user_name_slow(int vmid) {
if (statbuf.st_ctime > latest_ctime) {
char* user = strchr(dentry->d_name, '_') + 1;
- if (latest_user != NULL) FREE_C_HEAP_ARRAY(char, latest_user);
- latest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1);
+ if (latest_user != NULL) FREE_C_HEAP_ARRAY(char, latest_user, mtInternal);
+ latest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1, mtInternal);
strcpy(latest_user, user);
latest_ctime = statbuf.st_ctime;
}
- FREE_C_HEAP_ARRAY(char, filename);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
}
}
os::closedir(subdirp);
- FREE_C_HEAP_ARRAY(char, udbuf);
- FREE_C_HEAP_ARRAY(char, usrdir_name);
+ FREE_C_HEAP_ARRAY(char, udbuf, mtInternal);
+ FREE_C_HEAP_ARRAY(char, usrdir_name, mtInternal);
}
os::closedir(tmpdirp);
- FREE_C_HEAP_ARRAY(char, tdbuf);
+ FREE_C_HEAP_ARRAY(char, tdbuf, mtInternal);
return(latest_user);
}
@@ -453,7 +453,7 @@ static char *get_sharedmem_objectname(const char* user, int vmid) {
// about a name containing a '-' characters.
//
nbytes += UINT_CHARS;
- char* name = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* name = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
_snprintf(name, nbytes, "%s_%s_%u", PERFDATA_NAME, user, vmid);
return name;
@@ -469,7 +469,7 @@ static char* get_sharedmem_filename(const char* dirname, int vmid) {
// add 2 for the file separator and a null terminator.
size_t nbytes = strlen(dirname) + UINT_CHARS + 2;
- char* name = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* name = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
_snprintf(name, nbytes, "%s\\%d", dirname, vmid);
return name;
@@ -485,7 +485,7 @@ static char* get_sharedmem_filename(const char* dirname, int vmid) {
static void remove_file(const char* dirname, const char* filename) {
size_t nbytes = strlen(dirname) + strlen(filename) + 2;
- char* path = NEW_C_HEAP_ARRAY(char, nbytes);
+ char* path = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
strcpy(path, dirname);
strcat(path, "\\");
@@ -500,7 +500,7 @@ static void remove_file(const char* dirname, const char* filename) {
}
}
- FREE_C_HEAP_ARRAY(char, path);
+ FREE_C_HEAP_ARRAY(char, path, mtInternal);
}
// returns true if the process represented by pid is alive, otherwise
@@ -638,7 +638,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
// opendir/readdir.
//
struct dirent* entry;
- char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname));
+ char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal);
errno = 0;
while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) {
@@ -681,7 +681,7 @@ static void cleanup_sharedmem_resources(const char* dirname) {
errno = 0;
}
os::closedir(dirp);
- FREE_C_HEAP_ARRAY(char, dbuf);
+ FREE_C_HEAP_ARRAY(char, dbuf, mtInternal);
}
// create a file mapping object with the requested name, and size
@@ -747,11 +747,11 @@ static void free_security_desc(PSECURITY_DESCRIPTOR pSD) {
// be an ACL we enlisted. free the resources.
//
if (success && exists && pACL != NULL && !isdefault) {
- FREE_C_HEAP_ARRAY(char, pACL);
+ FREE_C_HEAP_ARRAY(char, pACL, mtInternal);
}
// free the security descriptor
- FREE_C_HEAP_ARRAY(char, pSD);
+ FREE_C_HEAP_ARRAY(char, pSD, mtInternal);
}
}
@@ -766,7 +766,7 @@ static void free_security_attr(LPSECURITY_ATTRIBUTES lpSA) {
lpSA->lpSecurityDescriptor = NULL;
// free the security attributes structure
- FREE_C_HEAP_ARRAY(char, lpSA);
+ FREE_C_HEAP_ARRAY(char, lpSA, mtInternal);
}
}
@@ -805,7 +805,7 @@ static PSID get_user_sid(HANDLE hProcess) {
}
}
- token_buf = (PTOKEN_USER) NEW_C_HEAP_ARRAY(char, rsize);
+ token_buf = (PTOKEN_USER) NEW_C_HEAP_ARRAY(char, rsize, mtInternal);
// get the user token information
if (!GetTokenInformation(hAccessToken, TokenUser, token_buf, rsize, &rsize)) {
@@ -813,28 +813,28 @@ static PSID get_user_sid(HANDLE hProcess) {
warning("GetTokenInformation failure: lasterror = %d,"
" rsize = %d\n", GetLastError(), rsize);
}
- FREE_C_HEAP_ARRAY(char, token_buf);
+ FREE_C_HEAP_ARRAY(char, token_buf, mtInternal);
CloseHandle(hAccessToken);
return NULL;
}
DWORD nbytes = GetLengthSid(token_buf->User.Sid);
- PSID pSID = NEW_C_HEAP_ARRAY(char, nbytes);
+ PSID pSID = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
if (!CopySid(nbytes, pSID, token_buf->User.Sid)) {
if (PrintMiscellaneous && Verbose) {
warning("GetTokenInformation failure: lasterror = %d,"
" rsize = %d\n", GetLastError(), rsize);
}
- FREE_C_HEAP_ARRAY(char, token_buf);
- FREE_C_HEAP_ARRAY(char, pSID);
+ FREE_C_HEAP_ARRAY(char, token_buf, mtInternal);
+ FREE_C_HEAP_ARRAY(char, pSID, mtInternal);
CloseHandle(hAccessToken);
return NULL;
}
// close the access token.
CloseHandle(hAccessToken);
- FREE_C_HEAP_ARRAY(char, token_buf);
+ FREE_C_HEAP_ARRAY(char, token_buf, mtInternal);
return pSID;
}
@@ -912,13 +912,13 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD,
}
// create the new ACL
- newACL = (PACL) NEW_C_HEAP_ARRAY(char, newACLsize);
+ newACL = (PACL) NEW_C_HEAP_ARRAY(char, newACLsize, mtInternal);
if (!InitializeAcl(newACL, newACLsize, ACL_REVISION)) {
if (PrintMiscellaneous && Verbose) {
warning("InitializeAcl failure: lasterror = %d \n", GetLastError());
}
- FREE_C_HEAP_ARRAY(char, newACL);
+ FREE_C_HEAP_ARRAY(char, newACL, mtInternal);
return false;
}
@@ -931,7 +931,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD,
if (PrintMiscellaneous && Verbose) {
warning("InitializeAcl failure: lasterror = %d \n", GetLastError());
}
- FREE_C_HEAP_ARRAY(char, newACL);
+ FREE_C_HEAP_ARRAY(char, newACL, mtInternal);
return false;
}
if (((ACCESS_ALLOWED_ACE *)ace)->Header.AceFlags && INHERITED_ACE) {
@@ -958,7 +958,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD,
if (PrintMiscellaneous && Verbose) {
warning("AddAce failure: lasterror = %d \n", GetLastError());
}
- FREE_C_HEAP_ARRAY(char, newACL);
+ FREE_C_HEAP_ARRAY(char, newACL, mtInternal);
return false;
}
}
@@ -974,7 +974,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD,
warning("AddAccessAllowedAce failure: lasterror = %d \n",
GetLastError());
}
- FREE_C_HEAP_ARRAY(char, newACL);
+ FREE_C_HEAP_ARRAY(char, newACL, mtInternal);
return false;
}
}
@@ -989,7 +989,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD,
if (PrintMiscellaneous && Verbose) {
warning("InitializeAcl failure: lasterror = %d \n", GetLastError());
}
- FREE_C_HEAP_ARRAY(char, newACL);
+ FREE_C_HEAP_ARRAY(char, newACL, mtInternal);
return false;
}
if (!AddAce(newACL, ACL_REVISION, MAXDWORD, ace,
@@ -997,7 +997,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD,
if (PrintMiscellaneous && Verbose) {
warning("AddAce failure: lasterror = %d \n", GetLastError());
}
- FREE_C_HEAP_ARRAY(char, newACL);
+ FREE_C_HEAP_ARRAY(char, newACL, mtInternal);
return false;
}
ace_index++;
@@ -1010,7 +1010,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD,
warning("SetSecurityDescriptorDacl failure:"
" lasterror = %d \n", GetLastError());
}
- FREE_C_HEAP_ARRAY(char, newACL);
+ FREE_C_HEAP_ARRAY(char, newACL, mtInternal);
return false;
}
@@ -1030,7 +1030,7 @@ static bool add_allow_aces(PSECURITY_DESCRIPTOR pSD,
warning("SetSecurityDescriptorControl failure:"
" lasterror = %d \n", GetLastError());
}
- FREE_C_HEAP_ARRAY(char, newACL);
+ FREE_C_HEAP_ARRAY(char, newACL, mtInternal);
return false;
}
}
@@ -1054,7 +1054,7 @@ static LPSECURITY_ATTRIBUTES make_security_attr(ace_data_t aces[], int count) {
// allocate space for a security descriptor
PSECURITY_DESCRIPTOR pSD = (PSECURITY_DESCRIPTOR)
- NEW_C_HEAP_ARRAY(char, SECURITY_DESCRIPTOR_MIN_LENGTH);
+ NEW_C_HEAP_ARRAY(char, SECURITY_DESCRIPTOR_MIN_LENGTH, mtInternal);
// initialize the security descriptor
if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)) {
@@ -1076,7 +1076,7 @@ static LPSECURITY_ATTRIBUTES make_security_attr(ace_data_t aces[], int count) {
// return it to the caller.
//
LPSECURITY_ATTRIBUTES lpSA = (LPSECURITY_ATTRIBUTES)
- NEW_C_HEAP_ARRAY(char, sizeof(SECURITY_ATTRIBUTES));
+ NEW_C_HEAP_ARRAY(char, sizeof(SECURITY_ATTRIBUTES), mtInternal);
lpSA->nLength = sizeof(SECURITY_ATTRIBUTES);
lpSA->lpSecurityDescriptor = pSD;
lpSA->bInheritHandle = FALSE;
@@ -1147,7 +1147,7 @@ static LPSECURITY_ATTRIBUTES make_user_everybody_admin_security_attr(
// create a security attributes structure with access control
// entries as initialized above.
LPSECURITY_ATTRIBUTES lpSA = make_security_attr(aces, 3);
- FREE_C_HEAP_ARRAY(char, aces[0].pSid);
+ FREE_C_HEAP_ARRAY(char, aces[0].pSid, mtInternal);
FreeSid(everybodySid);
FreeSid(administratorsSid);
return(lpSA);
@@ -1462,15 +1462,15 @@ static char* mapping_create_shared(size_t size) {
assert(((size != 0) && (size % os::vm_page_size() == 0)),
"unexpected PerfMemry region size");
- FREE_C_HEAP_ARRAY(char, user);
+ FREE_C_HEAP_ARRAY(char, user, mtInternal);
// create the shared memory resources
sharedmem_fileMapHandle =
create_sharedmem_resources(dirname, filename, objectname, size);
- FREE_C_HEAP_ARRAY(char, filename);
- FREE_C_HEAP_ARRAY(char, objectname);
- FREE_C_HEAP_ARRAY(char, dirname);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
+ FREE_C_HEAP_ARRAY(char, objectname, mtInternal);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
if (sharedmem_fileMapHandle == NULL) {
return NULL;
@@ -1621,7 +1621,7 @@ static void open_file_mapping(const char* user, int vmid,
// store file, we also don't following them when attaching
//
if (!is_directory_secure(dirname)) {
- FREE_C_HEAP_ARRAY(char, dirname);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Process not found");
}
@@ -1640,10 +1640,10 @@ static void open_file_mapping(const char* user, int vmid,
strcpy(robjectname, objectname);
// free the c heap resources that are no longer needed
- if (luser != user) FREE_C_HEAP_ARRAY(char, luser);
- FREE_C_HEAP_ARRAY(char, dirname);
- FREE_C_HEAP_ARRAY(char, filename);
- FREE_C_HEAP_ARRAY(char, objectname);
+ if (luser != user) FREE_C_HEAP_ARRAY(char, luser, mtInternal);
+ FREE_C_HEAP_ARRAY(char, dirname, mtInternal);
+ FREE_C_HEAP_ARRAY(char, filename, mtInternal);
+ FREE_C_HEAP_ARRAY(char, objectname, mtInternal);
if (*sizep == 0) {
size = sharedmem_filesize(rfilename, CHECK);
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
index 2806e79ea4a..c6d31ab4f9a 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
@@ -516,7 +516,12 @@ JVM_handle_bsd_signal(int sig,
}
}
- if (thread->thread_state() == _thread_in_Java) {
+ // We test if stub is already set (by the stack overflow code
+ // above) so it is not overwritten by the code that follows. This
+ // check is not required on other platforms, because on other
+ // platforms we check for SIGSEGV only or SIGBUS only, where here
+ // we have to check for both SIGSEGV and SIGBUS.
+ if (thread->thread_state() == _thread_in_Java && stub == NULL) {
// Java thread running in Java code => find exception handler if any
// a fault inside compiled code, the interpreter, or a stub
diff --git a/hotspot/src/share/vm/adlc/adlparse.cpp b/hotspot/src/share/vm/adlc/adlparse.cpp
index ec31e36279b..ff486733efc 100644
--- a/hotspot/src/share/vm/adlc/adlparse.cpp
+++ b/hotspot/src/share/vm/adlc/adlparse.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -115,6 +115,12 @@ void ADLParser::parse() {
parse_err(SYNERR, "expected one of - instruct, operand, ins_attrib, op_attrib, source, register, pipeline, encode\n Found %s",ident);
}
}
+ // Add reg_class spill_regs after parsing.
+ RegisterForm *regBlock = _AD.get_registers();
+ if (regBlock == NULL) {
+ parse_err(SEMERR, "Did not declare 'register' definitions");
+ }
+ regBlock->addSpillRegClass();
// Done with parsing, check consistency.
@@ -768,11 +774,12 @@ void ADLParser::source_hpp_parse(void) {
//------------------------------reg_parse--------------------------------------
void ADLParser::reg_parse(void) {
-
- // Create the RegisterForm for the architecture description.
- RegisterForm *regBlock = new RegisterForm(); // Build new Source object
- regBlock->_linenum = linenum();
- _AD.addForm(regBlock);
+ RegisterForm *regBlock = _AD.get_registers(); // Information about registers encoding
+ if (regBlock == NULL) {
+ // Create the RegisterForm for the architecture description.
+ regBlock = new RegisterForm(); // Build new Source object
+ _AD.addForm(regBlock);
+ }
skipws(); // Skip leading whitespace
if (_curchar == '%' && *(_ptr+1) == '{') {
@@ -796,15 +803,11 @@ void ADLParser::reg_parse(void) {
parse_err(SYNERR, "Missing %c{ ... %c} block after register keyword.\n",'%','%');
return;
}
-
- // Add reg_class spill_regs
- regBlock->addSpillRegClass();
}
//------------------------------encode_parse-----------------------------------
void ADLParser::encode_parse(void) {
EncodeForm *encBlock; // Information about instruction/operand encoding
- char *desc = NULL; // String representation of encode rule
_AD.getForm(&encBlock);
if ( encBlock == NULL) {
diff --git a/hotspot/src/share/vm/adlc/archDesc.cpp b/hotspot/src/share/vm/adlc/archDesc.cpp
index 294e88c148e..23cbb1e007b 100644
--- a/hotspot/src/share/vm/adlc/archDesc.cpp
+++ b/hotspot/src/share/vm/adlc/archDesc.cpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 1997, 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
@@ -911,12 +911,24 @@ const char *ArchDesc::getIdealType(const char *idealOp) {
// Find last character in idealOp, it specifies the type
char last_char = 0;
const char *ptr = idealOp;
- for( ; *ptr != '\0'; ++ptr) {
+ for (; *ptr != '\0'; ++ptr) {
last_char = *ptr;
}
+ // Match Vector types.
+ if (strncmp(idealOp, "Vec",3)==0) {
+ switch(last_char) {
+ case 'S': return "TypeVect::VECTS";
+ case 'D': return "TypeVect::VECTD";
+ case 'X': return "TypeVect::VECTX";
+ case 'Y': return "TypeVect::VECTY";
+ default:
+ internal_err("Vector type %s with unrecognized type\n",idealOp);
+ }
+ }
+
// !!!!!
- switch( last_char ) {
+ switch(last_char) {
case 'I': return "TypeInt::INT";
case 'P': return "TypePtr::BOTTOM";
case 'N': return "TypeNarrowOop::BOTTOM";
diff --git a/hotspot/src/share/vm/adlc/forms.cpp b/hotspot/src/share/vm/adlc/forms.cpp
index 372ef5dd508..70b8bd96253 100644
--- a/hotspot/src/share/vm/adlc/forms.cpp
+++ b/hotspot/src/share/vm/adlc/forms.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -265,47 +265,22 @@ Form::DataType Form::is_load_from_memory(const char *opType) const {
if( strcmp(opType,"LoadN")==0 ) return Form::idealN;
if( strcmp(opType,"LoadRange")==0 ) return Form::idealI;
if( strcmp(opType,"LoadS")==0 ) return Form::idealS;
- if( strcmp(opType,"Load16B")==0 ) return Form::idealB;
- if( strcmp(opType,"Load8B")==0 ) return Form::idealB;
- if( strcmp(opType,"Load4B")==0 ) return Form::idealB;
- if( strcmp(opType,"Load8C")==0 ) return Form::idealC;
- if( strcmp(opType,"Load4C")==0 ) return Form::idealC;
- if( strcmp(opType,"Load2C")==0 ) return Form::idealC;
- if( strcmp(opType,"Load8S")==0 ) return Form::idealS;
- if( strcmp(opType,"Load4S")==0 ) return Form::idealS;
- if( strcmp(opType,"Load2S")==0 ) return Form::idealS;
- if( strcmp(opType,"Load2D")==0 ) return Form::idealD;
- if( strcmp(opType,"Load4F")==0 ) return Form::idealF;
- if( strcmp(opType,"Load2F")==0 ) return Form::idealF;
- if( strcmp(opType,"Load4I")==0 ) return Form::idealI;
- if( strcmp(opType,"Load2I")==0 ) return Form::idealI;
- if( strcmp(opType,"Load2L")==0 ) return Form::idealL;
+ if( strcmp(opType,"LoadVector")==0 ) return Form::idealV;
assert( strcmp(opType,"Load") != 0, "Must type Loads" );
return Form::none;
}
Form::DataType Form::is_store_to_memory(const char *opType) const {
if( strcmp(opType,"StoreB")==0) return Form::idealB;
- if( strcmp(opType,"StoreCM")==0) return Form::idealB;
+ if( strcmp(opType,"StoreCM")==0) return Form::idealB;
if( strcmp(opType,"StoreC")==0) return Form::idealC;
if( strcmp(opType,"StoreD")==0) return Form::idealD;
if( strcmp(opType,"StoreF")==0) return Form::idealF;
if( strcmp(opType,"StoreI")==0) return Form::idealI;
if( strcmp(opType,"StoreL")==0) return Form::idealL;
if( strcmp(opType,"StoreP")==0) return Form::idealP;
- if( strcmp(opType,"StoreN")==0) return Form::idealN;
- if( strcmp(opType,"Store16B")==0) return Form::idealB;
- if( strcmp(opType,"Store8B")==0) return Form::idealB;
- if( strcmp(opType,"Store4B")==0) return Form::idealB;
- if( strcmp(opType,"Store8C")==0) return Form::idealC;
- if( strcmp(opType,"Store4C")==0) return Form::idealC;
- if( strcmp(opType,"Store2C")==0) return Form::idealC;
- if( strcmp(opType,"Store2D")==0) return Form::idealD;
- if( strcmp(opType,"Store4F")==0) return Form::idealF;
- if( strcmp(opType,"Store2F")==0) return Form::idealF;
- if( strcmp(opType,"Store4I")==0) return Form::idealI;
- if( strcmp(opType,"Store2I")==0) return Form::idealI;
- if( strcmp(opType,"Store2L")==0) return Form::idealL;
+ if( strcmp(opType,"StoreN")==0) return Form::idealN;
+ if( strcmp(opType,"StoreVector")==0 ) return Form::idealV;
assert( strcmp(opType,"Store") != 0, "Must type Stores" );
return Form::none;
}
diff --git a/hotspot/src/share/vm/adlc/forms.hpp b/hotspot/src/share/vm/adlc/forms.hpp
index 3132c6a3f92..aa13845d38f 100644
--- a/hotspot/src/share/vm/adlc/forms.hpp
+++ b/hotspot/src/share/vm/adlc/forms.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -172,7 +172,8 @@ public:
idealB = 6, // Byte type
idealC = 7, // Char type
idealS = 8, // String type
- idealN = 9 // Narrow oop types
+ idealN = 9, // Narrow oop types
+ idealV = 10 // Vector type
};
// Convert ideal name to a DataType, return DataType::none if not a 'ConX'
Form::DataType ideal_to_const_type(const char *ideal_type_name) const;
diff --git a/hotspot/src/share/vm/adlc/formsopt.cpp b/hotspot/src/share/vm/adlc/formsopt.cpp
index 302cd84afe4..07d70fc6c6e 100644
--- a/hotspot/src/share/vm/adlc/formsopt.cpp
+++ b/hotspot/src/share/vm/adlc/formsopt.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -66,7 +66,7 @@ AllocClass *RegisterForm::addAllocClass(char *className) {
// for spill-slots/regs.
void RegisterForm::addSpillRegClass() {
// Stack slots start at the next available even register number.
- _reg_ctr = (_reg_ctr+1) & ~1;
+ _reg_ctr = (_reg_ctr+7) & ~7;
const char *rc_name = "stack_slots";
RegClass *reg_class = new RegClass(rc_name);
reg_class->_stack_or_reg = true;
@@ -150,9 +150,14 @@ bool RegisterForm::verify() {
int RegisterForm::RegMask_Size() {
// Need at least this many words
int words_for_regs = (_reg_ctr + 31)>>5;
- // Add a few for incoming & outgoing arguments to calls.
+ // The array of Register Mask bits should be large enough to cover
+ // all the machine registers and all parameters that need to be passed
+ // on the stack (stack registers) up to some interesting limit. Methods
+ // that need more parameters will NOT be compiled. On Intel, the limit
+ // is something like 90+ parameters.
+ // Add a few (3 words == 96 bits) for incoming & outgoing arguments to calls.
// Round up to the next doubleword size.
- return (words_for_regs + 2 + 1) & ~1;
+ return (words_for_regs + 3 + 1) & ~1;
}
void RegisterForm::dump() { // Debug printer
diff --git a/hotspot/src/share/vm/adlc/formssel.cpp b/hotspot/src/share/vm/adlc/formssel.cpp
index e92b8f89ec9..1b009707ac8 100644
--- a/hotspot/src/share/vm/adlc/formssel.cpp
+++ b/hotspot/src/share/vm/adlc/formssel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -432,6 +432,14 @@ Form::DataType InstructForm::is_ideal_store() const {
return _matrule->is_ideal_store();
}
+// Return 'true' if this instruction matches an ideal vector node
+bool InstructForm::is_vector() const {
+ if( _matrule == NULL ) return false;
+
+ return _matrule->is_vector();
+}
+
+
// Return the input register that must match the output register
// If this is not required, return 0
uint InstructForm::two_address(FormDict &globals) {
@@ -751,6 +759,9 @@ bool InstructForm::captures_bottom_type(FormDict &globals) const {
if (needs_base_oop_edge(globals)) return true;
+ if (is_vector()) return true;
+ if (is_mach_constant()) return true;
+
return false;
}
@@ -3381,11 +3392,8 @@ int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
"StoreI","StoreL","StoreP","StoreN","StoreD","StoreF" ,
"StoreB","StoreC","Store" ,"StoreFP",
"LoadI", "LoadUI2L", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF" ,
- "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" ,
- "Store4I","Store2I","Store2L","Store2D","Store4F","Store2F","Store16B",
- "Store8B","Store4B","Store8C","Store4C","Store2C",
- "Load4I" ,"Load2I" ,"Load2L" ,"Load2D" ,"Load4F" ,"Load2F" ,"Load16B" ,
- "Load8B" ,"Load4B" ,"Load8C" ,"Load4C" ,"Load2C" ,"Load8S", "Load4S","Load2S",
+ "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" ,
+ "StoreVector", "LoadVector",
"LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned",
"LoadPLocked",
"StorePConditional", "StoreIConditional", "StoreLConditional",
@@ -3822,6 +3830,10 @@ bool MatchRule::is_base_register(FormDict &globals) const {
strcmp(opType,"RegL")==0 ||
strcmp(opType,"RegF")==0 ||
strcmp(opType,"RegD")==0 ||
+ strcmp(opType,"VecS")==0 ||
+ strcmp(opType,"VecD")==0 ||
+ strcmp(opType,"VecX")==0 ||
+ strcmp(opType,"VecY")==0 ||
strcmp(opType,"Reg" )==0) ) {
return 1;
}
@@ -3938,19 +3950,12 @@ int MatchRule::is_expensive() const {
strcmp(opType,"ReverseBytesL")==0 ||
strcmp(opType,"ReverseBytesUS")==0 ||
strcmp(opType,"ReverseBytesS")==0 ||
- strcmp(opType,"Replicate16B")==0 ||
- strcmp(opType,"Replicate8B")==0 ||
- strcmp(opType,"Replicate4B")==0 ||
- strcmp(opType,"Replicate8C")==0 ||
- strcmp(opType,"Replicate4C")==0 ||
- strcmp(opType,"Replicate8S")==0 ||
- strcmp(opType,"Replicate4S")==0 ||
- strcmp(opType,"Replicate4I")==0 ||
- strcmp(opType,"Replicate2I")==0 ||
- strcmp(opType,"Replicate2L")==0 ||
- strcmp(opType,"Replicate4F")==0 ||
- strcmp(opType,"Replicate2F")==0 ||
- strcmp(opType,"Replicate2D")==0 ||
+ strcmp(opType,"ReplicateB")==0 ||
+ strcmp(opType,"ReplicateS")==0 ||
+ strcmp(opType,"ReplicateI")==0 ||
+ strcmp(opType,"ReplicateL")==0 ||
+ strcmp(opType,"ReplicateF")==0 ||
+ strcmp(opType,"ReplicateD")==0 ||
0 /* 0 to line up columns nicely */ )
return 1;
}
@@ -4034,6 +4039,23 @@ Form::DataType MatchRule::is_ideal_load() const {
return ideal_load;
}
+bool MatchRule::is_vector() const {
+ if( _rChild ) {
+ const char *opType = _rChild->_opType;
+ if( strcmp(opType,"ReplicateB")==0 ||
+ strcmp(opType,"ReplicateS")==0 ||
+ strcmp(opType,"ReplicateI")==0 ||
+ strcmp(opType,"ReplicateL")==0 ||
+ strcmp(opType,"ReplicateF")==0 ||
+ strcmp(opType,"ReplicateD")==0 ||
+ strcmp(opType,"LoadVector")==0 ||
+ strcmp(opType,"StoreVector")==0 ||
+ 0 /* 0 to line up columns nicely */ )
+ return true;
+ }
+ return false;
+}
+
bool MatchRule::skip_antidep_check() const {
// Some loads operate on what is effectively immutable memory so we
diff --git a/hotspot/src/share/vm/adlc/formssel.hpp b/hotspot/src/share/vm/adlc/formssel.hpp
index b2d3ec74d46..93b43b1f08b 100644
--- a/hotspot/src/share/vm/adlc/formssel.hpp
+++ b/hotspot/src/share/vm/adlc/formssel.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -160,6 +160,7 @@ public:
virtual bool is_ideal_safepoint() const; // node matches 'SafePoint'
virtual bool is_ideal_nop() const; // node matches 'Nop'
virtual bool is_ideal_control() const; // control node
+ virtual bool is_vector() const; // vector instruction
virtual Form::CallType is_ideal_call() const; // matches ideal 'Call'
virtual Form::DataType is_ideal_load() const; // node matches ideal 'LoadXNode'
@@ -1011,6 +1012,7 @@ public:
bool is_ideal_goto() const; // node matches ideal 'Goto'
bool is_ideal_loopEnd() const; // node matches ideal 'LoopEnd'
bool is_ideal_bool() const; // node matches ideal 'Bool'
+ bool is_vector() const; // vector instruction
Form::DataType is_ideal_load() const;// node matches ideal 'LoadXNode'
// Should antidep checks be disabled for this rule
// See definition of MatchRule::skip_antidep_check
diff --git a/hotspot/src/share/vm/adlc/main.cpp b/hotspot/src/share/vm/adlc/main.cpp
index 47e207a4b13..a963cdaf5bc 100644
--- a/hotspot/src/share/vm/adlc/main.cpp
+++ b/hotspot/src/share/vm/adlc/main.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -250,6 +250,7 @@ int main(int argc, char *argv[])
AD.addInclude(AD._HPP_file, "opto/node.hpp");
AD.addInclude(AD._HPP_file, "opto/regalloc.hpp");
AD.addInclude(AD._HPP_file, "opto/subnode.hpp");
+ AD.addInclude(AD._HPP_file, "opto/vectornode.hpp");
AD.addInclude(AD._CPP_CLONE_file, "precompiled.hpp");
AD.addInclude(AD._CPP_CLONE_file, "adfiles", get_basename(AD._HPP_file._name));
AD.addInclude(AD._CPP_EXPAND_file, "precompiled.hpp");
diff --git a/hotspot/src/share/vm/asm/codeBuffer.cpp b/hotspot/src/share/vm/asm/codeBuffer.cpp
index f52b942df2c..8235786b40a 100644
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp
@@ -261,7 +261,7 @@ address CodeBuffer::decode_begin() {
GrowableArray* CodeBuffer::create_patch_overflow() {
if (_overflow_arena == NULL) {
- _overflow_arena = new Arena();
+ _overflow_arena = new (mtCode) Arena();
}
return new (_overflow_arena) GrowableArray(_overflow_arena, 8, 0, 0);
}
@@ -910,7 +910,7 @@ void CodeBuffer::block_comment(intptr_t offset, const char * comment) {
_comments.add_comment(offset, comment);
}
-class CodeComment: public CHeapObj {
+class CodeComment: public CHeapObj {
private:
friend class CodeComments;
intptr_t _offset;
@@ -919,13 +919,13 @@ class CodeComment: public CHeapObj {
~CodeComment() {
assert(_next == NULL, "wrong interface for freeing list");
- os::free((void*)_comment);
+ os::free((void*)_comment, mtCode);
}
public:
CodeComment(intptr_t offset, const char * comment) {
_offset = offset;
- _comment = os::strdup(comment);
+ _comment = os::strdup(comment, mtCode);
_next = NULL;
}
diff --git a/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp b/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp
index 4964ebd683e..66a7e225ebd 100644
--- a/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp
+++ b/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp
@@ -33,7 +33,7 @@
#ifndef PRODUCT
-class CFGPrinterOutput : public CHeapObj {
+class CFGPrinterOutput : public CHeapObj {
private:
outputStream* _output;
@@ -106,7 +106,7 @@ void CFGPrinter::print_intervals(IntervalList* intervals, const char* name) {
CFGPrinterOutput::CFGPrinterOutput()
- : _output(new(ResourceObj::C_HEAP) fileStream("output.cfg"))
+ : _output(new(ResourceObj::C_HEAP, mtCompiler) fileStream("output.cfg"))
{
}
diff --git a/hotspot/src/share/vm/c1/c1_Compiler.cpp b/hotspot/src/share/vm/c1/c1_Compiler.cpp
index 41b5eb572e6..7e55ce30fd6 100644
--- a/hotspot/src/share/vm/c1/c1_Compiler.cpp
+++ b/hotspot/src/share/vm/c1/c1_Compiler.cpp
@@ -55,7 +55,7 @@ Compiler::~Compiler() {
void Compiler::initialize_all() {
BufferBlob* buffer_blob = CompilerThread::current()->get_buffer_blob();
- Arena* arena = new Arena();
+ Arena* arena = new (mtCompiler) Arena();
Runtime1::initialize(buffer_blob);
FrameMap::initialize();
// initialize data structures
diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
index d59f87c7e9e..e649453c3c0 100644
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
@@ -3505,8 +3505,10 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, BlockBeg
}
// now perform tests that are based on flag settings
- if (callee->should_inline()) {
+ if (callee->force_inline() || callee->should_inline()) {
// ignore heuristic controls on inlining
+ if (callee->force_inline())
+ CompileTask::print_inlining(callee, scope()->level(), bci(), "force inline by annotation");
} else {
if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("too-deep inlining");
if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("too-deep recursive inlining");
@@ -3531,7 +3533,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, BlockBeg
}
#ifndef PRODUCT
- // printing
+ // printing
if (PrintInlining) {
print_inline_result(callee, true);
}
diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.cpp b/hotspot/src/share/vm/c1/c1_LinearScan.cpp
index 56f94636586..bd4061ec787 100644
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp
@@ -2467,12 +2467,12 @@ void LinearScan::compute_oop_map(IntervalWalker* iw, const LIR_OpVisitState &vis
// Allocate them with new so they are never destroyed (otherwise, a
// forced exit could destroy these objects while they are still in
// use).
-ConstantOopWriteValue* LinearScan::_oop_null_scope_value = new (ResourceObj::C_HEAP) ConstantOopWriteValue(NULL);
-ConstantIntValue* LinearScan::_int_m1_scope_value = new (ResourceObj::C_HEAP) ConstantIntValue(-1);
-ConstantIntValue* LinearScan::_int_0_scope_value = new (ResourceObj::C_HEAP) ConstantIntValue(0);
-ConstantIntValue* LinearScan::_int_1_scope_value = new (ResourceObj::C_HEAP) ConstantIntValue(1);
-ConstantIntValue* LinearScan::_int_2_scope_value = new (ResourceObj::C_HEAP) ConstantIntValue(2);
-LocationValue* _illegal_value = new (ResourceObj::C_HEAP) LocationValue(Location());
+ConstantOopWriteValue* LinearScan::_oop_null_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantOopWriteValue(NULL);
+ConstantIntValue* LinearScan::_int_m1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(-1);
+ConstantIntValue* LinearScan::_int_0_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(0);
+ConstantIntValue* LinearScan::_int_1_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(1);
+ConstantIntValue* LinearScan::_int_2_scope_value = new (ResourceObj::C_HEAP, mtCompiler) ConstantIntValue(2);
+LocationValue* _illegal_value = new (ResourceObj::C_HEAP, mtCompiler) LocationValue(Location());
void LinearScan::init_compute_debug_info() {
// cache for frequently used scope values
diff --git a/hotspot/src/share/vm/ci/ciMethod.cpp b/hotspot/src/share/vm/ci/ciMethod.cpp
index 6049d7b9330..180f22f2144 100644
--- a/hotspot/src/share/vm/ci/ciMethod.cpp
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -79,7 +79,7 @@ ciMethod::ciMethod(methodHandle h_m) : ciObject(h_m) {
_max_locals = h_m()->max_locals();
_code_size = h_m()->code_size();
_intrinsic_id = h_m()->intrinsic_id();
- _handler_count = h_m()->exception_table()->length() / 4;
+ _handler_count = h_m()->exception_table_length();
_uses_monitors = h_m()->access_flags().has_monitor_bytecodes();
_balanced_monitors = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
_is_c1_compilable = !h_m()->is_not_c1_compilable();
@@ -198,7 +198,7 @@ void ciMethod::load_code() {
}
// And load the exception table.
- typeArrayOop exc_table = me->exception_table();
+ ExceptionTable exc_table(me);
// Allocate one extra spot in our list of exceptions. This
// last entry will be used to represent the possibility that
@@ -209,13 +209,12 @@ void ciMethod::load_code() {
* (_handler_count + 1));
if (_handler_count > 0) {
for (int i=0; i<_handler_count; i++) {
- int base = i*4;
_exception_handlers[i] = new (arena) ciExceptionHandler(
holder(),
- /* start */ exc_table->int_at(base),
- /* limit */ exc_table->int_at(base+1),
- /* goto pc */ exc_table->int_at(base+2),
- /* cp index */ exc_table->int_at(base+3));
+ /* start */ exc_table.start_pc(i),
+ /* limit */ exc_table.end_pc(i),
+ /* goto pc */ exc_table.handler_pc(i),
+ /* cp index */ exc_table.catch_type_index(i));
}
}
diff --git a/hotspot/src/share/vm/ci/ciMethod.hpp b/hotspot/src/share/vm/ci/ciMethod.hpp
index 98571ae2873..de28a858669 100644
--- a/hotspot/src/share/vm/ci/ciMethod.hpp
+++ b/hotspot/src/share/vm/ci/ciMethod.hpp
@@ -160,6 +160,8 @@ class ciMethod : public ciObject {
// Code size for inlining decisions.
int code_size_for_inlining();
+ bool force_inline() { return get_methodOop()->force_inline(); }
+
int comp_level();
int highest_osr_comp_level();
diff --git a/hotspot/src/share/vm/ci/ciObjectFactory.cpp b/hotspot/src/share/vm/ci/ciObjectFactory.cpp
index 9aa6b261118..a68fb1259ce 100644
--- a/hotspot/src/share/vm/ci/ciObjectFactory.cpp
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.cpp
@@ -111,7 +111,7 @@ void ciObjectFactory::initialize() {
// This Arena is long lived and exists in the resource mark of the
// compiler thread that initializes the initial ciObjectFactory which
// creates the shared ciObjects that all later ciObjectFactories use.
- Arena* arena = new Arena();
+ Arena* arena = new (mtCompiler) Arena();
ciEnv initial(arena);
ciEnv* env = ciEnv::current();
env->_factory->init_shared_objects();
diff --git a/hotspot/src/share/vm/classfile/altHashing.cpp b/hotspot/src/share/vm/classfile/altHashing.cpp
new file mode 100644
index 00000000000..096d17e9303
--- /dev/null
+++ b/hotspot/src/share/vm/classfile/altHashing.cpp
@@ -0,0 +1,304 @@
+/*
+ * 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "classfile/altHashing.hpp"
+#include "classfile/symbolTable.hpp"
+#include "classfile/systemDictionary.hpp"
+#include "oops/markOop.hpp"
+#include "runtime/thread.hpp"
+
+// Get the hash code of the classes mirror if it exists, otherwise just
+// return a random number, which is one of the possible hash code used for
+// objects. We don't want to call the synchronizer hash code to install
+// this value because it may safepoint.
+intptr_t object_hash(klassOop k) {
+ intptr_t hc = k->java_mirror()->mark()->hash();
+ return hc != markOopDesc::no_hash ? hc : os::random();
+}
+
+// Seed value used for each alternative hash calculated.
+jint AltHashing::compute_seed() {
+ jlong nanos = os::javaTimeNanos();
+ jlong now = os::javaTimeMillis();
+ jint SEED_MATERIAL[8] = {
+ (jint) object_hash(SystemDictionary::String_klass()),
+ (jint) object_hash(SystemDictionary::System_klass()),
+ (jint) os::random(), // current thread isn't a java thread
+ (jint) (((julong)nanos) >> 32),
+ (jint) nanos,
+ (jint) (((julong)now) >> 32),
+ (jint) now,
+ (jint) (os::javaTimeNanos() >> 2)
+ };
+
+ return murmur3_32(SEED_MATERIAL, 8);
+}
+
+
+// Murmur3 hashing for Symbol
+jint AltHashing::murmur3_32(jint seed, const jbyte* data, int len) {
+ jint h1 = seed;
+ int count = len;
+ int offset = 0;
+
+ // body
+ while (count >= 4) {
+ jint k1 = (data[offset] & 0x0FF)
+ | (data[offset + 1] & 0x0FF) << 8
+ | (data[offset + 2] & 0x0FF) << 16
+ | data[offset + 3] << 24;
+
+ count -= 4;
+ offset += 4;
+
+ k1 *= 0xcc9e2d51;
+ k1 = Integer_rotateLeft(k1, 15);
+ k1 *= 0x1b873593;
+
+ h1 ^= k1;
+ h1 = Integer_rotateLeft(h1, 13);
+ h1 = h1 * 5 + 0xe6546b64;
+ }
+
+ // tail
+
+ if (count > 0) {
+ jint k1 = 0;
+
+ switch (count) {
+ case 3:
+ k1 ^= (data[offset + 2] & 0xff) << 16;
+ // fall through
+ case 2:
+ k1 ^= (data[offset + 1] & 0xff) << 8;
+ // fall through
+ case 1:
+ k1 ^= (data[offset] & 0xff);
+ // fall through
+ default:
+ k1 *= 0xcc9e2d51;
+ k1 = Integer_rotateLeft(k1, 15);
+ k1 *= 0x1b873593;
+ h1 ^= k1;
+ }
+ }
+
+ // finalization
+ h1 ^= len;
+
+ // finalization mix force all bits of a hash block to avalanche
+ h1 ^= ((unsigned int)h1) >> 16;
+ h1 *= 0x85ebca6b;
+ h1 ^= ((unsigned int)h1) >> 13;
+ h1 *= 0xc2b2ae35;
+ h1 ^= ((unsigned int)h1) >> 16;
+
+ return h1;
+}
+
+// Murmur3 hashing for Strings
+jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) {
+ jint h1 = seed;
+
+ int off = 0;
+ int count = len;
+
+ // body
+ while (count >= 2) {
+ jchar d1 = data[off++] & 0xFFFF;
+ jchar d2 = data[off++];
+ jint k1 = (d1 | d2 << 16);
+
+ count -= 2;
+
+ k1 *= 0xcc9e2d51;
+ k1 = Integer_rotateLeft(k1, 15);
+ k1 *= 0x1b873593;
+
+ h1 ^= k1;
+ h1 = Integer_rotateLeft(h1, 13);
+ h1 = h1 * 5 + 0xe6546b64;
+ }
+
+ // tail
+
+ if (count > 0) {
+ int k1 = data[off];
+
+ k1 *= 0xcc9e2d51;
+ k1 = Integer_rotateLeft(k1, 15);
+ k1 *= 0x1b873593;
+ h1 ^= k1;
+ }
+
+ // finalization
+ h1 ^= len * 2; // (Character.SIZE / Byte.SIZE);
+
+ // finalization mix force all bits of a hash block to avalanche
+ h1 ^= ((unsigned int)h1) >> 16;
+ h1 *= 0x85ebca6b;
+ h1 ^= ((unsigned int)h1) >> 13;
+ h1 *= 0xc2b2ae35;
+ h1 ^= ((unsigned int)h1) >> 16;
+
+ return h1;
+}
+
+// Hash used for the seed.
+jint AltHashing::murmur3_32(jint seed, const int* data, int len) {
+ jint h1 = seed;
+
+ int off = 0;
+ int end = len;
+
+ // body
+ while (off < end) {
+ jint k1 = data[off++];
+
+ k1 *= 0xcc9e2d51;
+ k1 = Integer_rotateLeft(k1, 15);
+ k1 *= 0x1b873593;
+
+ h1 ^= k1;
+ h1 = Integer_rotateLeft(h1, 13);
+ h1 = h1 * 5 + 0xe6546b64;
+ }
+
+ // tail (always empty, as body is always 32-bit chunks)
+
+ // finalization
+
+ h1 ^= len * 4; // (Integer.SIZE / Byte.SIZE);
+
+ // finalization mix force all bits of a hash block to avalanche
+ h1 ^= ((juint)h1) >> 16;
+ h1 *= 0x85ebca6b;
+ h1 ^= ((juint)h1) >> 13;
+ h1 *= 0xc2b2ae35;
+ h1 ^= ((juint)h1) >> 16;
+
+ return h1;
+}
+
+jint AltHashing::murmur3_32(const int* data, int len) {
+ return murmur3_32(0, data, len);
+}
+
+#ifndef PRODUCT
+// Overloaded versions for internal test.
+jint AltHashing::murmur3_32(const jbyte* data, int len) {
+ return murmur3_32(0, data, len);
+}
+
+jint AltHashing::murmur3_32(const jchar* data, int len) {
+ return murmur3_32(0, data, len);
+}
+
+// Internal test for alternate hashing. Translated from JDK version
+// test/sun/misc/Hashing.java
+static const jbyte ONE_BYTE[] = { (jbyte) 0x80};
+static const jbyte TWO_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81};
+static const jchar ONE_CHAR[] = { (jchar) 0x8180};
+static const jbyte THREE_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82};
+static const jbyte FOUR_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83};
+static const jchar TWO_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382};
+static const jint ONE_INT[] = { 0x83828180};
+static const jbyte SIX_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85};
+static const jchar THREE_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382, (jchar) 0x8584};
+static const jbyte EIGHT_BYTE[] = {
+ (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82,
+ (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85,
+ (jbyte) 0x86, (jbyte) 0x87};
+static const jchar FOUR_CHAR[] = {
+ (jchar) 0x8180, (jchar) 0x8382,
+ (jchar) 0x8584, (jchar) 0x8786};
+
+static const jint TWO_INT[] = { 0x83828180, 0x87868584};
+
+static const juint MURMUR3_32_X86_CHECK_VALUE = 0xB0F57EE3;
+
+void AltHashing::testMurmur3_32_ByteArray() {
+ // printf("testMurmur3_32_ByteArray\n");
+
+ jbyte* vector = new jbyte[256];
+ jbyte* hashes = new jbyte[4 * 256];
+
+ for (int i = 0; i < 256; i++) {
+ vector[i] = (jbyte) i;
+ }
+
+ // Hash subranges {}, {0}, {0,1}, {0,1,2}, ..., {0,...,255}
+ for (int i = 0; i < 256; i++) {
+ jint hash = murmur3_32(256 - i, vector, i);
+ hashes[i * 4] = (jbyte) hash;
+ hashes[i * 4 + 1] = (jbyte) (((juint)hash) >> 8);
+ hashes[i * 4 + 2] = (jbyte) (((juint)hash) >> 16);
+ hashes[i * 4 + 3] = (jbyte) (((juint)hash) >> 24);
+ }
+
+ // hash to get const result.
+ juint final_hash = murmur3_32(hashes, 4*256);
+
+ assert (MURMUR3_32_X86_CHECK_VALUE == final_hash,
+ err_msg(
+ "Calculated hash result not as expected. Expected %08X got %08X\n",
+ MURMUR3_32_X86_CHECK_VALUE,
+ final_hash));
+}
+
+void AltHashing::testEquivalentHashes() {
+ jint jbytes, jchars, ints;
+
+ // printf("testEquivalentHashes\n");
+
+ jbytes = murmur3_32(TWO_BYTE, 2);
+ jchars = murmur3_32(ONE_CHAR, 1);
+ assert (jbytes == jchars,
+ err_msg("Hashes did not match. b:%08x != c:%08x\n", jbytes, jchars));
+
+ jbytes = murmur3_32(FOUR_BYTE, 4);
+ jchars = murmur3_32(TWO_CHAR, 2);
+ ints = murmur3_32(ONE_INT, 1);
+ assert ((jbytes == jchars) && (jbytes == ints),
+ err_msg("Hashes did not match. b:%08x != c:%08x != i:%08x\n", jbytes, jchars, ints));
+
+ jbytes = murmur3_32(SIX_BYTE, 6);
+ jchars = murmur3_32(THREE_CHAR, 3);
+ assert (jbytes == jchars,
+ err_msg("Hashes did not match. b:%08x != c:%08x\n", jbytes, jchars));
+
+ jbytes = murmur3_32(EIGHT_BYTE, 8);
+ jchars = murmur3_32(FOUR_CHAR, 4);
+ ints = murmur3_32(TWO_INT, 2);
+ assert ((jbytes == jchars) && (jbytes == ints),
+ err_msg("Hashes did not match. b:%08x != c:%08x != i:%08x\n", jbytes, jchars, ints));
+}
+
+// Returns true if the alternate hashcode is correct
+void AltHashing::test_alt_hash() {
+ testMurmur3_32_ByteArray();
+ testEquivalentHashes();
+}
+#endif // PRODUCT
diff --git a/hotspot/src/share/vm/classfile/altHashing.hpp b/hotspot/src/share/vm/classfile/altHashing.hpp
new file mode 100644
index 00000000000..941b9a0dc37
--- /dev/null
+++ b/hotspot/src/share/vm/classfile/altHashing.hpp
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ *
+ */
+
+#ifndef SHARE_VM_CLASSFILE_ALTHASHING_HPP
+#define SHARE_VM_CLASSFILE_ALTHASHING_HPP
+
+#include "prims/jni.h"
+#include "classfile/symbolTable.hpp"
+
+/**
+ * Hashing utilities.
+ *
+ * Implementation of Murmur3 hashing.
+ * This code was translated from src/share/classes/sun/misc/Hashing.java
+ * code in the JDK.
+ */
+
+class AltHashing : AllStatic {
+
+ // utility function copied from java/lang/Integer
+ static jint Integer_rotateLeft(jint i, int distance) {
+ return (i << distance) | (((juint)i) >> (32-distance));
+ }
+ static jint murmur3_32(const int* data, int len);
+ static jint murmur3_32(jint seed, const int* data, int len);
+
+#ifndef PRODUCT
+ // Hashing functions used for internal testing
+ static jint murmur3_32(const jbyte* data, int len);
+ static jint murmur3_32(const jchar* data, int len);
+ static void testMurmur3_32_ByteArray();
+ static void testEquivalentHashes();
+#endif // PRODUCT
+
+ public:
+ static jint compute_seed();
+ static jint murmur3_32(jint seed, const jbyte* data, int len);
+ static jint murmur3_32(jint seed, const jchar* data, int len);
+ NOT_PRODUCT(static void test_alt_hash();)
+};
+#endif // SHARE_VM_CLASSFILE_ALTHASHING_HPP
diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp
index b2330e61e37..57f175e1b2f 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp
@@ -318,6 +318,13 @@ class ConstantPoolCleaner : public StackObj {
bool inline valid_cp_range(int index, int length) { return (index > 0 && index < length); }
+inline Symbol* check_symbol_at(constantPoolHandle cp, int index) {
+ if (valid_cp_range(index, cp->length()) && cp->tag_at(index).is_utf8())
+ return cp->symbol_at(index);
+ else
+ return NULL;
+}
+
constantPoolHandle ClassFileParser::parse_constant_pool(Handle class_loader, TRAPS) {
ClassFileStream* cfs = stream();
constantPoolHandle nullHandle;
@@ -902,6 +909,7 @@ void ClassFileParser::parse_field_attributes(constantPoolHandle cp,
bool* is_synthetic_addr,
u2* generic_signature_index_addr,
typeArrayHandle* field_annotations,
+ ClassFileParser::FieldAnnotationCollector* parsed_annotations,
TRAPS) {
ClassFileStream* cfs = stream();
assert(attributes_count > 0, "length should be greater than 0");
@@ -1142,12 +1150,14 @@ typeArrayHandle ClassFileParser::parse_fields(Symbol* class_name,
bool is_synthetic = false;
u2 generic_signature_index = 0;
bool is_static = access_flags.is_static();
+ FieldAnnotationCollector parsed_annotations;
u2 attributes_count = cfs->get_u2_fast();
if (attributes_count > 0) {
parse_field_attributes(cp, attributes_count, is_static, signature_index,
&constantvalue_index, &is_synthetic,
&generic_signature_index, &field_annotations,
+ &parsed_annotations,
CHECK_(nullHandle));
if (field_annotations.not_null()) {
if (fields_annotations->is_null()) {
@@ -1173,6 +1183,8 @@ typeArrayHandle ClassFileParser::parse_fields(Symbol* class_name,
signature_index,
constantvalue_index,
0);
+ if (parsed_annotations.has_any_annotations())
+ parsed_annotations.apply_to(field);
BasicType type = cp->basic_type_for_signature_at(signature_index);
@@ -1284,42 +1296,38 @@ static void copy_u2_with_conversion(u2* dest, u2* src, int length) {
}
-typeArrayHandle ClassFileParser::parse_exception_table(u4 code_length,
- u4 exception_table_length,
- constantPoolHandle cp,
- TRAPS) {
+u2* ClassFileParser::parse_exception_table(u4 code_length,
+ u4 exception_table_length,
+ constantPoolHandle cp,
+ TRAPS) {
ClassFileStream* cfs = stream();
- typeArrayHandle nullHandle;
- // 4-tuples of ints [start_pc, end_pc, handler_pc, catch_type index]
- typeArrayOop eh = oopFactory::new_permanent_intArray(exception_table_length*4, CHECK_(nullHandle));
- typeArrayHandle exception_handlers = typeArrayHandle(THREAD, eh);
-
- int index = 0;
- cfs->guarantee_more(8 * exception_table_length, CHECK_(nullHandle)); // start_pc, end_pc, handler_pc, catch_type_index
- for (unsigned int i = 0; i < exception_table_length; i++) {
- u2 start_pc = cfs->get_u2_fast();
- u2 end_pc = cfs->get_u2_fast();
- u2 handler_pc = cfs->get_u2_fast();
- u2 catch_type_index = cfs->get_u2_fast();
- // Will check legal target after parsing code array in verifier.
- if (_need_verify) {
+ u2* exception_table_start = cfs->get_u2_buffer();
+ assert(exception_table_start != NULL, "null exception table");
+ cfs->guarantee_more(8 * exception_table_length, CHECK_NULL); // start_pc, end_pc, handler_pc, catch_type_index
+ // Will check legal target after parsing code array in verifier.
+ if (_need_verify) {
+ for (unsigned int i = 0; i < exception_table_length; i++) {
+ u2 start_pc = cfs->get_u2_fast();
+ u2 end_pc = cfs->get_u2_fast();
+ u2 handler_pc = cfs->get_u2_fast();
+ u2 catch_type_index = cfs->get_u2_fast();
guarantee_property((start_pc < end_pc) && (end_pc <= code_length),
- "Illegal exception table range in class file %s", CHECK_(nullHandle));
+ "Illegal exception table range in class file %s",
+ CHECK_NULL);
guarantee_property(handler_pc < code_length,
- "Illegal exception table handler in class file %s", CHECK_(nullHandle));
+ "Illegal exception table handler in class file %s",
+ CHECK_NULL);
if (catch_type_index != 0) {
guarantee_property(valid_cp_range(catch_type_index, cp->length()) &&
is_klass_reference(cp, catch_type_index),
- "Catch type in exception table has bad constant type in class file %s", CHECK_(nullHandle));
+ "Catch type in exception table has bad constant type in class file %s", CHECK_NULL);
}
}
- exception_handlers->int_at_put(index++, start_pc);
- exception_handlers->int_at_put(index++, end_pc);
- exception_handlers->int_at_put(index++, handler_pc);
- exception_handlers->int_at_put(index++, catch_type_index);
+ } else {
+ cfs->skip_u2_fast(exception_table_length * 4);
}
- return exception_handlers;
+ return exception_table_start;
}
void ClassFileParser::parse_linenumber_table(
@@ -1368,7 +1376,7 @@ class Classfile_LVT_Element VALUE_OBJ_CLASS_SPEC {
};
-class LVT_Hash: public CHeapObj {
+class LVT_Hash: public CHeapObj {
public:
LocalVariableTableElement *_elem; // element
LVT_Hash* _next; // Next entry in hash table
@@ -1638,12 +1646,158 @@ void ClassFileParser::throwIllegalSignature(
name->as_C_string(), _class_name->as_C_string(), sig->as_C_string());
}
+// Skip an annotation. Return >=limit if there is any problem.
+int ClassFileParser::skip_annotation(u1* buffer, int limit, int index) {
+ // annotation := atype:u2 do(nmem:u2) {member:u2 value}
+ // value := switch (tag:u1) { ... }
+ index += 2; // skip atype
+ if ((index += 2) >= limit) return limit; // read nmem
+ int nmem = Bytes::get_Java_u2(buffer+index-2);
+ while (--nmem >= 0 && index < limit) {
+ index += 2; // skip member
+ index = skip_annotation_value(buffer, limit, index);
+ }
+ return index;
+}
+
+// Skip an annotation value. Return >=limit if there is any problem.
+int ClassFileParser::skip_annotation_value(u1* buffer, int limit, int index) {
+ // value := switch (tag:u1) {
+ // case B, C, I, S, Z, D, F, J, c: con:u2;
+ // case e: e_class:u2 e_name:u2;
+ // case s: s_con:u2;
+ // case [: do(nval:u2) {value};
+ // case @: annotation;
+ // case s: s_con:u2;
+ // }
+ if ((index += 1) >= limit) return limit; // read tag
+ u1 tag = buffer[index-1];
+ switch (tag) {
+ case 'B': case 'C': case 'I': case 'S': case 'Z':
+ case 'D': case 'F': case 'J': case 'c': case 's':
+ index += 2; // skip con or s_con
+ break;
+ case 'e':
+ index += 4; // skip e_class, e_name
+ break;
+ case '[':
+ {
+ if ((index += 2) >= limit) return limit; // read nval
+ int nval = Bytes::get_Java_u2(buffer+index-2);
+ while (--nval >= 0 && index < limit) {
+ index = skip_annotation_value(buffer, limit, index);
+ }
+ }
+ break;
+ case '@':
+ index = skip_annotation(buffer, limit, index);
+ break;
+ default:
+ assert(false, "annotation tag");
+ return limit; // bad tag byte
+ }
+ return index;
+}
+
+// Sift through annotations, looking for those significant to the VM:
+void ClassFileParser::parse_annotations(u1* buffer, int limit,
+ constantPoolHandle cp,
+ ClassFileParser::AnnotationCollector* coll,
+ TRAPS) {
+ // annotations := do(nann:u2) {annotation}
+ int index = 0;
+ if ((index += 2) >= limit) return; // read nann
+ int nann = Bytes::get_Java_u2(buffer+index-2);
+ enum { // initial annotation layout
+ atype_off = 0, // utf8 such as 'Ljava/lang/annotation/Retention;'
+ count_off = 2, // u2 such as 1 (one value)
+ member_off = 4, // utf8 such as 'value'
+ tag_off = 6, // u1 such as 'c' (type) or 'e' (enum)
+ e_tag_val = 'e',
+ e_type_off = 7, // utf8 such as 'Ljava/lang/annotation/RetentionPolicy;'
+ e_con_off = 9, // utf8 payload, such as 'SOURCE', 'CLASS', 'RUNTIME'
+ e_size = 11, // end of 'e' annotation
+ c_tag_val = 'c',
+ c_con_off = 7, // utf8 payload, such as 'I' or 'Ljava/lang/String;'
+ c_size = 9, // end of 'c' annotation
+ min_size = 6 // smallest possible size (zero members)
+ };
+ while ((--nann) >= 0 && (index-2 + min_size <= limit)) {
+ int index0 = index;
+ index = skip_annotation(buffer, limit, index);
+ u1* abase = buffer + index0;
+ int atype = Bytes::get_Java_u2(abase + atype_off);
+ int count = Bytes::get_Java_u2(abase + count_off);
+ Symbol* aname = check_symbol_at(cp, atype);
+ if (aname == NULL) break; // invalid annotation name
+ Symbol* member = NULL;
+ if (count >= 1) {
+ int member_index = Bytes::get_Java_u2(abase + member_off);
+ member = check_symbol_at(cp, member_index);
+ if (member == NULL) break; // invalid member name
+ }
+
+ // Here is where parsing particular annotations will take place.
+ AnnotationCollector::ID id = coll->annotation_index(aname);
+ if (id == AnnotationCollector::_unknown) continue;
+ coll->set_annotation(id);
+ // If there are no values, just set the bit and move on:
+ if (count == 0) continue;
+
+ // For the record, here is how annotation payloads can be collected.
+ // Suppose we want to capture @Retention.value. Here is how:
+ //if (id == AnnotationCollector::_class_Retention) {
+ // Symbol* payload = NULL;
+ // if (count == 1
+ // && e_size == (index0 - index) // match size
+ // && e_tag_val == *(abase + tag_off)
+ // && (check_symbol_at(cp, Bytes::get_Java_u2(abase + e_type_off))
+ // == vmSymbols::RetentionPolicy_signature())
+ // && member == vmSymbols::value_name()) {
+ // payload = check_symbol_at(cp, Bytes::get_Java_u2(abase + e_con_off));
+ // }
+ // check_property(payload != NULL,
+ // "Invalid @Retention annotation at offset %u in class file %s",
+ // index0, CHECK);
+ // if (payload != NULL) {
+ // payload->increment_refcount();
+ // coll->_class_RetentionPolicy = payload;
+ // }
+ //}
+ }
+}
+
+ClassFileParser::AnnotationCollector::ID ClassFileParser::AnnotationCollector::annotation_index(Symbol* name) {
+ vmSymbols::SID sid = vmSymbols::find_sid(name);
+ switch (sid) {
+ case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
+ if (_location != _in_method) break; // only allow for methods
+ return _method_ForceInline;
+ default: break;
+ }
+ return AnnotationCollector::_unknown;
+}
+
+void ClassFileParser::FieldAnnotationCollector::apply_to(FieldInfo* f) {
+ fatal("no field annotations yet");
+}
+
+void ClassFileParser::MethodAnnotationCollector::apply_to(methodHandle m) {
+ if (has_annotation(_method_ForceInline))
+ m->set_force_inline(true);
+}
+
+void ClassFileParser::ClassAnnotationCollector::apply_to(instanceKlassHandle k) {
+ fatal("no class annotations yet");
+}
+
+
#define MAX_ARGS_SIZE 255
#define MAX_CODE_SIZE 65535
#define INITIAL_MAX_LVT_NUMBER 256
// Note: the parse_method below is big and clunky because all parsing of the code and exceptions
-// attribute is inlined. This is curbersome to avoid since we inline most of the parts in the
+// attribute is inlined. This is cumbersome to avoid since we inline most of the parts in the
// methodOop to save footprint, so we only know the size of the resulting methodOop when the
// entire method attribute is parsed.
//
@@ -1712,6 +1866,7 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
u4 code_length = 0;
u1* code_start = 0;
u2 exception_table_length = 0;
+ u2* exception_table_start = NULL;
typeArrayHandle exception_handlers(THREAD, Universe::the_empty_int_array());
u2 checked_exceptions_length = 0;
u2* checked_exceptions_start = NULL;
@@ -1733,6 +1888,7 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
// stackmap attribute - JDK1.5
typeArrayHandle stackmap_data;
u2 generic_signature_index = 0;
+ MethodAnnotationCollector parsed_annotations;
u1* runtime_visible_annotations = NULL;
int runtime_visible_annotations_length = 0;
u1* runtime_invisible_annotations = NULL;
@@ -1798,7 +1954,7 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
cfs->guarantee_more(2, CHECK_(nullHandle)); // exception_table_length
exception_table_length = cfs->get_u2_fast();
if (exception_table_length > 0) {
- exception_handlers =
+ exception_table_start =
parse_exception_table(code_length, exception_table_length, cp, CHECK_(nullHandle));
}
@@ -1959,6 +2115,7 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
runtime_visible_annotations_length = method_attribute_length;
runtime_visible_annotations = cfs->get_u1_buffer();
assert(runtime_visible_annotations != NULL, "null visible annotations");
+ parse_annotations(runtime_visible_annotations, runtime_visible_annotations_length, cp, &parsed_annotations, CHECK_(nullHandle));
cfs->skip_u1(runtime_visible_annotations_length, CHECK_(nullHandle));
} else if (PreserveAllAnnotations && method_attribute_name == vmSymbols::tag_runtime_invisible_annotations()) {
runtime_invisible_annotations_length = method_attribute_length;
@@ -2002,9 +2159,13 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
}
// All sizing information for a methodOop is finally available, now create it
- methodOop m_oop = oopFactory::new_method(code_length, access_flags, linenumber_table_length,
- total_lvt_length, checked_exceptions_length,
- oopDesc::IsSafeConc, CHECK_(nullHandle));
+ methodOop m_oop = oopFactory::new_method(code_length, access_flags,
+ linenumber_table_length,
+ total_lvt_length,
+ exception_table_length,
+ checked_exceptions_length,
+ oopDesc::IsSafeConc,
+ CHECK_(nullHandle));
methodHandle m (THREAD, m_oop);
ClassLoadingService::add_class_method_size(m_oop->size()*HeapWordSize);
@@ -2035,16 +2196,15 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
// Fill in code attribute information
m->set_max_stack(max_stack);
m->set_max_locals(max_locals);
- m->constMethod()->set_stackmap_data(stackmap_data());
/**
- * The exception_table field is the flag used to indicate
+ * The stackmap_data field is the flag used to indicate
* that the methodOop and it's associated constMethodOop are partially
* initialized and thus are exempt from pre/post GC verification. Once
* the field is set, the oops are considered fully initialized so make
* sure that the oops can pass verification when this field is set.
*/
- m->set_exception_table(exception_handlers());
+ m->constMethod()->set_stackmap_data(stackmap_data());
// Copy byte codes
m->set_code(code_start);
@@ -2055,6 +2215,14 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
linenumber_table->buffer(), linenumber_table_length);
}
+ // Copy exception table
+ if (exception_table_length > 0) {
+ int size =
+ exception_table_length * sizeof(ExceptionTableElement) / sizeof(u2);
+ copy_u2_with_conversion((u2*) m->exception_table_start(),
+ exception_table_start, size);
+ }
+
// Copy checked exceptions
if (checked_exceptions_length > 0) {
int size = checked_exceptions_length * sizeof(CheckedExceptionElement) / sizeof(u2);
@@ -2136,6 +2304,8 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf
clear_hashtable(lvt_Hash);
}
+ if (parsed_annotations.has_any_annotations())
+ parsed_annotations.apply_to(m);
*method_annotations = assemble_annotations(runtime_visible_annotations,
runtime_visible_annotations_length,
runtime_invisible_annotations,
@@ -2314,7 +2484,7 @@ typeArrayHandle ClassFileParser::sort_methods(objArrayHandle methods,
}
-void ClassFileParser::parse_classfile_sourcefile_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS) {
+void ClassFileParser::parse_classfile_sourcefile_attribute(constantPoolHandle cp, TRAPS) {
ClassFileStream* cfs = stream();
cfs->guarantee_more(2, CHECK); // sourcefile_index
u2 sourcefile_index = cfs->get_u2_fast();
@@ -2323,13 +2493,12 @@ void ClassFileParser::parse_classfile_sourcefile_attribute(constantPoolHandle cp
cp->tag_at(sourcefile_index).is_utf8(),
"Invalid SourceFile attribute at constant pool index %u in class file %s",
sourcefile_index, CHECK);
- k->set_source_file_name(cp->symbol_at(sourcefile_index));
+ set_class_sourcefile(cp->symbol_at(sourcefile_index));
}
void ClassFileParser::parse_classfile_source_debug_extension_attribute(constantPoolHandle cp,
- instanceKlassHandle k,
int length, TRAPS) {
ClassFileStream* cfs = stream();
u1* sde_buffer = cfs->get_u1_buffer();
@@ -2337,12 +2506,13 @@ void ClassFileParser::parse_classfile_source_debug_extension_attribute(constantP
// Don't bother storing it if there is no way to retrieve it
if (JvmtiExport::can_get_source_debug_extension()) {
- // Optimistically assume that only 1 byte UTF format is used
- // (common case)
- TempNewSymbol sde_symbol = SymbolTable::new_symbol((const char*)sde_buffer, length, CHECK);
- k->set_source_debug_extension(sde_symbol);
- // Note that set_source_debug_extension() increments the reference count
- // for its copy of the Symbol*, so use a TempNewSymbol here.
+ assert((length+1) > length, "Overflow checking");
+ u1* sde = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, u1, length+1);
+ for (int i = 0; i < length; i++) {
+ sde[i] = sde_buffer[i];
+ }
+ sde[length] = '\0';
+ set_class_sde_buffer((char*)sde, length);
}
// Got utf8 string, set stream position forward
cfs->skip_u1(length, CHECK);
@@ -2358,7 +2528,7 @@ u2 ClassFileParser::parse_classfile_inner_classes_attribute(u1* inner_classes_at
u2 enclosing_method_class_index,
u2 enclosing_method_method_index,
constantPoolHandle cp,
- instanceKlassHandle k, TRAPS) {
+ TRAPS) {
ClassFileStream* cfs = stream();
u1* current_mark = cfs->current();
u2 length = 0;
@@ -2449,7 +2619,7 @@ u2 ClassFileParser::parse_classfile_inner_classes_attribute(u1* inner_classes_at
assert(index == size, "wrong size");
// Update instanceKlass with inner class info.
- k->set_inner_classes(inner_classes());
+ set_class_inner_classes(inner_classes);
// Restore buffer's current position.
cfs->set_current(current_mark);
@@ -2457,11 +2627,11 @@ u2 ClassFileParser::parse_classfile_inner_classes_attribute(u1* inner_classes_at
return length;
}
-void ClassFileParser::parse_classfile_synthetic_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS) {
- k->set_is_synthetic();
+void ClassFileParser::parse_classfile_synthetic_attribute(constantPoolHandle cp, TRAPS) {
+ set_class_synthetic_flag(true);
}
-void ClassFileParser::parse_classfile_signature_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS) {
+void ClassFileParser::parse_classfile_signature_attribute(constantPoolHandle cp, TRAPS) {
ClassFileStream* cfs = stream();
u2 signature_index = cfs->get_u2(CHECK);
check_property(
@@ -2469,10 +2639,10 @@ void ClassFileParser::parse_classfile_signature_attribute(constantPoolHandle cp,
cp->tag_at(signature_index).is_utf8(),
"Invalid constant pool index %u in Signature attribute in class file %s",
signature_index, CHECK);
- k->set_generic_signature(cp->symbol_at(signature_index));
+ set_class_generic_signature(cp->symbol_at(signature_index));
}
-void ClassFileParser::parse_classfile_bootstrap_methods_attribute(constantPoolHandle cp, instanceKlassHandle k,
+void ClassFileParser::parse_classfile_bootstrap_methods_attribute(constantPoolHandle cp,
u4 attribute_byte_length, TRAPS) {
ClassFileStream* cfs = stream();
u1* current_start = cfs->current();
@@ -2544,10 +2714,12 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(constantPoolHa
}
-void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp, instanceKlassHandle k, TRAPS) {
+void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp,
+ ClassFileParser::ClassAnnotationCollector* parsed_annotations,
+ TRAPS) {
ClassFileStream* cfs = stream();
// Set inner classes attribute to default sentinel
- k->set_inner_classes(Universe::the_empty_short_array());
+ set_class_inner_classes(typeArrayHandle(THREAD, Universe::the_empty_short_array()));
cfs->guarantee_more(2, CHECK); // attributes_count
u2 attributes_count = cfs->get_u2_fast();
bool parsed_sourcefile_attribute = false;
@@ -2583,10 +2755,10 @@ void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp, instance
} else {
parsed_sourcefile_attribute = true;
}
- parse_classfile_sourcefile_attribute(cp, k, CHECK);
+ parse_classfile_sourcefile_attribute(cp, CHECK);
} else if (tag == vmSymbols::tag_source_debug_extension()) {
// Check for SourceDebugExtension tag
- parse_classfile_source_debug_extension_attribute(cp, k, (int)attribute_length, CHECK);
+ parse_classfile_source_debug_extension_attribute(cp, (int)attribute_length, CHECK);
} else if (tag == vmSymbols::tag_inner_classes()) {
// Check for InnerClasses tag
if (parsed_innerclasses_attribute) {
@@ -2605,7 +2777,7 @@ void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp, instance
"Invalid Synthetic classfile attribute length %u in class file %s",
attribute_length, CHECK);
}
- parse_classfile_synthetic_attribute(cp, k, CHECK);
+ parse_classfile_synthetic_attribute(cp, CHECK);
} else if (tag == vmSymbols::tag_deprecated()) {
// Check for Deprecatd tag - 4276120
if (attribute_length != 0) {
@@ -2620,11 +2792,16 @@ void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp, instance
"Wrong Signature attribute length %u in class file %s",
attribute_length, CHECK);
}
- parse_classfile_signature_attribute(cp, k, CHECK);
+ parse_classfile_signature_attribute(cp, CHECK);
} else if (tag == vmSymbols::tag_runtime_visible_annotations()) {
runtime_visible_annotations_length = attribute_length;
runtime_visible_annotations = cfs->get_u1_buffer();
assert(runtime_visible_annotations != NULL, "null visible annotations");
+ parse_annotations(runtime_visible_annotations,
+ runtime_visible_annotations_length,
+ cp,
+ parsed_annotations,
+ CHECK);
cfs->skip_u1(runtime_visible_annotations_length, CHECK);
} else if (PreserveAllAnnotations && tag == vmSymbols::tag_runtime_invisible_annotations()) {
runtime_invisible_annotations_length = attribute_length;
@@ -2658,7 +2835,7 @@ void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp, instance
if (parsed_bootstrap_methods_attribute)
classfile_parse_error("Multiple BootstrapMethods attributes in class file %s", CHECK);
parsed_bootstrap_methods_attribute = true;
- parse_classfile_bootstrap_methods_attribute(cp, k, attribute_length, CHECK);
+ parse_classfile_bootstrap_methods_attribute(cp, attribute_length, CHECK);
} else {
// Unknown attribute
cfs->skip_u1(attribute_length, CHECK);
@@ -2673,7 +2850,7 @@ void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp, instance
runtime_invisible_annotations,
runtime_invisible_annotations_length,
CHECK);
- k->set_class_annotations(annotations());
+ set_class_annotations(annotations);
if (parsed_innerclasses_attribute || parsed_enclosingmethod_attribute) {
u2 num_of_classes = parse_classfile_inner_classes_attribute(
@@ -2681,7 +2858,7 @@ void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp, instance
parsed_innerclasses_attribute,
enclosing_method_class_index,
enclosing_method_method_index,
- cp, k, CHECK);
+ cp, CHECK);
if (parsed_innerclasses_attribute &&_need_verify && _major_version >= JAVA_1_5_VERSION) {
guarantee_property(
inner_classes_attribute_length == sizeof(num_of_classes) + 4 * sizeof(u2) * num_of_classes,
@@ -2695,6 +2872,23 @@ void ClassFileParser::parse_classfile_attributes(constantPoolHandle cp, instance
}
}
+void ClassFileParser::apply_parsed_class_attributes(instanceKlassHandle k) {
+ if (_synthetic_flag)
+ k->set_is_synthetic();
+ if (_sourcefile != NULL) {
+ _sourcefile->increment_refcount();
+ k->set_source_file_name(_sourcefile);
+ }
+ if (_generic_signature != NULL) {
+ _generic_signature->increment_refcount();
+ k->set_generic_signature(_generic_signature);
+ }
+ if (_sde_buffer != NULL) {
+ k->set_source_debug_extension(_sde_buffer, _sde_length);
+ }
+ k->set_inner_classes(_inner_classes());
+ k->set_class_annotations(_annotations());
+}
typeArrayHandle ClassFileParser::assemble_annotations(u1* runtime_visible_annotations,
int runtime_visible_annotations_length,
@@ -2745,8 +2939,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
jt->get_thread_stat()->perf_timers_addr(),
PerfClassTraceTime::PARSE_CLASS);
- _has_finalizer = _has_empty_finalizer = _has_vanilla_constructor = false;
- _max_bootstrap_specifier_index = -1;
+ init_parsed_class_attributes();
if (JvmtiExport::should_post_class_file_load_hook()) {
// Get the cached class file bytes (if any) from the class that
@@ -2979,6 +3172,13 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
objArrayHandle methods_parameter_annotations(THREAD, methods_parameter_annotations_oop);
objArrayHandle methods_default_annotations(THREAD, methods_default_annotations_oop);
+ // Additional attributes
+ ClassAnnotationCollector parsed_annotations;
+ parse_classfile_attributes(cp, &parsed_annotations, CHECK_(nullHandle));
+
+ // Make sure this is the end of class file stream
+ guarantee_property(cfs->at_eos(), "Extra bytes at the end of class file %s", CHECK_(nullHandle));
+
// We check super class after class file is parsed and format is checked
if (super_class_index > 0 && super_klass.is_null()) {
Symbol* sk = cp->klass_name_at(super_class_index);
@@ -3467,11 +3667,10 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
this_klass->set_has_miranda_methods(); // then set a flag
}
- // Additional attributes
- parse_classfile_attributes(cp, this_klass, CHECK_(nullHandle));
-
- // Make sure this is the end of class file stream
- guarantee_property(cfs->at_eos(), "Extra bytes at the end of class file %s", CHECK_(nullHandle));
+ // Fill in field values obtained by parse_classfile_attributes
+ if (parsed_annotations.has_any_annotations())
+ parsed_annotations.apply_to(this_klass);
+ apply_parsed_class_attributes(this_klass);
// VerifyOops believes that once this has been set, the object is completely loaded.
// Compute transitive closure of interfaces this class implements
@@ -3486,6 +3685,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
// Do final class setup
fill_oop_maps(this_klass, nonstatic_oop_map_count, nonstatic_oop_offsets, nonstatic_oop_counts);
+ // Fill in has_finalizer, has_vanilla_constructor, and layout_helper
set_precomputed_flags(this_klass);
// reinitialize modifiers, using the InnerClasses attribute
diff --git a/hotspot/src/share/vm/classfile/classFileParser.hpp b/hotspot/src/share/vm/classfile/classFileParser.hpp
index de781b2fb1f..f8359f19233 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.hpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.hpp
@@ -31,8 +31,8 @@
#include "oops/typeArrayOop.hpp"
#include "runtime/handles.inline.hpp"
#include "utilities/accessFlags.hpp"
+#include "classfile/symbolTable.hpp"
-class TempNewSymbol;
class FieldAllocationCount;
@@ -50,11 +50,80 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
KlassHandle _host_klass;
GrowableArray* _cp_patches; // overrides for CP entries
+ // precomputed flags
bool _has_finalizer;
bool _has_empty_finalizer;
bool _has_vanilla_constructor;
+ int _max_bootstrap_specifier_index; // detects BSS values
- int _max_bootstrap_specifier_index;
+ // class attributes parsed before the instance klass is created:
+ bool _synthetic_flag;
+ Symbol* _sourcefile;
+ Symbol* _generic_signature;
+ char* _sde_buffer;
+ int _sde_length;
+ typeArrayHandle _inner_classes;
+ typeArrayHandle _annotations;
+
+ void set_class_synthetic_flag(bool x) { _synthetic_flag = x; }
+ void set_class_sourcefile(Symbol* x) { _sourcefile = x; }
+ void set_class_generic_signature(Symbol* x) { _generic_signature = x; }
+ void set_class_sde_buffer(char* x, int len) { _sde_buffer = x; _sde_length = len; }
+ void set_class_inner_classes(typeArrayHandle x) { _inner_classes = x; }
+ void set_class_annotations(typeArrayHandle x) { _annotations = x; }
+ void init_parsed_class_attributes() {
+ _synthetic_flag = false;
+ _sourcefile = NULL;
+ _generic_signature = NULL;
+ _sde_buffer = NULL;
+ _sde_length = 0;
+ // initialize the other flags too:
+ _has_finalizer = _has_empty_finalizer = _has_vanilla_constructor = false;
+ _max_bootstrap_specifier_index = -1;
+ }
+ void apply_parsed_class_attributes(instanceKlassHandle k); // update k
+
+ class AnnotationCollector {
+ public:
+ enum Location { _in_field, _in_method, _in_class };
+ enum ID {
+ _unknown = 0,
+ _method_ForceInline,
+ _annotation_LIMIT
+ };
+ const Location _location;
+ int _annotations_present;
+ AnnotationCollector(Location location)
+ : _location(location), _annotations_present(0)
+ {
+ assert((int)_annotation_LIMIT <= (int)sizeof(_annotations_present) * BitsPerByte, "");
+ }
+ // If this annotation name has an ID, report it (or _none).
+ ID annotation_index(Symbol* name);
+ // Set the annotation name:
+ void set_annotation(ID id) {
+ assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
+ _annotations_present |= nth_bit((int)id);
+ }
+ // Report if the annotation is present.
+ bool has_any_annotations() { return _annotations_present != 0; }
+ bool has_annotation(ID id) { return (nth_bit((int)id) & _annotations_present) != 0; }
+ };
+ class FieldAnnotationCollector: public AnnotationCollector {
+ public:
+ FieldAnnotationCollector() : AnnotationCollector(_in_field) { }
+ void apply_to(FieldInfo* f);
+ };
+ class MethodAnnotationCollector: public AnnotationCollector {
+ public:
+ MethodAnnotationCollector() : AnnotationCollector(_in_method) { }
+ void apply_to(methodHandle m);
+ };
+ class ClassAnnotationCollector: public AnnotationCollector {
+ public:
+ ClassAnnotationCollector() : AnnotationCollector(_in_class) { }
+ void apply_to(instanceKlassHandle k);
+ };
enum { fixed_buffer_size = 128 };
u_char linenumbertable_buffer[fixed_buffer_size];
@@ -87,7 +156,9 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
u2* constantvalue_index_addr,
bool* is_synthetic_addr,
u2* generic_signature_index_addr,
- typeArrayHandle* field_annotations, TRAPS);
+ typeArrayHandle* field_annotations,
+ FieldAnnotationCollector* parsed_annotations,
+ TRAPS);
typeArrayHandle parse_fields(Symbol* class_name,
constantPoolHandle cp, bool is_interface,
FieldAllocationCount *fac,
@@ -113,8 +184,8 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
objArrayHandle methods_parameter_annotations,
objArrayHandle methods_default_annotations,
TRAPS);
- typeArrayHandle parse_exception_table(u4 code_length, u4 exception_table_length,
- constantPoolHandle cp, TRAPS);
+ u2* parse_exception_table(u4 code_length, u4 exception_table_length,
+ constantPoolHandle cp, TRAPS);
void parse_linenumber_table(
u4 code_attribute_length, u4 code_length,
CompressedLineNumberWriteStream** write_stream, TRAPS);
@@ -128,25 +199,32 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
typeArrayOop parse_stackmap_table(u4 code_attribute_length, TRAPS);
// Classfile attribute parsing
- void parse_classfile_sourcefile_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS);
- void parse_classfile_source_debug_extension_attribute(constantPoolHandle cp,
- instanceKlassHandle k, int length, TRAPS);
+ void parse_classfile_sourcefile_attribute(constantPoolHandle cp, TRAPS);
+ void parse_classfile_source_debug_extension_attribute(constantPoolHandle cp, int length, TRAPS);
u2 parse_classfile_inner_classes_attribute(u1* inner_classes_attribute_start,
bool parsed_enclosingmethod_attribute,
u2 enclosing_method_class_index,
u2 enclosing_method_method_index,
constantPoolHandle cp,
- instanceKlassHandle k, TRAPS);
- void parse_classfile_attributes(constantPoolHandle cp, instanceKlassHandle k, TRAPS);
- void parse_classfile_synthetic_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS);
- void parse_classfile_signature_attribute(constantPoolHandle cp, instanceKlassHandle k, TRAPS);
- void parse_classfile_bootstrap_methods_attribute(constantPoolHandle cp, instanceKlassHandle k, u4 attribute_length, TRAPS);
+ TRAPS);
+ void parse_classfile_attributes(constantPoolHandle cp,
+ ClassAnnotationCollector* parsed_annotations,
+ TRAPS);
+ void parse_classfile_synthetic_attribute(constantPoolHandle cp, TRAPS);
+ void parse_classfile_signature_attribute(constantPoolHandle cp, TRAPS);
+ void parse_classfile_bootstrap_methods_attribute(constantPoolHandle cp, u4 attribute_length, TRAPS);
// Annotations handling
typeArrayHandle assemble_annotations(u1* runtime_visible_annotations,
int runtime_visible_annotations_length,
u1* runtime_invisible_annotations,
int runtime_invisible_annotations_length, TRAPS);
+ int skip_annotation(u1* buffer, int limit, int index);
+ int skip_annotation_value(u1* buffer, int limit, int index);
+ void parse_annotations(u1* buffer, int limit, constantPoolHandle cp,
+ /* Results (currently, only one result is supported): */
+ AnnotationCollector* result,
+ TRAPS);
// Final setup
unsigned int compute_oop_map_count(instanceKlassHandle super,
diff --git a/hotspot/src/share/vm/classfile/classLoader.cpp b/hotspot/src/share/vm/classfile/classLoader.cpp
index df42dc75d42..a2e61a4ad3b 100644
--- a/hotspot/src/share/vm/classfile/classLoader.cpp
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp
@@ -153,7 +153,7 @@ MetaIndex::MetaIndex(char** meta_package_names, int num_meta_package_names) {
_meta_package_names = NULL;
_num_meta_package_names = 0;
} else {
- _meta_package_names = NEW_C_HEAP_ARRAY(char*, num_meta_package_names);
+ _meta_package_names = NEW_C_HEAP_ARRAY(char*, num_meta_package_names, mtClass);
_num_meta_package_names = num_meta_package_names;
memcpy(_meta_package_names, meta_package_names, num_meta_package_names * sizeof(char*));
}
@@ -161,7 +161,7 @@ MetaIndex::MetaIndex(char** meta_package_names, int num_meta_package_names) {
MetaIndex::~MetaIndex() {
- FREE_C_HEAP_ARRAY(char*, _meta_package_names);
+ FREE_C_HEAP_ARRAY(char*, _meta_package_names, mtClass);
}
@@ -192,7 +192,7 @@ bool ClassPathEntry::is_lazy() {
}
ClassPathDirEntry::ClassPathDirEntry(char* dir) : ClassPathEntry() {
- _dir = NEW_C_HEAP_ARRAY(char, strlen(dir)+1);
+ _dir = NEW_C_HEAP_ARRAY(char, strlen(dir)+1, mtClass);
strcpy(_dir, dir);
}
@@ -229,7 +229,7 @@ ClassFileStream* ClassPathDirEntry::open_stream(const char* name) {
ClassPathZipEntry::ClassPathZipEntry(jzfile* zip, const char* zip_name) : ClassPathEntry() {
_zip = zip;
- _zip_name = NEW_C_HEAP_ARRAY(char, strlen(zip_name)+1);
+ _zip_name = NEW_C_HEAP_ARRAY(char, strlen(zip_name)+1, mtClass);
strcpy(_zip_name, zip_name);
}
@@ -237,7 +237,7 @@ ClassPathZipEntry::~ClassPathZipEntry() {
if (ZipClose != NULL) {
(*ZipClose)(_zip);
}
- FREE_C_HEAP_ARRAY(char, _zip_name);
+ FREE_C_HEAP_ARRAY(char, _zip_name, mtClass);
}
ClassFileStream* ClassPathZipEntry::open_stream(const char* name) {
@@ -454,11 +454,11 @@ void ClassLoader::setup_bootstrap_search_path() {
while (sys_class_path[end] && sys_class_path[end] != os::path_separator()[0]) {
end++;
}
- char* path = NEW_C_HEAP_ARRAY(char, end-start+1);
+ char* path = NEW_C_HEAP_ARRAY(char, end-start+1, mtClass);
strncpy(path, &sys_class_path[start], end-start);
path[end-start] = '\0';
update_class_path_entry_list(path, false);
- FREE_C_HEAP_ARRAY(char, path);
+ FREE_C_HEAP_ARRAY(char, path, mtClass);
while (sys_class_path[end] == os::path_separator()[0]) {
end++;
}
@@ -652,13 +652,13 @@ void ClassLoader::load_zip_library() {
// in the classpath must be the same files, in the same order, even
// though the exact name is not the same.
-class PackageInfo: public BasicHashtableEntry {
+class PackageInfo: public BasicHashtableEntry {
public:
const char* _pkgname; // Package name
int _classpath_index; // Index of directory or JAR file loaded from
PackageInfo* next() {
- return (PackageInfo*)BasicHashtableEntry::next();
+ return (PackageInfo*)BasicHashtableEntry::next();
}
const char* pkgname() { return _pkgname; }
@@ -674,7 +674,7 @@ public:
};
-class PackageHashtable : public BasicHashtable {
+class PackageHashtable : public BasicHashtable {
private:
inline unsigned int compute_hash(const char *s, int n) {
unsigned int val = 0;
@@ -685,7 +685,7 @@ private:
}
PackageInfo* bucket(int index) {
- return (PackageInfo*)BasicHashtable::bucket(index);
+ return (PackageInfo*)BasicHashtable::bucket(index);
}
PackageInfo* get_entry(int index, unsigned int hash,
@@ -702,10 +702,10 @@ private:
public:
PackageHashtable(int table_size)
- : BasicHashtable(table_size, sizeof(PackageInfo)) {}
+ : BasicHashtable(table_size, sizeof(PackageInfo)) {}
- PackageHashtable(int table_size, HashtableBucket* t, int number_of_entries)
- : BasicHashtable(table_size, sizeof(PackageInfo), t, number_of_entries) {}
+ PackageHashtable(int table_size, HashtableBucket* t, int number_of_entries)
+ : BasicHashtable(table_size, sizeof(PackageInfo), t, number_of_entries) {}
PackageInfo* get_entry(const char* pkgname, int n) {
unsigned int hash = compute_hash(pkgname, n);
@@ -715,14 +715,14 @@ public:
PackageInfo* new_entry(char* pkgname, int n) {
unsigned int hash = compute_hash(pkgname, n);
PackageInfo* pp;
- pp = (PackageInfo*)BasicHashtable::new_entry(hash);
+ pp = (PackageInfo*)BasicHashtable::new_entry(hash);
pp->set_pkgname(pkgname);
return pp;
}
void add_entry(PackageInfo* pp) {
int index = hash_to_index(pp->hash());
- BasicHashtable::add_entry(index, pp);
+ BasicHashtable::add_entry(index, pp);
}
void copy_pkgnames(const char** packages) {
@@ -742,7 +742,7 @@ public:
void PackageHashtable::copy_table(char** top, char* end,
PackageHashtable* table) {
// Copy (relocate) the table to the shared space.
- BasicHashtable::copy_table(top, end);
+ BasicHashtable::copy_table(top, end);
// Calculate the space needed for the package name strings.
int i;
@@ -815,7 +815,7 @@ bool ClassLoader::add_package(const char *pkgname, int classpath_index, TRAPS) {
// Package prefix found
int n = cp - pkgname + 1;
- char* new_pkgname = NEW_C_HEAP_ARRAY(char, n + 1);
+ char* new_pkgname = NEW_C_HEAP_ARRAY(char, n + 1, mtClass);
if (new_pkgname == NULL) {
return false;
}
@@ -929,10 +929,10 @@ instanceKlassHandle ClassLoader::load_classfile(Symbol* h_name, TRAPS) {
}
-void ClassLoader::create_package_info_table(HashtableBucket *t, int length,
+void ClassLoader::create_package_info_table(HashtableBucket *t, int length,
int number_of_entries) {
assert(_package_hash_table == NULL, "One package info table allowed.");
- assert(length == package_hash_table_size * sizeof(HashtableBucket),
+ assert(length == package_hash_table_size * sizeof(HashtableBucket),
"bad shared package info size.");
_package_hash_table = new PackageHashtable(package_hash_table_size, t,
number_of_entries);
diff --git a/hotspot/src/share/vm/classfile/classLoader.hpp b/hotspot/src/share/vm/classfile/classLoader.hpp
index 6f816837ae7..ee58550b61e 100644
--- a/hotspot/src/share/vm/classfile/classLoader.hpp
+++ b/hotspot/src/share/vm/classfile/classLoader.hpp
@@ -33,7 +33,7 @@
// Meta-index (optional, to be able to skip opening boot classpath jar files)
-class MetaIndex: public CHeapObj {
+class MetaIndex: public CHeapObj {
private:
char** _meta_package_names;
int _num_meta_package_names;
@@ -46,7 +46,7 @@ class MetaIndex: public CHeapObj {
// Class path entry (directory or zip file)
-class ClassPathEntry: public CHeapObj {
+class ClassPathEntry: public CHeapObj {
private:
ClassPathEntry* _next;
public:
@@ -141,7 +141,7 @@ class LazyClassPathEntry: public ClassPathEntry {
class PackageHashtable;
class PackageInfo;
-class HashtableBucket;
+template class HashtableBucket;
class ClassLoader: AllStatic {
public:
@@ -299,7 +299,7 @@ class ClassLoader: AllStatic {
// Initialization
static void initialize();
static void create_package_info_table();
- static void create_package_info_table(HashtableBucket *t, int length,
+ static void create_package_info_table(HashtableBucket *t, int length,
int number_of_entries);
static int compute_Object_vtable();
diff --git a/hotspot/src/share/vm/classfile/dictionary.cpp b/hotspot/src/share/vm/classfile/dictionary.cpp
index 4458f46d7a9..78e76cc1f67 100644
--- a/hotspot/src/share/vm/classfile/dictionary.cpp
+++ b/hotspot/src/share/vm/classfile/dictionary.cpp
@@ -36,16 +36,16 @@ int Dictionary::_current_class_index = 0;
Dictionary::Dictionary(int table_size)
- : TwoOopHashtable(table_size, sizeof(DictionaryEntry)) {
+ : TwoOopHashtable(table_size, sizeof(DictionaryEntry)) {
_current_class_index = 0;
_current_class_entry = NULL;
};
-Dictionary::Dictionary(int table_size, HashtableBucket* t,
+Dictionary::Dictionary(int table_size, HashtableBucket* t,
int number_of_entries)
- : TwoOopHashtable(table_size, sizeof(DictionaryEntry), t, number_of_entries) {
+ : TwoOopHashtable(table_size, sizeof(DictionaryEntry), t, number_of_entries) {
_current_class_index = 0;
_current_class_entry = NULL;
};
@@ -54,7 +54,7 @@ Dictionary::Dictionary(int table_size, HashtableBucket* t,
DictionaryEntry* Dictionary::new_entry(unsigned int hash, klassOop klass,
oop loader) {
DictionaryEntry* entry;
- entry = (DictionaryEntry*)Hashtable::new_entry(hash, klass);
+ entry = (DictionaryEntry*)Hashtable::new_entry(hash, klass);
entry->set_loader(loader);
entry->set_pd_set(NULL);
return entry;
@@ -62,7 +62,7 @@ DictionaryEntry* Dictionary::new_entry(unsigned int hash, klassOop klass,
DictionaryEntry* Dictionary::new_entry() {
- DictionaryEntry* entry = (DictionaryEntry*)Hashtable::new_entry(0L, NULL);
+ DictionaryEntry* entry = (DictionaryEntry*)Hashtable::new_entry(0L, NULL);
entry->set_loader(NULL);
entry->set_pd_set(NULL);
return entry;
@@ -76,7 +76,7 @@ void Dictionary::free_entry(DictionaryEntry* entry) {
entry->set_pd_set(to_delete->next());
delete to_delete;
}
- Hashtable::free_entry(entry);
+ Hashtable::free_entry(entry);
}
@@ -554,12 +554,12 @@ void Dictionary::reorder_dictionary() {
}
SymbolPropertyTable::SymbolPropertyTable(int table_size)
- : Hashtable(table_size, sizeof(SymbolPropertyEntry))
+ : Hashtable(table_size, sizeof(SymbolPropertyEntry))
{
}
-SymbolPropertyTable::SymbolPropertyTable(int table_size, HashtableBucket* t,
+SymbolPropertyTable::SymbolPropertyTable(int table_size, HashtableBucket* t,
int number_of_entries)
- : Hashtable(table_size, sizeof(SymbolPropertyEntry), t, number_of_entries)
+ : Hashtable(table_size, sizeof(SymbolPropertyEntry), t, number_of_entries)
{
}
@@ -584,7 +584,7 @@ SymbolPropertyEntry* SymbolPropertyTable::add_entry(int index, unsigned int hash
assert(find_entry(index, hash, sym, sym_mode) == NULL, "no double entry");
SymbolPropertyEntry* p = new_entry(hash, sym, sym_mode);
- Hashtable::add_entry(index, p);
+ Hashtable::add_entry(index, p);
return p;
}
diff --git a/hotspot/src/share/vm/classfile/dictionary.hpp b/hotspot/src/share/vm/classfile/dictionary.hpp
index 98e01695001..bd33760b721 100644
--- a/hotspot/src/share/vm/classfile/dictionary.hpp
+++ b/hotspot/src/share/vm/classfile/dictionary.hpp
@@ -36,7 +36,7 @@ class DictionaryEntry;
// The data structure for the system dictionary (and the shared system
// dictionary).
-class Dictionary : public TwoOopHashtable {
+class Dictionary : public TwoOopHashtable {
friend class VMStructs;
private:
// current iteration index.
@@ -48,22 +48,22 @@ private:
Symbol* name, Handle loader);
DictionaryEntry* bucket(int i) {
- return (DictionaryEntry*)Hashtable::bucket(i);
+ return (DictionaryEntry*)Hashtable::bucket(i);
}
// The following method is not MT-safe and must be done under lock.
DictionaryEntry** bucket_addr(int i) {
- return (DictionaryEntry**)Hashtable::bucket_addr(i);
+ return (DictionaryEntry**)Hashtable::bucket_addr(i);
}
void add_entry(int index, DictionaryEntry* new_entry) {
- Hashtable::add_entry(index, (HashtableEntry*)new_entry);
+ Hashtable::add_entry(index, (HashtableEntry*)new_entry);
}
public:
Dictionary(int table_size);
- Dictionary(int table_size, HashtableBucket* t, int number_of_entries);
+ Dictionary(int table_size, HashtableBucket* t, int number_of_entries);
DictionaryEntry* new_entry(unsigned int hash, klassOop klass, oop loader);
@@ -129,7 +129,7 @@ public:
// The following classes can be in dictionary.cpp, but we need these
// to be in header file so that SA's vmStructs can access.
-class ProtectionDomainEntry :public CHeapObj {
+class ProtectionDomainEntry :public CHeapObj {
friend class VMStructs;
public:
ProtectionDomainEntry* _next;
@@ -147,7 +147,7 @@ class ProtectionDomainEntry :public CHeapObj {
// An entry in the system dictionary, this describes a class as
// { klassOop, loader, protection_domain }.
-class DictionaryEntry : public HashtableEntry {
+class DictionaryEntry : public HashtableEntry {
friend class VMStructs;
private:
// Contains the set of approved protection domains that can access
@@ -166,11 +166,11 @@ class DictionaryEntry : public HashtableEntry {
klassOop* klass_addr() { return (klassOop*)literal_addr(); }
DictionaryEntry* next() const {
- return (DictionaryEntry*)HashtableEntry::next();
+ return (DictionaryEntry*)HashtableEntry::next();
}
DictionaryEntry** next_addr() {
- return (DictionaryEntry**)HashtableEntry::next_addr();
+ return (DictionaryEntry**)HashtableEntry::next_addr();
}
oop loader() const { return _loader; }
@@ -228,7 +228,7 @@ class DictionaryEntry : public HashtableEntry {
// Entry in a SymbolPropertyTable, mapping a single Symbol*
// to a managed and an unmanaged pointer.
-class SymbolPropertyEntry : public HashtableEntry {
+class SymbolPropertyEntry : public HashtableEntry {
friend class VMStructs;
private:
intptr_t _symbol_mode; // secondary key
@@ -248,11 +248,11 @@ class SymbolPropertyEntry : public HashtableEntry {
void set_property_data(address p) { _property_data = p; }
SymbolPropertyEntry* next() const {
- return (SymbolPropertyEntry*)HashtableEntry::next();
+ return (SymbolPropertyEntry*)HashtableEntry::next();
}
SymbolPropertyEntry** next_addr() {
- return (SymbolPropertyEntry**)HashtableEntry::next_addr();
+ return (SymbolPropertyEntry**)HashtableEntry::next_addr();
}
oop* property_oop_addr() { return &_property_oop; }
@@ -278,16 +278,16 @@ class SymbolPropertyEntry : public HashtableEntry {
// A system-internal mapping of symbols to pointers, both managed
// and unmanaged. Used to record the auto-generation of each method
// MethodHandle.invoke(S)T, for all signatures (S)T.
-class SymbolPropertyTable : public Hashtable {
+class SymbolPropertyTable : public Hashtable {
friend class VMStructs;
private:
SymbolPropertyEntry* bucket(int i) {
- return (SymbolPropertyEntry*) Hashtable::bucket(i);
+ return (SymbolPropertyEntry*) Hashtable::bucket(i);
}
// The following method is not MT-safe and must be done under lock.
SymbolPropertyEntry** bucket_addr(int i) {
- return (SymbolPropertyEntry**) Hashtable::bucket_addr(i);
+ return (SymbolPropertyEntry**) Hashtable::bucket_addr(i);
}
void add_entry(int index, SymbolPropertyEntry* new_entry) {
@@ -298,7 +298,7 @@ private:
}
SymbolPropertyEntry* new_entry(unsigned int hash, Symbol* symbol, intptr_t symbol_mode) {
- SymbolPropertyEntry* entry = (SymbolPropertyEntry*) Hashtable::new_entry(hash, symbol);
+ SymbolPropertyEntry* entry = (SymbolPropertyEntry*) Hashtable::new_entry(hash, symbol);
// Hashtable with Symbol* literal must increment and decrement refcount.
symbol->increment_refcount();
entry->set_symbol_mode(symbol_mode);
@@ -309,17 +309,17 @@ private:
public:
SymbolPropertyTable(int table_size);
- SymbolPropertyTable(int table_size, HashtableBucket* t, int number_of_entries);
+ SymbolPropertyTable(int table_size, HashtableBucket* t, int number_of_entries);
void free_entry(SymbolPropertyEntry* entry) {
// decrement Symbol refcount here because hashtable doesn't.
entry->literal()->decrement_refcount();
- Hashtable::free_entry(entry);
+ Hashtable::free_entry(entry);
}
unsigned int compute_hash(Symbol* sym, intptr_t symbol_mode) {
// Use the regular identity_hash.
- return Hashtable::compute_hash(sym) ^ symbol_mode;
+ return Hashtable::compute_hash(sym) ^ symbol_mode;
}
int index_for(Symbol* name, intptr_t symbol_mode) {
diff --git a/hotspot/src/share/vm/classfile/javaAssertions.cpp b/hotspot/src/share/vm/classfile/javaAssertions.cpp
index 7884881dedc..3e6a8ce6041 100644
--- a/hotspot/src/share/vm/classfile/javaAssertions.cpp
+++ b/hotspot/src/share/vm/classfile/javaAssertions.cpp
@@ -58,7 +58,7 @@ void JavaAssertions::addOption(const char* name, bool enable) {
// it is never freed, so will be leaked (along with other option strings -
// e.g., bootclasspath) if a process creates/destroys multiple VMs.
int len = (int)strlen(name);
- char *name_copy = NEW_C_HEAP_ARRAY(char, len + 1);
+ char *name_copy = NEW_C_HEAP_ARRAY(char, len + 1, mtClass);
strcpy(name_copy, name);
// Figure out which list the new item should go on. Names that end in "..."
diff --git a/hotspot/src/share/vm/classfile/javaAssertions.hpp b/hotspot/src/share/vm/classfile/javaAssertions.hpp
index b0fb21a2d07..d06d9010f00 100644
--- a/hotspot/src/share/vm/classfile/javaAssertions.hpp
+++ b/hotspot/src/share/vm/classfile/javaAssertions.hpp
@@ -68,7 +68,7 @@ private:
static OptionList* _packages; // Options for package trees.
};
-class JavaAssertions::OptionList: public CHeapObj {
+class JavaAssertions::OptionList: public CHeapObj {
public:
inline OptionList(const char* name, bool enable, OptionList* next);
diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp
index 74e6566f785..c6971302107 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "classfile/altHashing.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/vmSymbols.hpp"
@@ -347,13 +348,26 @@ jchar* java_lang_String::as_unicode_string(oop java_string, int& length) {
return result;
}
-unsigned int java_lang_String::hash_string(oop java_string) {
+unsigned int java_lang_String::to_hash(oop java_string) {
+ int length = java_lang_String::length(java_string);
+ // Zero length string will hash to zero with String.toHash() function.
+ if (length == 0) return 0;
+
typeArrayOop value = java_lang_String::value(java_string);
int offset = java_lang_String::offset(java_string);
- int length = java_lang_String::length(java_string);
+ return java_lang_String::to_hash(value->char_at_addr(offset), length);
+}
- if (length == 0) return 0;
- return hash_string(value->char_at_addr(offset), length);
+unsigned int java_lang_String::hash_string(oop java_string) {
+ int length = java_lang_String::length(java_string);
+ // Zero length string doesn't hash necessarily hash to zero.
+ if (length == 0) {
+ return StringTable::hash_string(NULL, 0);
+ }
+
+ typeArrayOop value = java_lang_String::value(java_string);
+ int offset = java_lang_String::offset(java_string);
+ return StringTable::hash_string(value->char_at_addr(offset), length);
}
Symbol* java_lang_String::as_symbol(Handle java_string, TRAPS) {
@@ -2724,17 +2738,6 @@ void java_lang_invoke_CallSite::compute_offsets() {
if (k != NULL) {
compute_offset(_target_offset, k, vmSymbols::target_name(), vmSymbols::java_lang_invoke_MethodHandle_signature());
}
-
- // Disallow compilation of CallSite.setTargetNormal and CallSite.setTargetVolatile
- // (For C2: keep this until we have throttling logic for uncommon traps.)
- if (k != NULL) {
- instanceKlass* ik = instanceKlass::cast(k);
- methodOop m_normal = ik->lookup_method(vmSymbols::setTargetNormal_name(), vmSymbols::setTarget_signature());
- methodOop m_volatile = ik->lookup_method(vmSymbols::setTargetVolatile_name(), vmSymbols::setTarget_signature());
- guarantee(m_normal != NULL && m_volatile != NULL, "must exist");
- m_normal->set_not_compilable_quietly();
- m_volatile->set_not_compilable_quietly();
- }
}
diff --git a/hotspot/src/share/vm/classfile/javaClasses.hpp b/hotspot/src/share/vm/classfile/javaClasses.hpp
index 4924d5829d1..1538a78e4ab 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp
@@ -158,20 +158,16 @@ class java_lang_String : AllStatic {
static jchar* as_unicode_string(oop java_string, int& length);
// Compute the hash value for a java.lang.String object which would
- // contain the characters passed in. This hash value is used for at
- // least two purposes.
+ // contain the characters passed in.
//
- // (a) As the hash value used by the StringTable for bucket selection
- // and comparison (stored in the HashtableEntry structures). This
- // is used in the String.intern() method.
+ // As the hash value used by the String object itself, in
+ // String.hashCode(). This value is normally calculated in Java code
+ // in the String.hashCode method(), but is precomputed for String
+ // objects in the shared archive file.
+ // hash P(31) from Kernighan & Ritchie
//
- // (b) As the hash value used by the String object itself, in
- // String.hashCode(). This value is normally calculate in Java code
- // in the String.hashCode method(), but is precomputed for String
- // objects in the shared archive file.
- //
- // For this reason, THIS ALGORITHM MUST MATCH String.hashCode().
- static unsigned int hash_string(jchar* s, int len) {
+ // For this reason, THIS ALGORITHM MUST MATCH String.toHash().
+ template static unsigned int to_hash(T* s, int len) {
unsigned int h = 0;
while (len-- > 0) {
h = 31*h + (unsigned int) *s;
@@ -179,6 +175,10 @@ class java_lang_String : AllStatic {
}
return h;
}
+ static unsigned int to_hash(oop java_string);
+
+ // This is the string hash code used by the StringTable, which may be
+ // the same as String.toHash or an alternate hash code.
static unsigned int hash_string(oop java_string);
static bool equals(oop java_string, jchar* chars, int len);
diff --git a/hotspot/src/share/vm/classfile/loaderConstraints.cpp b/hotspot/src/share/vm/classfile/loaderConstraints.cpp
index 5e25e4cbd02..8650cd98db6 100644
--- a/hotspot/src/share/vm/classfile/loaderConstraints.cpp
+++ b/hotspot/src/share/vm/classfile/loaderConstraints.cpp
@@ -31,7 +31,7 @@
#include "utilities/hashtable.inline.hpp"
LoaderConstraintTable::LoaderConstraintTable(int nof_buckets)
- : Hashtable(nof_buckets, sizeof(LoaderConstraintEntry)) {};
+ : Hashtable(nof_buckets, sizeof(LoaderConstraintEntry)) {};
LoaderConstraintEntry* LoaderConstraintTable::new_entry(
@@ -39,7 +39,7 @@ LoaderConstraintEntry* LoaderConstraintTable::new_entry(
klassOop klass, int num_loaders,
int max_loaders) {
LoaderConstraintEntry* entry;
- entry = (LoaderConstraintEntry*)Hashtable::new_entry(hash, klass);
+ entry = (LoaderConstraintEntry*)Hashtable::new_entry(hash, klass);
entry->set_name(name);
entry->set_num_loaders(num_loaders);
entry->set_max_loaders(max_loaders);
@@ -49,7 +49,7 @@ LoaderConstraintEntry* LoaderConstraintTable::new_entry(
void LoaderConstraintTable::free_entry(LoaderConstraintEntry *entry) {
// decrement name refcount before freeing
entry->name()->decrement_refcount();
- Hashtable::free_entry(entry);
+ Hashtable::free_entry(entry);
}
@@ -164,7 +164,7 @@ void LoaderConstraintTable::purge_loader_constraints(BoolObjectClosure* is_alive
// Purge entry
*p = probe->next();
- FREE_C_HEAP_ARRAY(oop, probe->loaders());
+ FREE_C_HEAP_ARRAY(oop, probe->loaders(), mtClass);
free_entry(probe);
} else {
#ifdef ASSERT
@@ -224,7 +224,7 @@ bool LoaderConstraintTable::add_entry(Symbol* class_name,
int index = hash_to_index(hash);
LoaderConstraintEntry* p;
p = new_entry(hash, class_name, klass, 2, 2);
- p->set_loaders(NEW_C_HEAP_ARRAY(oop, 2));
+ p->set_loaders(NEW_C_HEAP_ARRAY(oop, 2, mtClass));
p->set_loader(0, class_loader1());
p->set_loader(1, class_loader2());
p->set_klass(klass);
@@ -340,10 +340,10 @@ void LoaderConstraintTable::ensure_loader_constraint_capacity(
int nfree) {
if (p->max_loaders() - p->num_loaders() < nfree) {
int n = nfree + p->num_loaders();
- oop* new_loaders = NEW_C_HEAP_ARRAY(oop, n);
+ oop* new_loaders = NEW_C_HEAP_ARRAY(oop, n, mtClass);
memcpy(new_loaders, p->loaders(), sizeof(oop) * p->num_loaders());
p->set_max_loaders(n);
- FREE_C_HEAP_ARRAY(oop, p->loaders());
+ FREE_C_HEAP_ARRAY(oop, p->loaders(), mtClass);
p->set_loaders(new_loaders);
}
}
@@ -425,7 +425,7 @@ void LoaderConstraintTable::merge_loader_constraints(
}
*pp2 = p2->next();
- FREE_C_HEAP_ARRAY(oop, p2->loaders());
+ FREE_C_HEAP_ARRAY(oop, p2->loaders(), mtClass);
free_entry(p2);
return;
}
diff --git a/hotspot/src/share/vm/classfile/loaderConstraints.hpp b/hotspot/src/share/vm/classfile/loaderConstraints.hpp
index 60612f5dba3..d01b2c4d63f 100644
--- a/hotspot/src/share/vm/classfile/loaderConstraints.hpp
+++ b/hotspot/src/share/vm/classfile/loaderConstraints.hpp
@@ -31,7 +31,7 @@
class LoaderConstraintEntry;
-class LoaderConstraintTable : public Hashtable {
+class LoaderConstraintTable : public Hashtable {
friend class VMStructs;
private:
@@ -53,11 +53,11 @@ public:
void free_entry(LoaderConstraintEntry *entry);
LoaderConstraintEntry* bucket(int i) {
- return (LoaderConstraintEntry*)Hashtable::bucket(i);
+ return (LoaderConstraintEntry*)Hashtable::bucket(i);
}
LoaderConstraintEntry** bucket_addr(int i) {
- return (LoaderConstraintEntry**)Hashtable::bucket_addr(i);
+ return (LoaderConstraintEntry**)Hashtable::bucket_addr(i);
}
// GC support
@@ -94,7 +94,7 @@ public:
#endif
};
-class LoaderConstraintEntry : public HashtableEntry {
+class LoaderConstraintEntry : public HashtableEntry {
friend class VMStructs;
private:
Symbol* _name; // class name
@@ -109,14 +109,14 @@ public:
void set_klass(klassOop k) { set_literal(k); }
LoaderConstraintEntry* next() {
- return (LoaderConstraintEntry*)HashtableEntry::next();
+ return (LoaderConstraintEntry*)HashtableEntry::next();
}
LoaderConstraintEntry** next_addr() {
- return (LoaderConstraintEntry**)HashtableEntry::next_addr();
+ return (LoaderConstraintEntry**)HashtableEntry::next_addr();
}
void set_next(LoaderConstraintEntry* next) {
- HashtableEntry::set_next(next);
+ HashtableEntry::set_next(next);
}
Symbol* name() { return _name; }
diff --git a/hotspot/src/share/vm/classfile/placeholders.cpp b/hotspot/src/share/vm/classfile/placeholders.cpp
index ef877b1033e..d3f425b241a 100644
--- a/hotspot/src/share/vm/classfile/placeholders.cpp
+++ b/hotspot/src/share/vm/classfile/placeholders.cpp
@@ -34,7 +34,7 @@
PlaceholderEntry* PlaceholderTable::new_entry(int hash, Symbol* name,
oop loader, bool havesupername,
Symbol* supername) {
- PlaceholderEntry* entry = (PlaceholderEntry*)Hashtable::new_entry(hash, name);
+ PlaceholderEntry* entry = (PlaceholderEntry*)Hashtable::new_entry(hash, name);
// Hashtable with Symbol* literal must increment and decrement refcount.
name->increment_refcount();
entry->set_loader(loader);
@@ -52,7 +52,7 @@ void PlaceholderTable::free_entry(PlaceholderEntry* entry) {
// decrement Symbol refcount here because Hashtable doesn't.
entry->literal()->decrement_refcount();
if (entry->supername() != NULL) entry->supername()->decrement_refcount();
- Hashtable::free_entry(entry);
+ Hashtable::free_entry(entry);
}
@@ -166,7 +166,7 @@ void PlaceholderTable::find_and_remove(int index, unsigned int hash,
}
PlaceholderTable::PlaceholderTable(int table_size)
- : TwoOopHashtable(table_size, sizeof(PlaceholderEntry)) {
+ : TwoOopHashtable(table_size, sizeof(PlaceholderEntry)) {
}
diff --git a/hotspot/src/share/vm/classfile/placeholders.hpp b/hotspot/src/share/vm/classfile/placeholders.hpp
index 667c59b8c70..4dea3a6804c 100644
--- a/hotspot/src/share/vm/classfile/placeholders.hpp
+++ b/hotspot/src/share/vm/classfile/placeholders.hpp
@@ -34,7 +34,7 @@ class PlaceholderEntry;
// being loaded, as well as arrays of primitives.
//
-class PlaceholderTable : public TwoOopHashtable {
+class PlaceholderTable : public TwoOopHashtable {
friend class VMStructs;
public:
@@ -44,15 +44,15 @@ public:
void free_entry(PlaceholderEntry* entry);
PlaceholderEntry* bucket(int i) {
- return (PlaceholderEntry*)Hashtable::bucket(i);
+ return (PlaceholderEntry*)Hashtable::bucket(i);
}
PlaceholderEntry** bucket_addr(int i) {
- return (PlaceholderEntry**)Hashtable::bucket_addr(i);
+ return (PlaceholderEntry**)Hashtable::bucket_addr(i);
}
void add_entry(int index, PlaceholderEntry* new_entry) {
- Hashtable::add_entry(index, (HashtableEntry*)new_entry);
+ Hashtable::add_entry(index, (HashtableEntry*)new_entry);
}
void add_entry(int index, unsigned int hash, Symbol* name,
@@ -116,7 +116,7 @@ public:
// For DEFINE_CLASS, the head of the queue owns the
// define token and the rest of the threads wait to return the
// result the first thread gets.
-class SeenThread: public CHeapObj {
+class SeenThread: public CHeapObj {
private:
Thread *_thread;
SeenThread* _stnext;
@@ -152,7 +152,7 @@ public:
// on store ordering here.
// The system dictionary is the only user of this class.
-class PlaceholderEntry : public HashtableEntry {
+class PlaceholderEntry : public HashtableEntry {
friend class VMStructs;
@@ -206,11 +206,11 @@ class PlaceholderEntry : public HashtableEntry {
void set_defineThreadQ(SeenThread* SeenThread) { _defineThreadQ = SeenThread; }
PlaceholderEntry* next() const {
- return (PlaceholderEntry*)HashtableEntry::next();
+ return (PlaceholderEntry*)HashtableEntry::next();
}
PlaceholderEntry** next_addr() {
- return (PlaceholderEntry**)HashtableEntry::next_addr();
+ return (PlaceholderEntry**)HashtableEntry::next_addr();
}
// Test for equality
diff --git a/hotspot/src/share/vm/classfile/resolutionErrors.cpp b/hotspot/src/share/vm/classfile/resolutionErrors.cpp
index ed31224e010..e94ffa288ab 100644
--- a/hotspot/src/share/vm/classfile/resolutionErrors.cpp
+++ b/hotspot/src/share/vm/classfile/resolutionErrors.cpp
@@ -67,7 +67,7 @@ void ResolutionErrorEntry::set_error(Symbol* e) {
ResolutionErrorEntry* ResolutionErrorTable::new_entry(int hash, constantPoolOop pool,
int cp_index, Symbol* error)
{
- ResolutionErrorEntry* entry = (ResolutionErrorEntry*)Hashtable::new_entry(hash, pool);
+ ResolutionErrorEntry* entry = (ResolutionErrorEntry*)Hashtable::new_entry(hash, pool);
entry->set_cp_index(cp_index);
NOT_PRODUCT(entry->set_error(NULL);)
entry->set_error(error);
@@ -79,13 +79,13 @@ void ResolutionErrorTable::free_entry(ResolutionErrorEntry *entry) {
// decrement error refcount
assert(entry->error() != NULL, "error should be set");
entry->error()->decrement_refcount();
- Hashtable::free_entry(entry);
+ Hashtable::free_entry(entry);
}
// create resolution error table
ResolutionErrorTable::ResolutionErrorTable(int table_size)
- : Hashtable(table_size, sizeof(ResolutionErrorEntry)) {
+ : Hashtable(table_size, sizeof(ResolutionErrorEntry)) {
}
// GC support
diff --git a/hotspot/src/share/vm/classfile/resolutionErrors.hpp b/hotspot/src/share/vm/classfile/resolutionErrors.hpp
index 03fcf4957bb..a18a55a2340 100644
--- a/hotspot/src/share/vm/classfile/resolutionErrors.hpp
+++ b/hotspot/src/share/vm/classfile/resolutionErrors.hpp
@@ -33,7 +33,7 @@ class ResolutionErrorEntry;
// ResolutionError objects are used to record errors encountered during
// constant pool resolution (JVMS 5.4.3).
-class ResolutionErrorTable : public Hashtable {
+class ResolutionErrorTable : public Hashtable {
public:
ResolutionErrorTable(int table_size);
@@ -42,15 +42,16 @@ public:
void free_entry(ResolutionErrorEntry *entry);
ResolutionErrorEntry* bucket(int i) {
- return (ResolutionErrorEntry*)Hashtable::bucket(i);
+ return (ResolutionErrorEntry*)Hashtable::bucket(i);
}
ResolutionErrorEntry** bucket_addr(int i) {
- return (ResolutionErrorEntry**)Hashtable::bucket_addr(i);
+ return (ResolutionErrorEntry**)Hashtable::bucket_addr(i);
}
void add_entry(int index, ResolutionErrorEntry* new_entry) {
- Hashtable::add_entry(index, (HashtableEntry*)new_entry);
+ Hashtable::add_entry(index,
+ (HashtableEntry*)new_entry);
}
void add_entry(int index, unsigned int hash,
@@ -74,7 +75,7 @@ public:
};
-class ResolutionErrorEntry : public HashtableEntry {
+class ResolutionErrorEntry : public HashtableEntry {
private:
int _cp_index;
Symbol* _error;
@@ -90,11 +91,11 @@ class ResolutionErrorEntry : public HashtableEntry {
void set_error(Symbol* e);
ResolutionErrorEntry* next() const {
- return (ResolutionErrorEntry*)HashtableEntry::next();
+ return (ResolutionErrorEntry*)HashtableEntry::next();
}
ResolutionErrorEntry** next_addr() {
- return (ResolutionErrorEntry**)HashtableEntry::next_addr();
+ return (ResolutionErrorEntry**)HashtableEntry::next_addr();
}
// GC support
diff --git a/hotspot/src/share/vm/classfile/symbolTable.cpp b/hotspot/src/share/vm/classfile/symbolTable.cpp
index 66218822525..dd52e8167a8 100644
--- a/hotspot/src/share/vm/classfile/symbolTable.cpp
+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "classfile/altHashing.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
@@ -34,19 +35,18 @@
#include "oops/oop.inline2.hpp"
#include "runtime/mutexLocker.hpp"
#include "utilities/hashtable.inline.hpp"
+#include "utilities/numberSeq.hpp"
// --------------------------------------------------------------------------
SymbolTable* SymbolTable::_the_table = NULL;
// Static arena for symbols that are not deallocated
Arena* SymbolTable::_arena = NULL;
+bool SymbolTable::_needs_rehashing = false;
Symbol* SymbolTable::allocate_symbol(const u1* name, int len, bool c_heap, TRAPS) {
- // Don't allow symbols to be created which cannot fit in a Symbol*.
- if (len > Symbol::max_length()) {
- THROW_MSG_0(vmSymbols::java_lang_InternalError(),
- "name is too long to represent");
- }
+ assert (len <= Symbol::max_length(), "should be checked by caller");
+
Symbol* sym;
// Allocate symbols in the C heap when dumping shared spaces in case there
// are temporary symbols we can remove.
@@ -63,9 +63,9 @@ Symbol* SymbolTable::allocate_symbol(const u1* name, int len, bool c_heap, TRAPS
void SymbolTable::initialize_symbols(int arena_alloc_size) {
// Initialize the arena for global symbols, size passed in depends on CDS.
if (arena_alloc_size == 0) {
- _arena = new Arena();
+ _arena = new (mtSymbol) Arena();
} else {
- _arena = new Arena(arena_alloc_size);
+ _arena = new (mtSymbol) Arena(arena_alloc_size);
}
}
@@ -73,7 +73,7 @@ void SymbolTable::initialize_symbols(int arena_alloc_size) {
void SymbolTable::symbols_do(SymbolClosure *cl) {
const int n = the_table()->table_size();
for (int i = 0; i < n; i++) {
- for (HashtableEntry* p = the_table()->bucket(i);
+ for (HashtableEntry* p = the_table()->bucket(i);
p != NULL;
p = p->next()) {
cl->do_symbol(p->literal_addr());
@@ -91,9 +91,14 @@ void SymbolTable::unlink() {
int total = 0;
size_t memory_total = 0;
for (int i = 0; i < the_table()->table_size(); ++i) {
- for (HashtableEntry** p = the_table()->bucket_addr(i); *p != NULL; ) {
- HashtableEntry* entry = *p;
- if (entry->is_shared()) {
+ HashtableEntry** p = the_table()->bucket_addr(i);
+ HashtableEntry* entry = the_table()->bucket(i);
+ while (entry != NULL) {
+ // Shared entries are normally at the end of the bucket and if we run into
+ // a shared entry, then there is nothing more to remove. However, if we
+ // have rehashed the table, then the shared entries are no longer at the
+ // end of the bucket.
+ if (entry->is_shared() && !use_alternate_hashcode()) {
break;
}
Symbol* s = entry->literal();
@@ -102,6 +107,7 @@ void SymbolTable::unlink() {
assert(s != NULL, "just checking");
// If reference count is zero, remove.
if (s->refcount() == 0) {
+ assert(!entry->is_shared(), "shared entries should be kept live");
delete s;
removed++;
*p = entry->next();
@@ -109,6 +115,8 @@ void SymbolTable::unlink() {
} else {
p = entry->next_addr();
}
+ // get next entry
+ entry = (HashtableEntry*)HashtableEntry::make_ptr(*p);
}
}
symbols_removed += removed;
@@ -121,12 +129,32 @@ void SymbolTable::unlink() {
}
}
+// Create a new table and using alternate hash code, populate the new table
+// with the existing strings. Set flag to use the alternate hash code afterwards.
+void SymbolTable::rehash_table() {
+ assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
+ // This should never happen with -Xshare:dump but it might in testing mode.
+ if (DumpSharedSpaces) return;
+ // Create a new symbol table
+ SymbolTable* new_table = new SymbolTable();
+
+ the_table()->move_to(new_table);
+
+ // Delete the table and buckets (entries are reused in new table).
+ delete _the_table;
+ // Don't check if we need rehashing until the table gets unbalanced again.
+ // Then rehash with a new global seed.
+ _needs_rehashing = false;
+ _the_table = new_table;
+}
// Lookup a symbol in a bucket.
Symbol* SymbolTable::lookup(int index, const char* name,
int len, unsigned int hash) {
- for (HashtableEntry* e = bucket(index); e != NULL; e = e->next()) {
+ int count = 0;
+ for (HashtableEntry* e = bucket(index); e != NULL; e = e->next()) {
+ count++; // count all entries in this bucket, not just ones with same hash
if (e->hash() == hash) {
Symbol* sym = e->literal();
if (sym->equals(name, len)) {
@@ -136,9 +164,20 @@ Symbol* SymbolTable::lookup(int index, const char* name,
}
}
}
+ // If the bucket size is too deep check if this hash code is insufficient.
+ if (count >= BasicHashtable::rehash_count && !needs_rehashing()) {
+ _needs_rehashing = check_rehash_table(count);
+ }
return NULL;
}
+// Pick hashing algorithm.
+unsigned int SymbolTable::hash_symbol(const char* s, int len) {
+ return use_alternate_hashcode() ?
+ AltHashing::murmur3_32(seed(), (const jbyte*)s, len) :
+ java_lang_String::to_hash(s, len);
+}
+
// We take care not to be blocking while holding the
// SymbolTable_lock. Otherwise, the system might deadlock, since the
@@ -156,6 +195,9 @@ Symbol* SymbolTable::lookup(const char* name, int len, TRAPS) {
// Found
if (s != NULL) return s;
+ // Grab SymbolTable_lock first.
+ MutexLocker ml(SymbolTable_lock, THREAD);
+
// Otherwise, add to symbol to table
return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL);
}
@@ -193,6 +235,9 @@ Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
// We can't include the code in No_Safepoint_Verifier because of the
// ResourceMark.
+ // Grab SymbolTable_lock first.
+ MutexLocker ml(SymbolTable_lock, THREAD);
+
return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);
}
@@ -212,7 +257,7 @@ Symbol** SymbolTable::lookup_symbol_addr(Symbol* sym){
unsigned int hash = hash_symbol((char*)sym->bytes(), sym->utf8_length());
int index = the_table()->hash_to_index(hash);
- for (HashtableEntry* e = the_table()->bucket(index); e != NULL; e = e->next()) {
+ for (HashtableEntry* e = the_table()->bucket(index); e != NULL; e = e->next()) {
if (e->hash() == hash) {
Symbol* literal_sym = e->literal();
if (sym == literal_sym) {
@@ -261,6 +306,9 @@ void SymbolTable::add(Handle class_loader, constantPoolHandle cp,
int names_count,
const char** names, int* lengths, int* cp_indices,
unsigned int* hashValues, TRAPS) {
+ // Grab SymbolTable_lock first.
+ MutexLocker ml(SymbolTable_lock, THREAD);
+
SymbolTable* table = the_table();
bool added = table->basic_add(class_loader, cp, names_count, names, lengths,
cp_indices, hashValues, CHECK);
@@ -281,18 +329,39 @@ Symbol* SymbolTable::new_permanent_symbol(const char* name, TRAPS) {
if (result != NULL) {
return result;
}
+ // Grab SymbolTable_lock first.
+ MutexLocker ml(SymbolTable_lock, THREAD);
+
SymbolTable* table = the_table();
int index = table->hash_to_index(hash);
return table->basic_add(index, (u1*)name, (int)strlen(name), hash, false, THREAD);
}
-Symbol* SymbolTable::basic_add(int index, u1 *name, int len,
- unsigned int hashValue, bool c_heap, TRAPS) {
+Symbol* SymbolTable::basic_add(int index_arg, u1 *name, int len,
+ unsigned int hashValue_arg, bool c_heap, TRAPS) {
assert(!Universe::heap()->is_in_reserved(name) || GC_locker::is_active(),
"proposed name of symbol must be stable");
- // Grab SymbolTable_lock first.
- MutexLocker ml(SymbolTable_lock, THREAD);
+ // Don't allow symbols to be created which cannot fit in a Symbol*.
+ if (len > Symbol::max_length()) {
+ THROW_MSG_0(vmSymbols::java_lang_InternalError(),
+ "name is too long to represent");
+ }
+
+ // Cannot hit a safepoint in this function because the "this" pointer can move.
+ No_Safepoint_Verifier nsv;
+
+ // Check if the symbol table has been rehashed, if so, need to recalculate
+ // the hash value and index.
+ unsigned int hashValue;
+ int index;
+ if (use_alternate_hashcode()) {
+ hashValue = hash_symbol((const char*)name, len);
+ index = hash_to_index(hashValue);
+ } else {
+ hashValue = hashValue_arg;
+ index = index_arg;
+ }
// Since look-up was done lock-free, we need to check if another
// thread beat us in the race to insert the symbol.
@@ -307,7 +376,7 @@ Symbol* SymbolTable::basic_add(int index, u1 *name, int len,
Symbol* sym = allocate_symbol(name, len, c_heap, CHECK_NULL);
assert(sym->equals((char*)name, len), "symbol must be properly initialized");
- HashtableEntry* entry = new_entry(hashValue, sym);
+ HashtableEntry* entry = new_entry(hashValue, sym);
add_entry(index, entry);
return sym;
}
@@ -328,14 +397,22 @@ bool SymbolTable::basic_add(Handle class_loader, constantPoolHandle cp,
}
}
- // Hold SymbolTable_lock through the symbol creation
- MutexLocker ml(SymbolTable_lock, THREAD);
+ // Cannot hit a safepoint in this function because the "this" pointer can move.
+ No_Safepoint_Verifier nsv;
for (int i=0; iequals(names[i], lengths[i]), "symbol must be properly initialized"); // why wouldn't it be???
- HashtableEntry* entry = new_entry(hashValues[i], sym);
+ HashtableEntry* entry = new_entry(hashValue, sym);
add_entry(index, entry);
cp->symbol_at_put(cp_indices[i], sym);
}
@@ -358,7 +435,7 @@ bool SymbolTable::basic_add(Handle class_loader, constantPoolHandle cp,
void SymbolTable::verify() {
for (int i = 0; i < the_table()->table_size(); ++i) {
- HashtableEntry* p = the_table()->bucket(i);
+ HashtableEntry* p = the_table()->bucket(i);
for ( ; p != NULL; p = p->next()) {
Symbol* s = (Symbol*)(p->literal());
guarantee(s != NULL, "symbol is NULL");
@@ -370,6 +447,24 @@ void SymbolTable::verify() {
}
}
+void SymbolTable::dump(outputStream* st) {
+ NumberSeq summary;
+ for (int i = 0; i < the_table()->table_size(); ++i) {
+ int count = 0;
+ for (HashtableEntry* e = the_table()->bucket(i);
+ e != NULL; e = e->next()) {
+ count++;
+ }
+ summary.add((double)count);
+ }
+ st->print_cr("SymbolTable statistics:");
+ st->print_cr("Number of buckets : %7d", summary.num());
+ st->print_cr("Average bucket size : %7.0f", summary.avg());
+ st->print_cr("Variance of bucket size : %7.0f", summary.variance());
+ st->print_cr("Std. dev. of bucket size: %7.0f", summary.sd());
+ st->print_cr("Maximum bucket size : %7.0f", summary.maximum());
+}
+
//---------------------------------------------------------------------------
// Non-product code
@@ -393,7 +488,7 @@ void SymbolTable::print_histogram() {
int memory_total = 0;
int count = 0;
for (i = 0; i < the_table()->table_size(); i++) {
- HashtableEntry* p = the_table()->bucket(i);
+ HashtableEntry* p = the_table()->bucket(i);
for ( ; p != NULL; p = p->next()) {
memory_total += p->literal()->object_size();
count++;
@@ -454,21 +549,20 @@ void SymbolTable::print_histogram() {
void SymbolTable::print() {
for (int i = 0; i < the_table()->table_size(); ++i) {
- HashtableEntry** p = the_table()->bucket_addr(i);
- HashtableEntry* entry = the_table()->bucket(i);
+ HashtableEntry** p = the_table()->bucket_addr(i);
+ HashtableEntry* entry = the_table()->bucket(i);
if (entry != NULL) {
while (entry != NULL) {
tty->print(PTR_FORMAT " ", entry->literal());
entry->literal()->print();
tty->print(" %d", entry->literal()->refcount());
p = entry->next_addr();
- entry = (HashtableEntry*)HashtableEntry::make_ptr(*p);
+ entry = (HashtableEntry*)HashtableEntry::make_ptr(*p);
}
tty->cr();
}
}
}
-
#endif // PRODUCT
// --------------------------------------------------------------------------
@@ -514,21 +608,87 @@ class StableMemoryChecker : public StackObj {
// --------------------------------------------------------------------------
StringTable* StringTable::_the_table = NULL;
+bool StringTable::_needs_rehashing = false;
+
+// Pick hashing algorithm
+unsigned int StringTable::hash_string(const jchar* s, int len) {
+ return use_alternate_hashcode() ? AltHashing::murmur3_32(seed(), s, len) :
+ java_lang_String::to_hash(s, len);
+}
+
oop StringTable::lookup(int index, jchar* name,
int len, unsigned int hash) {
- for (HashtableEntry* l = bucket(index); l != NULL; l = l->next()) {
+ int count = 0;
+ for (HashtableEntry* l = bucket(index); l != NULL; l = l->next()) {
+ count++;
if (l->hash() == hash) {
if (java_lang_String::equals(l->literal(), name, len)) {
return l->literal();
}
}
}
+ // If the bucket size is too deep check if this hash code is insufficient.
+ if (count >= BasicHashtable::rehash_count && !needs_rehashing()) {
+ _needs_rehashing = check_rehash_table(count);
+ }
return NULL;
}
-oop StringTable::basic_add(int index, Handle string_or_null, jchar* name,
- int len, unsigned int hashValue, TRAPS) {
+oop StringTable::basic_add(int index_arg, Handle string, jchar* name,
+ int len, unsigned int hashValue_arg, TRAPS) {
+
+ assert(java_lang_String::equals(string(), name, len),
+ "string must be properly initialized");
+ // Cannot hit a safepoint in this function because the "this" pointer can move.
+ No_Safepoint_Verifier nsv;
+
+ // Check if the symbol table has been rehashed, if so, need to recalculate
+ // the hash value and index before second lookup.
+ unsigned int hashValue;
+ int index;
+ if (use_alternate_hashcode()) {
+ hashValue = hash_string(name, len);
+ index = hash_to_index(hashValue);
+ } else {
+ hashValue = hashValue_arg;
+ index = index_arg;
+ }
+
+ // Since look-up was done lock-free, we need to check if another
+ // thread beat us in the race to insert the symbol.
+
+ oop test = lookup(index, name, len, hashValue); // calls lookup(u1*, int)
+ if (test != NULL) {
+ // Entry already added
+ return test;
+ }
+
+ HashtableEntry* entry = new_entry(hashValue, string());
+ add_entry(index, entry);
+ return string();
+}
+
+
+oop StringTable::lookup(Symbol* symbol) {
+ ResourceMark rm;
+ int length;
+ jchar* chars = symbol->as_unicode(length);
+ unsigned int hashValue = hash_string(chars, length);
+ int index = the_table()->hash_to_index(hashValue);
+ return the_table()->lookup(index, chars, length, hashValue);
+}
+
+
+oop StringTable::intern(Handle string_or_null, jchar* name,
+ int len, TRAPS) {
+ unsigned int hashValue = hash_string(name, len);
+ int index = the_table()->hash_to_index(hashValue);
+ oop found_string = the_table()->lookup(index, name, len, hashValue);
+
+ // Found
+ if (found_string != NULL) return found_string;
+
debug_only(StableMemoryChecker smc(name, len * sizeof(name[0])));
assert(!Universe::heap()->is_in_reserved(name) || GC_locker::is_active(),
"proposed name of symbol must be stable");
@@ -541,48 +701,12 @@ oop StringTable::basic_add(int index, Handle string_or_null, jchar* name,
string = java_lang_String::create_tenured_from_unicode(name, len, CHECK_NULL);
}
- // Allocation must be done before grapping the SymbolTable_lock lock
+ // Grab the StringTable_lock before getting the_table() because it could
+ // change at safepoint.
MutexLocker ml(StringTable_lock, THREAD);
- assert(java_lang_String::equals(string(), name, len),
- "string must be properly initialized");
-
- // Since look-up was done lock-free, we need to check if another
- // thread beat us in the race to insert the symbol.
-
- oop test = lookup(index, name, len, hashValue); // calls lookup(u1*, int)
- if (test != NULL) {
- // Entry already added
- return test;
- }
-
- HashtableEntry* entry = new_entry(hashValue, string());
- add_entry(index, entry);
- return string();
-}
-
-
-oop StringTable::lookup(Symbol* symbol) {
- ResourceMark rm;
- int length;
- jchar* chars = symbol->as_unicode(length);
- unsigned int hashValue = java_lang_String::hash_string(chars, length);
- int index = the_table()->hash_to_index(hashValue);
- return the_table()->lookup(index, chars, length, hashValue);
-}
-
-
-oop StringTable::intern(Handle string_or_null, jchar* name,
- int len, TRAPS) {
- unsigned int hashValue = java_lang_String::hash_string(name, len);
- int index = the_table()->hash_to_index(hashValue);
- oop string = the_table()->lookup(index, name, len, hashValue);
-
- // Found
- if (string != NULL) return string;
-
// Otherwise, add to symbol to table
- return the_table()->basic_add(index, string_or_null, name, len,
+ return the_table()->basic_add(index, string, name, len,
hashValue, CHECK_NULL);
}
@@ -625,26 +749,32 @@ void StringTable::unlink(BoolObjectClosure* is_alive) {
// entries at a safepoint.
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
for (int i = 0; i < the_table()->table_size(); ++i) {
- for (HashtableEntry** p = the_table()->bucket_addr(i); *p != NULL; ) {
- HashtableEntry* entry = *p;
- if (entry->is_shared()) {
+ HashtableEntry** p = the_table()->bucket_addr(i);
+ HashtableEntry* entry = the_table()->bucket(i);
+ while (entry != NULL) {
+ // Shared entries are normally at the end of the bucket and if we run into
+ // a shared entry, then there is nothing more to remove. However, if we
+ // have rehashed the table, then the shared entries are no longer at the
+ // end of the bucket.
+ if (entry->is_shared() && !use_alternate_hashcode()) {
break;
}
assert(entry->literal() != NULL, "just checking");
- if (is_alive->do_object_b(entry->literal())) {
+ if (entry->is_shared() || is_alive->do_object_b(entry->literal())) {
p = entry->next_addr();
} else {
*p = entry->next();
the_table()->free_entry(entry);
}
+ entry = (HashtableEntry*)HashtableEntry::make_ptr(*p);
}
}
}
void StringTable::oops_do(OopClosure* f) {
for (int i = 0; i < the_table()->table_size(); ++i) {
- HashtableEntry** p = the_table()->bucket_addr(i);
- HashtableEntry* entry = the_table()->bucket(i);
+ HashtableEntry** p = the_table()->bucket_addr(i);
+ HashtableEntry* entry = the_table()->bucket(i);
while (entry != NULL) {
f->do_oop((oop*)entry->literal_addr());
@@ -656,14 +786,14 @@ void StringTable::oops_do(OopClosure* f) {
} else {
p = entry->next_addr();
}
- entry = (HashtableEntry*)HashtableEntry::make_ptr(*p);
+ entry = (HashtableEntry*)HashtableEntry::make_ptr(*p);
}
}
}
void StringTable::verify() {
for (int i = 0; i < the_table()->table_size(); ++i) {
- HashtableEntry* p = the_table()->bucket(i);
+ HashtableEntry* p = the_table()->bucket(i);
for ( ; p != NULL; p = p->next()) {
oop s = p->literal();
guarantee(s != NULL, "interned string is NULL");
@@ -675,3 +805,41 @@ void StringTable::verify() {
}
}
}
+
+void StringTable::dump(outputStream* st) {
+ NumberSeq summary;
+ for (int i = 0; i < the_table()->table_size(); ++i) {
+ HashtableEntry* p = the_table()->bucket(i);
+ int count = 0;
+ for ( ; p != NULL; p = p->next()) {
+ count++;
+ }
+ summary.add((double)count);
+ }
+ st->print_cr("StringTable statistics:");
+ st->print_cr("Number of buckets : %7d", summary.num());
+ st->print_cr("Average bucket size : %7.0f", summary.avg());
+ st->print_cr("Variance of bucket size : %7.0f", summary.variance());
+ st->print_cr("Std. dev. of bucket size: %7.0f", summary.sd());
+ st->print_cr("Maximum bucket size : %7.0f", summary.maximum());
+}
+
+
+// Create a new table and using alternate hash code, populate the new table
+// with the existing strings. Set flag to use the alternate hash code afterwards.
+void StringTable::rehash_table() {
+ assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
+ // This should never happen with -Xshare:dump but it might in testing mode.
+ if (DumpSharedSpaces) return;
+ StringTable* new_table = new StringTable();
+
+ // Rehash the table
+ the_table()->move_to(new_table);
+
+ // Delete the table and buckets (entries are reused in new table).
+ delete _the_table;
+ // Don't check if we need rehashing until the table gets unbalanced again.
+ // Then rehash with a new global seed.
+ _needs_rehashing = false;
+ _the_table = new_table;
+}
diff --git a/hotspot/src/share/vm/classfile/symbolTable.hpp b/hotspot/src/share/vm/classfile/symbolTable.hpp
index 3e0777fc7c1..7812fe1fb6c 100644
--- a/hotspot/src/share/vm/classfile/symbolTable.hpp
+++ b/hotspot/src/share/vm/classfile/symbolTable.hpp
@@ -40,6 +40,7 @@
// - symbolTableEntrys are allocated in blocks to reduce the space overhead.
class BoolObjectClosure;
+class outputStream;
// Class to hold a newly created or referenced Symbol* temporarily in scope.
@@ -70,7 +71,7 @@ class TempNewSymbol : public StackObj {
operator Symbol*() { return _temp; }
};
-class SymbolTable : public Hashtable {
+class SymbolTable : public Hashtable {
friend class VMStructs;
friend class ClassFileParser;
@@ -78,6 +79,9 @@ private:
// The symbol table
static SymbolTable* _the_table;
+ // Set if one bucket is out of balance due to hash algorithm deficiency
+ static bool _needs_rehashing;
+
// For statistics
static int symbols_removed;
static int symbols_counted;
@@ -108,10 +112,10 @@ private:
Symbol* lookup(int index, const char* name, int len, unsigned int hash);
SymbolTable()
- : Hashtable(symbol_table_size, sizeof (HashtableEntry)) {}
+ : Hashtable(symbol_table_size, sizeof (HashtableEntry)) {}
- SymbolTable(HashtableBucket* t, int number_of_entries)
- : Hashtable(symbol_table_size, sizeof (HashtableEntry), t,
+ SymbolTable(HashtableBucket* t, int number_of_entries)
+ : Hashtable(symbol_table_size, sizeof (HashtableEntry), t,
number_of_entries) {}
// Arena for permanent symbols (null class loader) that are never unloaded
@@ -135,10 +139,10 @@ public:
initialize_symbols(symbol_alloc_arena_size);
}
- static void create_table(HashtableBucket* t, int length,
+ static void create_table(HashtableBucket* t, int length,
int number_of_entries) {
assert(_the_table == NULL, "One symbol table allowed.");
- assert(length == symbol_table_size * sizeof(HashtableBucket),
+ assert(length == symbol_table_size * sizeof(HashtableBucket),
"bad shared symbol size.");
_the_table = new SymbolTable(t, number_of_entries);
// if CDS give symbol table a default arena size since most symbols
@@ -146,6 +150,8 @@ public:
initialize_symbols();
}
+ static unsigned int hash_symbol(const char* s, int len);
+
static Symbol* lookup(const char* name, int len, TRAPS);
// lookup only, won't add. Also calculate hash.
static Symbol* lookup_only(const char* name, int len, unsigned int& hash);
@@ -208,39 +214,46 @@ public:
// Debugging
static void verify();
+ static void dump(outputStream* st);
// Sharing
static void copy_buckets(char** top, char*end) {
- the_table()->Hashtable::copy_buckets(top, end);
+ the_table()->Hashtable::copy_buckets(top, end);
}
static void copy_table(char** top, char*end) {
- the_table()->Hashtable::copy_table(top, end);
+ the_table()->Hashtable::copy_table(top, end);
}
static void reverse(void* boundary = NULL) {
- the_table()->Hashtable::reverse(boundary);
+ the_table()->Hashtable::reverse(boundary);
}
+
+ // Rehash the symbol table if it gets out of balance
+ static void rehash_table();
+ static bool needs_rehashing() { return _needs_rehashing; }
};
-class StringTable : public Hashtable {
+class StringTable : public Hashtable {
friend class VMStructs;
private:
// The string table
static StringTable* _the_table;
+ // Set if one bucket is out of balance due to hash algorithm deficiency
+ static bool _needs_rehashing;
+
static oop intern(Handle string_or_null, jchar* chars, int length, TRAPS);
oop basic_add(int index, Handle string_or_null, jchar* name, int len,
unsigned int hashValue, TRAPS);
oop lookup(int index, jchar* chars, int length, unsigned int hashValue);
- StringTable() : Hashtable((int)StringTableSize,
- sizeof (HashtableEntry)) {}
+ StringTable() : Hashtable((int)StringTableSize,
+ sizeof (HashtableEntry)) {}
- StringTable(HashtableBucket* t, int number_of_entries)
- : Hashtable((int)StringTableSize, sizeof (HashtableEntry), t,
+ StringTable(HashtableBucket* t, int number_of_entries)
+ : Hashtable