aoqi@0: # aoqi@0: # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. aoqi@0: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: # aoqi@0: # This code is free software; you can redistribute it and/or modify it aoqi@0: # under the terms of the GNU General Public License version 2 only, as aoqi@0: # published by the Free Software Foundation. Oracle designates this aoqi@0: # particular file as subject to the "Classpath" exception as provided aoqi@0: # by Oracle in the LICENSE file that accompanied this code. aoqi@0: # aoqi@0: # This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: # version 2 for more details (a copy is included in the LICENSE file that aoqi@0: # accompanied this code). aoqi@0: # aoqi@0: # You should have received a copy of the GNU General Public License version aoqi@0: # 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: # aoqi@0: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: # or visit www.oracle.com if you need additional information or have any aoqi@0: # questions. aoqi@0: # aoqi@0: aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT], aoqi@0: [ aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check which variant of the JDK that we want to build. aoqi@0: # Currently we have: aoqi@0: # normal: standard edition aoqi@0: # but the custom make system may add other variants aoqi@0: # aoqi@0: # Effectively the JDK variant gives a name to a specific set of aoqi@0: # modules to compile into the JDK. In the future, these modules aoqi@0: # might even be Jigsaw modules. aoqi@0: # aoqi@0: AC_MSG_CHECKING([which variant of the JDK to build]) aoqi@0: AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant], aoqi@0: [JDK variant to build (normal) @<:@normal@:>@])]) aoqi@0: aoqi@0: if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then aoqi@0: JDK_VARIANT="normal" aoqi@0: else aoqi@0: AC_MSG_ERROR([The available JDK variants are: normal]) aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(JDK_VARIANT) aoqi@0: aoqi@0: AC_MSG_RESULT([$JDK_VARIANT]) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_INTERPRETER], aoqi@0: [ aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check which interpreter of the JVM we want to build. aoqi@0: # Currently we have: aoqi@0: # template: Template interpreter (the default) aoqi@0: # cpp : C++ interpreter aoqi@0: AC_MSG_CHECKING([which interpreter of the JVM to build]) aoqi@0: AC_ARG_WITH([jvm-interpreter], [AS_HELP_STRING([--with-jvm-interpreter], aoqi@0: [JVM interpreter to build (template, cpp) @<:@template@:>@])]) aoqi@0: aoqi@0: if test "x$with_jvm_interpreter" = x; then aoqi@0: with_jvm_interpreter="template" aoqi@0: fi aoqi@0: aoqi@0: JVM_INTERPRETER="$with_jvm_interpreter" aoqi@0: aoqi@0: if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then aoqi@0: AC_MSG_ERROR([The available JVM interpreters are: template, cpp]) aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(JVM_INTERPRETER) aoqi@0: aoqi@0: AC_MSG_RESULT([$with_jvm_interpreter]) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS], aoqi@0: [ aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check which variants of the JVM that we want to build. aoqi@0: # Currently we have: aoqi@0: # server: normal interpreter and a tiered C1/C2 compiler aoqi@0: # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) aoqi@0: # minimal1: reduced form of client with optional VM services and features stripped out aoqi@0: # kernel: kernel footprint JVM that passes the TCK without major performance problems, aoqi@0: # ie normal interpreter and C1, only the serial GC, kernel jvmti etc aoqi@0: # zero: no machine code interpreter, no compiler aoqi@0: # zeroshark: zero interpreter and shark/llvm compiler backend aoqi@0: # core: interpreter only, no compiler (only works on some platforms) aoqi@0: AC_MSG_CHECKING([which variants of the JVM to build]) aoqi@0: AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], aoqi@0: [JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark, core) @<:@server@:>@])]) aoqi@0: aoqi@0: if test "x$with_jvm_variants" = x; then aoqi@0: with_jvm_variants="server" aoqi@0: fi aoqi@0: aoqi@0: JVM_VARIANTS=",$with_jvm_variants," aoqi@0: TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'` aoqi@0: aoqi@0: if test "x$TEST_VARIANTS" != "x,"; then aoqi@0: AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core]) aoqi@0: fi aoqi@0: AC_MSG_RESULT([$with_jvm_variants]) aoqi@0: aoqi@0: JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` aoqi@0: JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` aoqi@0: JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'` aoqi@0: JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` aoqi@0: JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` aoqi@0: JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` aoqi@0: JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'` aoqi@0: aoqi@0: if test "x$JVM_VARIANT_CLIENT" = xtrue; then aoqi@0: if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then aoqi@0: AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) aoqi@0: fi aoqi@0: fi aoqi@0: if test "x$JVM_VARIANT_KERNEL" = xtrue; then aoqi@0: if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then aoqi@0: AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) aoqi@0: fi aoqi@0: fi aoqi@0: if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then aoqi@0: if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then aoqi@0: AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.]) aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: # Replace the commas with AND for use in the build directory name. aoqi@0: ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` aoqi@0: COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'` aoqi@0: if test "x$COUNT_VARIANTS" != "x,1"; then aoqi@0: BUILDING_MULTIPLE_JVM_VARIANTS=yes aoqi@0: else aoqi@0: BUILDING_MULTIPLE_JVM_VARIANTS=no aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(JVM_VARIANTS) aoqi@0: AC_SUBST(JVM_VARIANT_SERVER) aoqi@0: AC_SUBST(JVM_VARIANT_CLIENT) aoqi@0: AC_SUBST(JVM_VARIANT_MINIMAL1) aoqi@0: AC_SUBST(JVM_VARIANT_KERNEL) aoqi@0: AC_SUBST(JVM_VARIANT_ZERO) aoqi@0: AC_SUBST(JVM_VARIANT_ZEROSHARK) aoqi@0: AC_SUBST(JVM_VARIANT_CORE) aoqi@0: aoqi@0: INCLUDE_SA=true aoqi@0: if test "x$JVM_VARIANT_ZERO" = xtrue ; then aoqi@0: INCLUDE_SA=false aoqi@0: fi aoqi@0: if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then aoqi@0: INCLUDE_SA=false aoqi@0: fi aoqi@0: if test "x$VAR_CPU" = xppc64 ; then aoqi@0: INCLUDE_SA=false aoqi@0: fi aoqi@0: AC_SUBST(INCLUDE_SA) aoqi@0: aoqi@0: if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then aoqi@0: MACOSX_UNIVERSAL="true" aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(MACOSX_UNIVERSAL) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL], aoqi@0: [ aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Set the debug level aoqi@0: # release: no debug information, all optimizations, no asserts. aoqi@0: # fastdebug: debug information (-g), all optimizations, all asserts aoqi@0: # slowdebug: debug information (-g), no optimizations, all asserts aoqi@0: # aoqi@0: DEBUG_LEVEL="release" aoqi@0: AC_MSG_CHECKING([which debug level to use]) aoqi@0: AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], aoqi@0: [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])], aoqi@0: [ aoqi@0: ENABLE_DEBUG="${enableval}" aoqi@0: DEBUG_LEVEL="fastdebug" aoqi@0: ], [ENABLE_DEBUG="no"]) aoqi@0: aoqi@0: AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level], aoqi@0: [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])], aoqi@0: [ aoqi@0: DEBUG_LEVEL="${withval}" aoqi@0: if test "x$ENABLE_DEBUG" = xyes; then aoqi@0: AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.]) aoqi@0: fi aoqi@0: ]) aoqi@0: AC_MSG_RESULT([$DEBUG_LEVEL]) aoqi@0: aoqi@0: if test "x$DEBUG_LEVEL" != xrelease && \ aoqi@0: test "x$DEBUG_LEVEL" != xfastdebug && \ aoqi@0: test "x$DEBUG_LEVEL" != xslowdebug; then aoqi@0: AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug]) aoqi@0: fi aoqi@0: aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Setup legacy vars/targets and new vars to deal with different debug levels. aoqi@0: # aoqi@0: aoqi@0: case $DEBUG_LEVEL in aoqi@0: release ) aoqi@0: VARIANT="OPT" aoqi@0: FASTDEBUG="false" aoqi@0: DEBUG_CLASSFILES="false" aoqi@0: BUILD_VARIANT_RELEASE="" aoqi@0: HOTSPOT_DEBUG_LEVEL="product" aoqi@0: HOTSPOT_EXPORT="product" aoqi@0: ;; aoqi@0: fastdebug ) aoqi@0: VARIANT="DBG" aoqi@0: FASTDEBUG="true" aoqi@0: DEBUG_CLASSFILES="true" aoqi@0: BUILD_VARIANT_RELEASE="-fastdebug" aoqi@0: HOTSPOT_DEBUG_LEVEL="fastdebug" aoqi@0: HOTSPOT_EXPORT="fastdebug" aoqi@0: ;; aoqi@0: slowdebug ) aoqi@0: VARIANT="DBG" aoqi@0: FASTDEBUG="false" aoqi@0: DEBUG_CLASSFILES="true" aoqi@0: BUILD_VARIANT_RELEASE="-debug" aoqi@0: HOTSPOT_DEBUG_LEVEL="jvmg" aoqi@0: HOTSPOT_EXPORT="debug" aoqi@0: ;; aoqi@0: esac aoqi@0: aoqi@0: ##### aoqi@0: # Generate the legacy makefile targets for hotspot. aoqi@0: # The hotspot api for selecting the build artifacts, really, needs to be improved. aoqi@0: # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to aoqi@0: # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc aoqi@0: # But until then ... aoqi@0: HOTSPOT_TARGET="" aoqi@0: aoqi@0: if test "x$JVM_VARIANT_SERVER" = xtrue; then aoqi@0: HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " aoqi@0: fi aoqi@0: aoqi@0: if test "x$JVM_VARIANT_CLIENT" = xtrue; then aoqi@0: HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " aoqi@0: fi aoqi@0: aoqi@0: if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then aoqi@0: HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " aoqi@0: fi aoqi@0: aoqi@0: if test "x$JVM_VARIANT_KERNEL" = xtrue; then aoqi@0: HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " aoqi@0: fi aoqi@0: aoqi@0: if test "x$JVM_VARIANT_ZERO" = xtrue; then aoqi@0: HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " aoqi@0: fi aoqi@0: aoqi@0: if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then aoqi@0: HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " aoqi@0: fi aoqi@0: aoqi@0: if test "x$JVM_VARIANT_CORE" = xtrue; then aoqi@0: HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core " aoqi@0: fi aoqi@0: aoqi@0: HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" aoqi@0: aoqi@0: # On Macosx universal binaries are produced, but they only contain aoqi@0: # 64 bit intel. This invalidates control of which jvms are built aoqi@0: # from configure, but only server is valid anyway. Fix this aoqi@0: # when hotspot makefiles are rewritten. aoqi@0: if test "x$MACOSX_UNIVERSAL" = xtrue; then aoqi@0: HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} aoqi@0: fi aoqi@0: aoqi@0: ##### aoqi@0: aoqi@0: AC_SUBST(DEBUG_LEVEL) aoqi@0: AC_SUBST(VARIANT) aoqi@0: AC_SUBST(FASTDEBUG) aoqi@0: AC_SUBST(DEBUG_CLASSFILES) aoqi@0: AC_SUBST(BUILD_VARIANT_RELEASE) aoqi@0: ]) aoqi@0: aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Should we build only OpenJDK even if closed sources are present? aoqi@0: # aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM], aoqi@0: [ aoqi@0: AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], aoqi@0: [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"]) aoqi@0: aoqi@0: AC_MSG_CHECKING([for presence of closed sources]) aoqi@0: if test -d "$SRC_ROOT/jdk/src/closed"; then aoqi@0: CLOSED_SOURCE_PRESENT=yes aoqi@0: else aoqi@0: CLOSED_SOURCE_PRESENT=no aoqi@0: fi aoqi@0: AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT]) aoqi@0: aoqi@0: AC_MSG_CHECKING([if closed source is suppressed (openjdk-only)]) aoqi@0: SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only" aoqi@0: AC_MSG_RESULT([$SUPPRESS_CLOSED_SOURCE]) aoqi@0: aoqi@0: if test "x$CLOSED_SOURCE_PRESENT" = xno; then aoqi@0: OPENJDK=true aoqi@0: if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then aoqi@0: AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense]) aoqi@0: fi aoqi@0: else aoqi@0: if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then aoqi@0: OPENJDK=true aoqi@0: else aoqi@0: OPENJDK=false aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: if test "x$OPENJDK" = "xtrue"; then aoqi@0: SET_OPENJDK="OPENJDK=true" aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(SET_OPENJDK) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], aoqi@0: [ aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Should we build a JDK/JVM with headful support (ie a graphical ui)? aoqi@0: # We always build headless support. aoqi@0: # aoqi@0: AC_MSG_CHECKING([headful support]) aoqi@0: AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful], aoqi@0: [disable building headful support (graphical UI support) @<:@enabled@:>@])], aoqi@0: [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes]) aoqi@0: aoqi@0: SUPPORT_HEADLESS=yes aoqi@0: BUILD_HEADLESS="BUILD_HEADLESS:=true" aoqi@0: aoqi@0: if test "x$SUPPORT_HEADFUL" = xyes; then aoqi@0: # We are building both headful and headless. aoqi@0: headful_msg="include support for both headful and headless" aoqi@0: fi aoqi@0: aoqi@0: if test "x$SUPPORT_HEADFUL" = xno; then aoqi@0: # Thus we are building headless only. aoqi@0: BUILD_HEADLESS="BUILD_HEADLESS:=true" aoqi@0: headful_msg="headless only" aoqi@0: fi aoqi@0: aoqi@0: AC_MSG_RESULT([$headful_msg]) aoqi@0: aoqi@0: AC_SUBST(SUPPORT_HEADLESS) aoqi@0: AC_SUBST(SUPPORT_HEADFUL) aoqi@0: AC_SUBST(BUILD_HEADLESS) aoqi@0: aoqi@0: # Control wether Hotspot runs Queens test after build. aoqi@0: AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], aoqi@0: [run the Queens test after Hotspot build @<:@disabled@:>@])],, aoqi@0: [enable_hotspot_test_in_build=no]) aoqi@0: if test "x$enable_hotspot_test_in_build" = "xyes"; then aoqi@0: TEST_IN_BUILD=true aoqi@0: else aoqi@0: TEST_IN_BUILD=false aoqi@0: fi aoqi@0: AC_SUBST(TEST_IN_BUILD) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Choose cacerts source file aoqi@0: # aoqi@0: AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file], aoqi@0: [specify alternative cacerts file])]) aoqi@0: if test "x$with_cacerts_file" != x; then aoqi@0: CACERTS_FILE=$with_cacerts_file aoqi@0: else aoqi@0: CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts aoqi@0: fi aoqi@0: AC_SUBST(CACERTS_FILE) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Enable or disable unlimited crypto aoqi@0: # aoqi@0: AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto], aoqi@0: [Enable unlimited crypto policy @<:@disabled@:>@])],, aoqi@0: [enable_unlimited_crypto=no]) aoqi@0: if test "x$enable_unlimited_crypto" = "xyes"; then aoqi@0: UNLIMITED_CRYPTO=true aoqi@0: else aoqi@0: UNLIMITED_CRYPTO=false aoqi@0: fi aoqi@0: AC_SUBST(UNLIMITED_CRYPTO) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Enable or disable the elliptic curve crypto implementation aoqi@0: # aoqi@0: AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], aoqi@0: [ aoqi@0: AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) aoqi@0: aoqi@0: if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then aoqi@0: ENABLE_INTREE_EC=yes aoqi@0: AC_MSG_RESULT([yes]) aoqi@0: else aoqi@0: ENABLE_INTREE_EC=no aoqi@0: AC_MSG_RESULT([no]) aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(ENABLE_INTREE_EC) aoqi@0: ]) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Compress jars aoqi@0: # aoqi@0: COMPRESS_JARS=false aoqi@0: aoqi@0: AC_SUBST(COMPRESS_JARS) aoqi@0: ]) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Setup version numbers aoqi@0: # aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], aoqi@0: [ aoqi@0: # Source the version numbers aoqi@0: . $AUTOCONF_DIR/version-numbers aoqi@0: aoqi@0: # Get the settings from parameters aoqi@0: AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone], aoqi@0: [Set milestone value for build @<:@internal@:>@])]) aoqi@0: if test "x$with_milestone" = xyes; then aoqi@0: AC_MSG_ERROR([Milestone must have a value]) aoqi@0: elif test "x$with_milestone" != x; then aoqi@0: MILESTONE="$with_milestone" aoqi@0: fi aoqi@0: if test "x$MILESTONE" = x; then aoqi@0: MILESTONE=internal aoqi@0: fi aoqi@0: aoqi@0: AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version], aoqi@0: [Set update version value for build @<:@b00@:>@])]) aoqi@0: if test "x$with_update_version" = xyes; then aoqi@0: AC_MSG_ERROR([Update version must have a value]) aoqi@0: elif test "x$with_update_version" != x; then aoqi@0: JDK_UPDATE_VERSION="$with_update_version" aoqi@0: # On macosx 10.7, it's not possible to set --with-update-version=0X due aoqi@0: # to a bug in expr (which reduces it to just X). To work around this, we aoqi@0: # always add a 0 to one digit update versions. aoqi@0: if test "${#JDK_UPDATE_VERSION}" = "1"; then aoqi@0: JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}" aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], aoqi@0: [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])]) aoqi@0: if test "x$with_user_release_suffix" = xyes; then aoqi@0: AC_MSG_ERROR([Release suffix must have a value]) aoqi@0: elif test "x$with_user_release_suffix" != x; then aoqi@0: USER_RELEASE_SUFFIX="$with_user_release_suffix" aoqi@0: fi aoqi@0: aoqi@0: AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number], aoqi@0: [Set build number value for build @<:@b00@:>@])]) aoqi@0: if test "x$with_build_number" = xyes; then aoqi@0: AC_MSG_ERROR([Build number must have a value]) aoqi@0: elif test "x$with_build_number" != x; then aoqi@0: JDK_BUILD_NUMBER="$with_build_number" aoqi@0: fi aoqi@0: # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set aoqi@0: if test "x$JDK_BUILD_NUMBER" = x; then aoqi@0: JDK_BUILD_NUMBER=b00 aoqi@0: if test "x$USER_RELEASE_SUFFIX" = x; then aoqi@0: BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` aoqi@0: # Avoid [:alnum:] since it depends on the locale. aoqi@0: CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'` aoqi@0: USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: # Now set the JDK version, milestone, build number etc. aoqi@0: AC_SUBST(USER_RELEASE_SUFFIX) aoqi@0: AC_SUBST(JDK_MAJOR_VERSION) aoqi@0: AC_SUBST(JDK_MINOR_VERSION) aoqi@0: AC_SUBST(JDK_MICRO_VERSION) aoqi@0: AC_SUBST(JDK_UPDATE_VERSION) aoqi@0: AC_SUBST(JDK_BUILD_NUMBER) aoqi@0: AC_SUBST(MILESTONE) aoqi@0: AC_SUBST(LAUNCHER_NAME) aoqi@0: AC_SUBST(PRODUCT_NAME) aoqi@0: AC_SUBST(PRODUCT_SUFFIX) aoqi@0: AC_SUBST(JDK_RC_PLATFORM_NAME) aoqi@0: AC_SUBST(COMPANY_NAME) aoqi@0: AC_SUBST(MACOSX_BUNDLE_NAME_BASE) aoqi@0: AC_SUBST(MACOSX_BUNDLE_ID_BASE) aoqi@0: aoqi@0: COPYRIGHT_YEAR=`date +'%Y'` aoqi@0: AC_SUBST(COPYRIGHT_YEAR) aoqi@0: aoqi@0: if test "x$JDK_UPDATE_VERSION" != x; then aoqi@0: JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" aoqi@0: else aoqi@0: JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" aoqi@0: fi aoqi@0: AC_SUBST(JDK_VERSION) aoqi@0: aoqi@0: COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` aoqi@0: AC_SUBST(COOKED_BUILD_NUMBER) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS], aoqi@0: [ aoqi@0: HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" aoqi@0: AC_SUBST(HOTSPOT_MAKE_ARGS) aoqi@0: aoqi@0: # The name of the Service Agent jar. aoqi@0: SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" aoqi@0: if test "x$OPENJDK_TARGET_OS" = "xwindows"; then aoqi@0: SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" aoqi@0: fi aoqi@0: AC_SUBST(SALIB_NAME) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], aoqi@0: [ aoqi@0: # aoqi@0: # ENABLE_DEBUG_SYMBOLS aoqi@0: # This must be done after the toolchain is setup, since we're looking at objcopy. aoqi@0: # aoqi@0: AC_ARG_ENABLE([debug-symbols], aoqi@0: [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])]) aoqi@0: aoqi@0: AC_MSG_CHECKING([if we should generate debug symbols]) aoqi@0: aoqi@0: if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then aoqi@0: # explicit enabling of enable-debug-symbols and can't find objcopy aoqi@0: # this is an error aoqi@0: AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$enable_debug_symbols" = "xyes"; then aoqi@0: ENABLE_DEBUG_SYMBOLS=true aoqi@0: elif test "x$enable_debug_symbols" = "xno"; then aoqi@0: ENABLE_DEBUG_SYMBOLS=false aoqi@0: else aoqi@0: # Default is on if objcopy is found aoqi@0: if test "x$OBJCOPY" != x; then aoqi@0: ENABLE_DEBUG_SYMBOLS=true aoqi@0: # MacOS X and Windows don't use objcopy but default is on for those OSes aoqi@0: elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then aoqi@0: ENABLE_DEBUG_SYMBOLS=true aoqi@0: else aoqi@0: ENABLE_DEBUG_SYMBOLS=false aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) aoqi@0: aoqi@0: # aoqi@0: # ZIP_DEBUGINFO_FILES aoqi@0: # aoqi@0: AC_MSG_CHECKING([if we should zip debug-info files]) aoqi@0: AC_ARG_ENABLE([zip-debug-info], aoqi@0: [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])], aoqi@0: [enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"]) aoqi@0: AC_MSG_RESULT([${enable_zip_debug_info}]) aoqi@0: aoqi@0: if test "x${enable_zip_debug_info}" = "xno"; then aoqi@0: ZIP_DEBUGINFO_FILES=false aoqi@0: else aoqi@0: ZIP_DEBUGINFO_FILES=true aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(ENABLE_DEBUG_SYMBOLS) aoqi@0: AC_SUBST(ZIP_DEBUGINFO_FILES) aoqi@0: AC_SUBST(CFLAGS_DEBUG_SYMBOLS) aoqi@0: AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS) aoqi@0: ]) aoqi@0: aoqi@0: # Support for customization of the build process. Some build files aoqi@0: # will include counterparts from this location, if they exist. This allows aoqi@0: # for a degree of customization of the build targets and the rules/recipes aoqi@0: # to create them aoqi@0: AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir], aoqi@0: [use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir]) aoqi@0: AC_SUBST(CUSTOM_MAKE_DIR)