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