< prev index next >

make/autoconf/jdk-version.m4

Print this page


   1 #
   2 # Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   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
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  49   if test $cleaned_value -gt 255; then
  50     AC_MSG_ERROR([$1 is given as $2. This is greater than 255 which is not allowed.])
  51   fi
  52   if test "x$cleaned_value" != "x$2"; then
  53     AC_MSG_WARN([Value for $1 has been sanitized from '$2' to '$cleaned_value'])
  54   fi
  55   $1=$cleaned_value
  56 ])
  57 
  58 AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
  59 [
  60   # Source the version numbers file
  61   . $AUTOCONF_DIR/version-numbers
  62 
  63   # Some non-version number information is set in that file
  64   AC_SUBST(LAUNCHER_NAME)
  65   AC_SUBST(PRODUCT_NAME)
  66   AC_SUBST(PRODUCT_SUFFIX)
  67   AC_SUBST(JDK_RC_PLATFORM_NAME)
  68   AC_SUBST(HOTSPOT_VM_DISTRO)
  69 
  70   # Set the MACOSX Bundle Name base
  71   AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
  72       [Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
  73       @<:@not specified@:>@])])
  74   if test "x$with_macosx_bundle_name_base" = xyes; then
  75     AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
  76   elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
  77     AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
  78   elif test "x$with_macosx_bundle_name_base" != x; then
  79     # Set MACOSX_BUNDLE_NAME_BASE to the configured value.
  80     MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
  81   fi
  82   AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
  83 
  84   # Set the MACOSX Bundle ID base
  85   AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
  86       [Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
  87       @<:@not specified@:>@])])
  88   if test "x$with_macosx_bundle_id_base" = xyes; then
  89     AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
  90   elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
  91     AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
  92   elif test "x$with_macosx_bundle_id_base" != x; then
  93     # Set MACOSX_BUNDLE_ID_BASE to the configured value.
  94     MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
  95   fi
  96   AC_SUBST(MACOSX_BUNDLE_ID_BASE)
  97 
  98   # Set the JDK RC name
  99   AC_ARG_WITH(jdk-rc-name, [AS_HELP_STRING([--with-jdk-rc-name],
 100       [Set JDK RC name. This is used for FileDescription and ProductName properties
 101        of MS Windows binaries. @<:@not specified@:>@])])
 102   if test "x$with_jdk_rc_name" = xyes; then
 103     AC_MSG_ERROR([--with-jdk-rc-name must have a value])
 104   elif [ ! [[ $with_jdk_rc_name =~ ^[[:print:]]*$ ]] ]; then
 105     AC_MSG_ERROR([--with-jdk-rc-name contains non-printing characters: $with_jdk_rc_name])
 106   elif test "x$with_jdk_rc_name" != x; then
 107     # Set JDK_RC_NAME to a custom value if '--with-jdk-rc-name' was used and is not empty.
 108     JDK_RC_NAME="$with_jdk_rc_name"
 109   else
 110     # Otherwise calculate from "version-numbers" included above.
 111     JDK_RC_NAME="$PRODUCT_NAME $JDK_RC_PLATFORM_NAME"
 112   fi
 113   AC_SUBST(JDK_RC_NAME)
 114 
 115   # The vendor name, if any
 116   AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name],
 117       [Set vendor name. Among others, used to set the 'java.vendor'
 118        and 'java.vm.vendor' system properties. @<:@not specified@:>@])])
 119   if test "x$with_vendor_name" = xyes; then
 120     AC_MSG_ERROR([--with-vendor-name must have a value])
 121   elif [ ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ]; then
 122     AC_MSG_ERROR([--with-vendor-name contains non-printing characters: $with_vendor_name])
 123   elif test "x$with_vendor_name" != x; then
 124     # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
 125     # Otherwise we will use the value from "version-numbers" included above.
 126     COMPANY_NAME="$with_vendor_name"
 127   fi
 128   AC_SUBST(COMPANY_NAME)
 129 
 130   # The vendor URL, if any
 131   AC_ARG_WITH(vendor-url, [AS_HELP_STRING([--with-vendor-url],
 132       [Set the 'java.vendor.url' system property @<:@not specified@:>@])])
 133   if test "x$with_vendor_url" = xyes; then
 134     AC_MSG_ERROR([--with-vendor-url must have a value])
 135   elif [ ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ]; then
 136     AC_MSG_ERROR([--with-vendor-url contains non-printing characters: $with_vendor_url])
 137   elif test "x$with_vendor_url" != x; then
 138     # Only set VENDOR_URL if '--with-vendor-url' was used and is not empty.
 139     # Otherwise we will use the value from "version-numbers" included above.
 140     VENDOR_URL="$with_vendor_url"
 141   fi
 142   AC_SUBST(VENDOR_URL)
 143 
 144   # The vendor bug URL, if any
 145   AC_ARG_WITH(vendor-bug-url, [AS_HELP_STRING([--with-vendor-bug-url],
 146       [Set the 'java.vendor.url.bug' system property @<:@not specified@:>@])])
 147   if test "x$with_vendor_bug_url" = xyes; then
 148     AC_MSG_ERROR([--with-vendor-bug-url must have a value])
 149   elif [ ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ]; then
 150     AC_MSG_ERROR([--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url])
 151   elif test "x$with_vendor_bug_url" != x; then
 152     # Only set VENDOR_URL_BUG if '--with-vendor-bug-url' was used and is not empty.
 153     # Otherwise we will use the value from "version-numbers" included above.
 154     VENDOR_URL_BUG="$with_vendor_bug_url"
 155   fi
 156   AC_SUBST(VENDOR_URL_BUG)
 157 
 158   # The vendor VM bug URL, if any
 159   AC_ARG_WITH(vendor-vm-bug-url, [AS_HELP_STRING([--with-vendor-vm-bug-url],
 160       [Sets the bug URL which will be displayed when the VM crashes @<:@not specified@:>@])])
 161   if test "x$with_vendor_vm_bug_url" = xyes; then
 162     AC_MSG_ERROR([--with-vendor-vm-bug-url must have a value])
 163   elif [ ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ]; then
 164     AC_MSG_ERROR([--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url])
 165   else
 166     VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url"
 167   fi
 168   AC_SUBST(VENDOR_URL_VM_BUG)
 169 
 170   # Override version from arguments
 171 
 172   # If --with-version-string is set, process it first. It is possible to
 173   # override parts with more specific flags, since these are processed later.


 486       VERSION_DATE="$with_version_date"
 487     fi
 488   else
 489     VERSION_DATE="$DEFAULT_VERSION_DATE"
 490   fi
 491 
 492   # The vendor version string, if any
 493   AC_ARG_WITH(vendor-version-string, [AS_HELP_STRING([--with-vendor-version-string],
 494       [Set vendor version string @<:@not specified@:>@])])
 495   if test "x$with_vendor_version_string" = xyes; then
 496     AC_MSG_ERROR([--with-vendor-version-string must have a value])
 497   elif [ ! [[ $with_vendor_version_string =~ ^[[:graph:]]*$ ]] ]; then
 498     AC_MSG_ERROR([--with--vendor-version-string contains non-graphical characters: $with_vendor_version_string])
 499   else
 500     VENDOR_VERSION_STRING="$with_vendor_version_string"
 501   fi
 502 
 503   # We could define --with flags for these, if really needed
 504   VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
 505   VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
 506   JDK_SOURCE_TARGET_VERSION="$DEFAULT_JDK_SOURCE_TARGET_VERSION"
 507 
 508   AC_MSG_CHECKING([for version string])
 509   AC_MSG_RESULT([$VERSION_STRING])
 510 
 511   AC_SUBST(VERSION_FEATURE)
 512   AC_SUBST(VERSION_INTERIM)
 513   AC_SUBST(VERSION_UPDATE)
 514   AC_SUBST(VERSION_PATCH)
 515   AC_SUBST(VERSION_EXTRA1)
 516   AC_SUBST(VERSION_EXTRA2)
 517   AC_SUBST(VERSION_EXTRA3)
 518   AC_SUBST(VERSION_PRE)
 519   AC_SUBST(VERSION_BUILD)
 520   AC_SUBST(VERSION_OPT)
 521   AC_SUBST(VERSION_NUMBER)
 522   AC_SUBST(VERSION_NUMBER_FOUR_POSITIONS)
 523   AC_SUBST(VERSION_STRING)
 524   AC_SUBST(VERSION_SHORT)
 525   AC_SUBST(VERSION_IS_GA)
 526   AC_SUBST(VERSION_DATE)
 527   AC_SUBST(VENDOR_VERSION_STRING)
 528   AC_SUBST(VERSION_CLASSFILE_MAJOR)
 529   AC_SUBST(VERSION_CLASSFILE_MINOR)
 530   AC_SUBST(JDK_SOURCE_TARGET_VERSION)
 531 ])
   1 #
   2 # Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   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
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  49   if test $cleaned_value -gt 255; then
  50     AC_MSG_ERROR([$1 is given as $2. This is greater than 255 which is not allowed.])
  51   fi
  52   if test "x$cleaned_value" != "x$2"; then
  53     AC_MSG_WARN([Value for $1 has been sanitized from '$2' to '$cleaned_value'])
  54   fi
  55   $1=$cleaned_value
  56 ])
  57 
  58 AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
  59 [
  60   # Source the version numbers file
  61   . $AUTOCONF_DIR/version-numbers
  62 
  63   # Some non-version number information is set in that file
  64   AC_SUBST(LAUNCHER_NAME)
  65   AC_SUBST(PRODUCT_NAME)
  66   AC_SUBST(PRODUCT_SUFFIX)
  67   AC_SUBST(JDK_RC_PLATFORM_NAME)
  68   AC_SUBST(HOTSPOT_VM_DISTRO)













  69   AC_SUBST(MACOSX_BUNDLE_NAME_BASE)













  70   AC_SUBST(MACOSX_BUNDLE_ID_BASE)
  71 

















  72   # The vendor name, if any
  73   AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name],
  74       [Set vendor name. Among others, used to set the 'java.vendor'
  75        and 'java.vm.vendor' system properties. @<:@not specified@:>@])])
  76   if test "x$with_vendor_name" = xyes; then
  77     AC_MSG_ERROR([--with-vendor-name must have a value])
  78   elif [ ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ]; then
  79     AC_MSG_ERROR([--with-vendor-name contains non-printing characters: $with_vendor_name])
  80   elif test "x$with_vendor_name" != x; then
  81     # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
  82     # Otherwise we will use the value from "version-numbers" included above.
  83     COMPANY_NAME="$with_vendor_name"
  84   fi
  85   AC_SUBST(COMPANY_NAME)
  86 
  87   # The vendor URL, if any
  88   AC_ARG_WITH(vendor-url, [AS_HELP_STRING([--with-vendor-url],
  89       [Set the 'java.vendor.url' system property @<:@not specified@:>@])])
  90   if test "x$with_vendor_url" = xyes; then
  91     AC_MSG_ERROR([--with-vendor-url must have a value])
  92   elif [ ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ]; then
  93     AC_MSG_ERROR([--with-vendor-url contains non-printing characters: $with_vendor_url])
  94   else


  95     VENDOR_URL="$with_vendor_url"
  96   fi
  97   AC_SUBST(VENDOR_URL)
  98 
  99   # The vendor bug URL, if any
 100   AC_ARG_WITH(vendor-bug-url, [AS_HELP_STRING([--with-vendor-bug-url],
 101       [Set the 'java.vendor.url.bug' system property @<:@not specified@:>@])])
 102   if test "x$with_vendor_bug_url" = xyes; then
 103     AC_MSG_ERROR([--with-vendor-bug-url must have a value])
 104   elif [ ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ]; then
 105     AC_MSG_ERROR([--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url])
 106   else


 107     VENDOR_URL_BUG="$with_vendor_bug_url"
 108   fi
 109   AC_SUBST(VENDOR_URL_BUG)
 110 
 111   # The vendor VM bug URL, if any
 112   AC_ARG_WITH(vendor-vm-bug-url, [AS_HELP_STRING([--with-vendor-vm-bug-url],
 113       [Sets the bug URL which will be displayed when the VM crashes @<:@not specified@:>@])])
 114   if test "x$with_vendor_vm_bug_url" = xyes; then
 115     AC_MSG_ERROR([--with-vendor-vm-bug-url must have a value])
 116   elif [ ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ]; then
 117     AC_MSG_ERROR([--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url])
 118   else
 119     VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url"
 120   fi
 121   AC_SUBST(VENDOR_URL_VM_BUG)
 122 
 123   # Override version from arguments
 124 
 125   # If --with-version-string is set, process it first. It is possible to
 126   # override parts with more specific flags, since these are processed later.


 439       VERSION_DATE="$with_version_date"
 440     fi
 441   else
 442     VERSION_DATE="$DEFAULT_VERSION_DATE"
 443   fi
 444 
 445   # The vendor version string, if any
 446   AC_ARG_WITH(vendor-version-string, [AS_HELP_STRING([--with-vendor-version-string],
 447       [Set vendor version string @<:@not specified@:>@])])
 448   if test "x$with_vendor_version_string" = xyes; then
 449     AC_MSG_ERROR([--with-vendor-version-string must have a value])
 450   elif [ ! [[ $with_vendor_version_string =~ ^[[:graph:]]*$ ]] ]; then
 451     AC_MSG_ERROR([--with--vendor-version-string contains non-graphical characters: $with_vendor_version_string])
 452   else
 453     VENDOR_VERSION_STRING="$with_vendor_version_string"
 454   fi
 455 
 456   # We could define --with flags for these, if really needed
 457   VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
 458   VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"

 459 
 460   AC_MSG_CHECKING([for version string])
 461   AC_MSG_RESULT([$VERSION_STRING])
 462 
 463   AC_SUBST(VERSION_FEATURE)
 464   AC_SUBST(VERSION_INTERIM)
 465   AC_SUBST(VERSION_UPDATE)
 466   AC_SUBST(VERSION_PATCH)
 467   AC_SUBST(VERSION_EXTRA1)
 468   AC_SUBST(VERSION_EXTRA2)
 469   AC_SUBST(VERSION_EXTRA3)
 470   AC_SUBST(VERSION_PRE)
 471   AC_SUBST(VERSION_BUILD)
 472   AC_SUBST(VERSION_OPT)
 473   AC_SUBST(VERSION_NUMBER)
 474   AC_SUBST(VERSION_NUMBER_FOUR_POSITIONS)
 475   AC_SUBST(VERSION_STRING)
 476   AC_SUBST(VERSION_SHORT)
 477   AC_SUBST(VERSION_IS_GA)
 478   AC_SUBST(VERSION_DATE)
 479   AC_SUBST(VENDOR_VERSION_STRING)
 480   AC_SUBST(VERSION_CLASSFILE_MAJOR)
 481   AC_SUBST(VERSION_CLASSFILE_MINOR)
 482 
 483 ])
< prev index next >