common/autoconf/jdk-options.m4
changeset 33926 3a19edba4808
parent 29305 4ddc6faf7842
child 33944 e1e20245e153
equal deleted inserted replaced
30850:56166ce66037 33926:3a19edba4808
     1 #
     1 #
     2 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.  Oracle designates this
     7 # published by the Free Software Foundation.  Oracle designates this
   434   fi
   434   fi
   435   AC_SUBST(UNLIMITED_CRYPTO)
   435   AC_SUBST(UNLIMITED_CRYPTO)
   436 
   436 
   437   ###############################################################################
   437   ###############################################################################
   438   #
   438   #
   439   # Enable or disable the elliptic curve crypto implementation
       
   440   #
       
   441   AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
       
   442   [
       
   443     AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
       
   444 
       
   445     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
       
   446       ENABLE_INTREE_EC=yes
       
   447       AC_MSG_RESULT([yes])
       
   448     else
       
   449       ENABLE_INTREE_EC=no
       
   450       AC_MSG_RESULT([no])
       
   451     fi
       
   452 
       
   453     AC_SUBST(ENABLE_INTREE_EC)
       
   454   ])
       
   455 
       
   456   ###############################################################################
       
   457   #
       
   458   # --enable-rmiconnector-iiop
   439   # --enable-rmiconnector-iiop
   459   #
   440   #
   460   AC_ARG_ENABLE(rmiconnector-iiop, [AS_HELP_STRING([--enable-rmiconnector-iiop],
   441   AC_ARG_ENABLE(rmiconnector-iiop, [AS_HELP_STRING([--enable-rmiconnector-iiop],
   461       [enable the JMX RMIConnector iiop transport  @<:@disabled@:>@])])
   442       [enable the JMX RMIConnector iiop transport  @<:@disabled@:>@])])
   462   if test "x$enable_rmiconnector_iiop" = "xyes"; then
   443   if test "x$enable_rmiconnector_iiop" = "xyes"; then
   471   # Compress jars
   452   # Compress jars
   472   #
   453   #
   473   COMPRESS_JARS=false
   454   COMPRESS_JARS=false
   474 
   455 
   475   AC_SUBST(COMPRESS_JARS)
   456   AC_SUBST(COMPRESS_JARS)
   476 ])
   457 
   477 
   458   # Setup default copyright year. Mostly overridden when building close to a new year.
   478 ###############################################################################
       
   479 #
       
   480 # Setup version numbers
       
   481 #
       
   482 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
       
   483 [
       
   484   # Source the version numbers
       
   485   . $AUTOCONF_DIR/version-numbers
       
   486 
       
   487   # Get the settings from parameters
       
   488   AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
       
   489       [Set milestone value for build @<:@internal@:>@])])
       
   490   if test "x$with_milestone" = xyes; then
       
   491     AC_MSG_ERROR([Milestone must have a value])
       
   492   elif test "x$with_milestone" != x; then
       
   493     MILESTONE="$with_milestone"
       
   494   fi
       
   495   if test "x$MILESTONE" = x; then
       
   496     MILESTONE=internal
       
   497   fi
       
   498 
       
   499   AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version],
       
   500       [Set update version value for build @<:@b00@:>@])])
       
   501   if test "x$with_update_version" = xyes; then
       
   502     AC_MSG_ERROR([Update version must have a value])
       
   503   elif test "x$with_update_version" != x; then
       
   504     JDK_UPDATE_VERSION="$with_update_version"
       
   505     # On macosx 10.7, it's not possible to set --with-update-version=0X due
       
   506     # to a bug in expr (which reduces it to just X). To work around this, we
       
   507     # always add a 0 to one digit update versions.
       
   508     if test "${#JDK_UPDATE_VERSION}" = "1"; then
       
   509       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
       
   510     fi
       
   511   fi
       
   512 
       
   513   AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
       
   514       [Add a custom string to the version string if build number is not set.@<:@username_builddateb00@:>@])])
       
   515   if test "x$with_user_release_suffix" = xyes; then
       
   516     AC_MSG_ERROR([Release suffix must have a value])
       
   517   elif test "x$with_user_release_suffix" != x; then
       
   518     USER_RELEASE_SUFFIX="$with_user_release_suffix"
       
   519   fi
       
   520 
       
   521   AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
       
   522       [Set build number value for build @<:@b00@:>@])])
       
   523   if test "x$with_build_number" = xyes; then
       
   524     AC_MSG_ERROR([Build number must have a value])
       
   525   elif test "x$with_build_number" != x; then
       
   526     JDK_BUILD_NUMBER="$with_build_number"
       
   527   fi
       
   528   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
       
   529   if test "x$JDK_BUILD_NUMBER" = x; then
       
   530     JDK_BUILD_NUMBER=b00
       
   531     if test "x$USER_RELEASE_SUFFIX" = x; then
       
   532       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
       
   533       # Avoid [:alnum:] since it depends on the locale.
       
   534       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
       
   535       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
       
   536     fi
       
   537   fi
       
   538 
       
   539   # Now set the JDK version, milestone, build number etc.
       
   540   AC_SUBST(USER_RELEASE_SUFFIX)
       
   541   AC_SUBST(JDK_MAJOR_VERSION)
       
   542   AC_SUBST(JDK_MINOR_VERSION)
       
   543   AC_SUBST(JDK_MICRO_VERSION)
       
   544   AC_SUBST(JDK_UPDATE_VERSION)
       
   545   AC_SUBST(JDK_BUILD_NUMBER)
       
   546   AC_SUBST(MILESTONE)
       
   547   AC_SUBST(LAUNCHER_NAME)
       
   548   AC_SUBST(PRODUCT_NAME)
       
   549   AC_SUBST(PRODUCT_SUFFIX)
       
   550   AC_SUBST(JDK_RC_PLATFORM_NAME)
       
   551   AC_SUBST(COMPANY_NAME)
       
   552   AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
       
   553   AC_SUBST(MACOSX_BUNDLE_ID_BASE)
       
   554 
       
   555   AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
   459   AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
   556       [Set copyright year value for build @<:@current year@:>@])])
   460       [Set copyright year value for build @<:@current year@:>@])])
   557   if test "x$with_copyright_year" = xyes; then
   461   if test "x$with_copyright_year" = xyes; then
   558     AC_MSG_ERROR([Copyright year must have a value])
   462     AC_MSG_ERROR([Copyright year must have a value])
   559   elif test "x$with_copyright_year" != x; then
   463   elif test "x$with_copyright_year" != x; then
   560     COPYRIGHT_YEAR="$with_copyright_year"
   464     COPYRIGHT_YEAR="$with_copyright_year"
   561   else
   465   else
   562     COPYRIGHT_YEAR=`date +'%Y'`
   466     COPYRIGHT_YEAR=`date +'%Y'`
   563   fi
   467   fi
   564   AC_SUBST(COPYRIGHT_YEAR)
   468   AC_SUBST(COPYRIGHT_YEAR)
   565 
       
   566   if test "x$JDK_UPDATE_VERSION" != x; then
       
   567     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
       
   568   else
       
   569     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
       
   570   fi
       
   571   AC_SUBST(JDK_VERSION)
       
   572 
       
   573   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
       
   574   AC_SUBST(COOKED_BUILD_NUMBER)
       
   575 ])
   469 ])
   576 
   470 
   577 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
   471 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
   578 [
   472 [
   579   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
   473   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
   584   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   478   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   585     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
   479     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
   586   fi
   480   fi
   587   AC_SUBST(SALIB_NAME)
   481   AC_SUBST(SALIB_NAME)
   588 ])
   482 ])
       
   483 
       
   484 ###############################################################################
       
   485 #
       
   486 # Enable or disable the elliptic curve crypto implementation
       
   487 #
       
   488 AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
       
   489 [
       
   490   AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
       
   491 
       
   492   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
       
   493     ENABLE_INTREE_EC=yes
       
   494     AC_MSG_RESULT([yes])
       
   495   else
       
   496     ENABLE_INTREE_EC=no
       
   497     AC_MSG_RESULT([no])
       
   498   fi
       
   499 
       
   500   AC_SUBST(ENABLE_INTREE_EC)
       
   501 ])
       
   502 
   589 
   503 
   590 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
   504 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
   591 [
   505 [
   592   #
   506   #
   593   # ENABLE_DEBUG_SYMBOLS
   507   # ENABLE_DEBUG_SYMBOLS