common/autoconf/jdk-options.m4
author amurillo
Mon, 01 Feb 2016 10:07:35 -0800
changeset 35443 d0ab5664b35a
parent 35032 c2f315819691
child 35747 aeaa6d0101a8
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     1
#
33926
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
     2
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     4
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    10
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    15
# accompanied this code).
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    16
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    20
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    23
# questions.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    24
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    25
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    26
###############################################################################
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    27
# Check which variant of the JDK that we want to build.
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    28
# Currently we have:
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    29
#    normal:   standard edition
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    30
# but the custom make system may add other variants
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    31
#
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    32
# Effectively the JDK variant gives a name to a specific set of
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    33
# modules to compile into the JDK.
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    34
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    35
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    36
  AC_MSG_CHECKING([which variant of the JDK to build])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    37
  AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    38
      [JDK variant to build (normal) @<:@normal@:>@])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    39
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    40
  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    41
    JDK_VARIANT="normal"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    42
  else
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    43
    AC_MSG_ERROR([The available JDK variants are: normal])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    44
  fi
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    45
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    46
  AC_SUBST(JDK_VARIANT)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    47
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    48
  AC_MSG_RESULT([$JDK_VARIANT])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    49
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    50
22460
0273c023680c 8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents: 17819
diff changeset
    51
###############################################################################
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    52
# Set the debug level
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    53
#    release: no debug information, all optimizations, no asserts.
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    54
#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    55
#    fastdebug: debug information (-g), all optimizations, all asserts
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34495
diff changeset
    56
#    slowdebug: debug information (-g), no optimizations, all asserts
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    57
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    58
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    59
  DEBUG_LEVEL="release"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    60
  AC_MSG_CHECKING([which debug level to use])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    61
  AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    62
      [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    63
      [
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    64
        ENABLE_DEBUG="${enableval}"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    65
        DEBUG_LEVEL="fastdebug"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    66
      ], [ENABLE_DEBUG="no"])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    67
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    68
  AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
23424
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
    69
      [set the debug level (release, fastdebug, slowdebug, optimized (HotSpot build only)) @<:@release@:>@])],
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    70
      [
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    71
        DEBUG_LEVEL="${withval}"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    72
        if test "x$ENABLE_DEBUG" = xyes; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    73
          AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    74
        fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    75
      ])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    76
  AC_MSG_RESULT([$DEBUG_LEVEL])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    77
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    78
  if test "x$DEBUG_LEVEL" != xrelease && \
23424
65039fb99fda 8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
simonis
parents: 22721
diff changeset
    79
      test "x$DEBUG_LEVEL" != xoptimized && \
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    80
      test "x$DEBUG_LEVEL" != xfastdebug && \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    81
      test "x$DEBUG_LEVEL" != xslowdebug; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    82
    AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    83
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    84
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    85
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    86
###############################################################################
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    87
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    88
# Should we build only OpenJDK even if closed sources are present?
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    89
#
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
    90
AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
    91
[
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
    92
  AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
    93
      [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    94
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
    95
  AC_MSG_CHECKING([for presence of closed sources])
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
    96
  if test -d "$SRC_ROOT/jdk/src/closed"; then
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    97
    CLOSED_SOURCE_PRESENT=yes
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
    98
  else
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    99
    CLOSED_SOURCE_PRESENT=no
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   100
  fi
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   101
  AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   102
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   103
  AC_MSG_CHECKING([if closed source is suppressed (openjdk-only)])
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   104
  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   105
  AC_MSG_RESULT([$SUPPRESS_CLOSED_SOURCE])
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   106
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   107
  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   108
    OPENJDK=true
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   109
    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   110
      AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   111
    fi
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   112
  else
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   113
    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   114
      OPENJDK=true
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   115
    else
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   116
      OPENJDK=false
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   117
    fi
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   118
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   119
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   120
  if test "x$OPENJDK" = "xtrue"; then
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   121
    SET_OPENJDK="OPENJDK=true"
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   122
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   123
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   124
  AC_SUBST(SET_OPENJDK)
22714
a752920c4317 8034191: Move relevant parts of build system to new closed repo
ihse
parents: 22709
diff changeset
   125
a752920c4317 8034191: Move relevant parts of build system to new closed repo
ihse
parents: 22709
diff changeset
   126
  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
a752920c4317 8034191: Move relevant parts of build system to new closed repo
ihse
parents: 22709
diff changeset
   127
  # the IncludeCustomExtension macro.
a752920c4317 8034191: Move relevant parts of build system to new closed repo
ihse
parents: 22709
diff changeset
   128
  BASIC_DEPRECATED_ARG_WITH(custom-make-dir)
15069
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   129
])
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   130
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   131
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
c6dab988d808 8005850: build-infra: Make --enable-openjdk-only really disable custom
erikj
parents: 15067
diff changeset
   132
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   133
  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   134
  # We always build headless support.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   135
  AC_MSG_CHECKING([headful support])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   136
  AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   137
      [disable building headful support (graphical UI support) @<:@enabled@:>@])],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   138
      [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   139
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   140
  SUPPORT_HEADLESS=yes
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   141
  BUILD_HEADLESS="BUILD_HEADLESS:=true"
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   142
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   143
  if test "x$SUPPORT_HEADFUL" = xyes; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   144
    # We are building both headful and headless.
20273
126644dde85d 8008944: Correct typos
ihse
parents: 19764
diff changeset
   145
    headful_msg="include support for both headful and headless"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   146
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   147
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   148
  if test "x$SUPPORT_HEADFUL" = xno; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   149
    # Thus we are building headless only.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   150
    BUILD_HEADLESS="BUILD_HEADLESS:=true"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   151
    headful_msg="headless only"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   152
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   153
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   154
  AC_MSG_RESULT([$headful_msg])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   155
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   156
  AC_SUBST(SUPPORT_HEADLESS)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   157
  AC_SUBST(SUPPORT_HEADFUL)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   158
  AC_SUBST(BUILD_HEADLESS)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   159
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   160
  # Choose cacerts source file
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   161
  AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   162
      [specify alternative cacerts file])])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   163
  if test "x$with_cacerts_file" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   164
    CACERTS_FILE=$with_cacerts_file
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   165
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   166
  AC_SUBST(CACERTS_FILE)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   167
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   168
  # Enable or disable unlimited crypto
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   169
  AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   170
      [Enable unlimited crypto policy @<:@disabled@:>@])],,
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   171
      [enable_unlimited_crypto=no])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   172
  if test "x$enable_unlimited_crypto" = "xyes"; then
14112
1b447f5cb0d1 8001897: build-infra: misc adjustments to configure script
ihse
parents: 14111
diff changeset
   173
    UNLIMITED_CRYPTO=true
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   174
  else
14112
1b447f5cb0d1 8001897: build-infra: misc adjustments to configure script
ihse
parents: 14111
diff changeset
   175
    UNLIMITED_CRYPTO=false
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   176
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   177
  AC_SUBST(UNLIMITED_CRYPTO)
14112
1b447f5cb0d1 8001897: build-infra: misc adjustments to configure script
ihse
parents: 14111
diff changeset
   178
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   179
  # Compress jars
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   180
  COMPRESS_JARS=false
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   181
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   182
  AC_SUBST(COMPRESS_JARS)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   183
33926
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   184
  # Setup default copyright year. Mostly overridden when building close to a new year.
27584
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   185
  AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   186
      [Set copyright year value for build @<:@current year@:>@])])
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   187
  if test "x$with_copyright_year" = xyes; then
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   188
    AC_MSG_ERROR([Copyright year must have a value])
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   189
  elif test "x$with_copyright_year" != x; then
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   190
    COPYRIGHT_YEAR="$with_copyright_year"
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   191
  else
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   192
    COPYRIGHT_YEAR=`date +'%Y'`
01a719b65d1e 8065183: Add --with-copyright-year option to configure
erikj
parents: 27133
diff changeset
   193
  fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   194
  AC_SUBST(COPYRIGHT_YEAR)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   195
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   196
33926
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   197
###############################################################################
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   198
#
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   199
# Enable or disable the elliptic curve crypto implementation
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   200
#
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   201
AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   202
[
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   203
  AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   204
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   205
  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   206
    ENABLE_INTREE_EC=yes
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   207
    AC_MSG_RESULT([yes])
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   208
  else
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   209
    ENABLE_INTREE_EC=no
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   210
    AC_MSG_RESULT([no])
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   211
  fi
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   212
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   213
  AC_SUBST(ENABLE_INTREE_EC)
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   214
])
3a19edba4808 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 29305
diff changeset
   215
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   216
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   217
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   218
  #
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   219
  # NATIVE_DEBUG_SYMBOLS
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   220
  # This must be done after the toolchain is setup, since we're looking at objcopy.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   221
  #
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   222
  AC_MSG_CHECKING([what type of native debug symbols to use])
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   223
  AC_ARG_WITH([native-debug-symbols],
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   224
      [AS_HELP_STRING([--with-native-debug-symbols],
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   225
      [set the native debug symbol configuration (none, internal, external, zipped) @<:@zipped@:>@])],
34605
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   226
      [
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   227
        if test "x$OPENJDK_TARGET_OS" = xaix; then
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   228
          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   229
            AC_MSG_ERROR([AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols])
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   230
          fi
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   231
        fi
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   232
      ],
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   233
      [
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   234
        if test "x$OPENJDK_TARGET_OS" = xaix; then
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   235
          # AIX doesn't support 'zipped' so use 'internal' as default
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   236
          with_native_debug_symbols="internal"
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   237
        else
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   238
          with_native_debug_symbols="zipped"
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   239
        fi
60c12f0860d6 8145560: AIX: change '8036003: Add --with-debug-symbols' broke AIX build
simonis
parents: 34596
diff changeset
   240
      ])
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   241
  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   242
  AC_MSG_RESULT([$NATIVE_DEBUG_SYMBOLS])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   243
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   244
  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   245
34495
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   246
    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   247
      if test "x$OBJCOPY" = x; then
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   248
        # enabling of enable-debug-symbols and can't find objcopy
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   249
        # this is an error
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   250
        AC_MSG_ERROR([Unable to find objcopy, cannot enable native debug symbols])
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   251
      fi
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   252
    fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   253
35032
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   254
    COMPILE_WITH_DEBUG_SYMBOLS=true
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   255
    COPY_DEBUG_SYMBOLS=true
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   256
    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   257
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   258
    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
35010
d0e2516cc2a2 8145564: 8036003: startup regression on linux fastdebug builds
erikj
parents: 34495
diff changeset
   259
    DEBUG_BINARIES=false
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   260
    STRIP_POLICY=min_strip
35032
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   261
    
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   262
  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
35032
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   263
    COMPILE_WITH_DEBUG_SYMBOLS=false
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   264
    COPY_DEBUG_SYMBOLS=false
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   265
    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   266
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   267
    DEBUG_BINARIES=false
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   268
    STRIP_POLICY=no_strip
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   269
  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
35032
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   270
    COMPILE_WITH_DEBUG_SYMBOLS=true
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   271
    COPY_DEBUG_SYMBOLS=false
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   272
    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   273
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   274
    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   275
    DEBUG_BINARIES=true
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   276
    STRIP_POLICY=no_strip
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   277
    STRIP=""
35032
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   278
    
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   279
  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   280
34495
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   281
    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   282
      if test "x$OBJCOPY" = x; then
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   283
        # enabling of enable-debug-symbols and can't find objcopy
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   284
        # this is an error
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   285
        AC_MSG_ERROR([Unable to find objcopy, cannot enable native debug symbols])
b8008470cbd0 8145206: Configure broken on Macosx
erikj
parents: 34493
diff changeset
   286
      fi
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   287
    fi
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   288
35032
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   289
    COMPILE_WITH_DEBUG_SYMBOLS=true
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   290
    COPY_DEBUG_SYMBOLS=true
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   291
    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   292
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   293
    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
35010
d0e2516cc2a2 8145564: 8036003: startup regression on linux fastdebug builds
erikj
parents: 34495
diff changeset
   294
    DEBUG_BINARIES=false
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   295
    STRIP_POLICY=min_strip
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   296
  else
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   297
    AC_MSG_ERROR([Allowed native debug symbols are: none, internal, external, zipped])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20275
diff changeset
   298
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   299
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   300
  # --enable-debug-symbols is deprecated.
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   301
  # Please use --with-native-debug-symbols=[internal,external,zipped] .
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   302
  BASIC_DEPRECATED_ARG_ENABLE(debug-symbols, debug_symbols,
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   303
        [Please use --with-native-debug-symbols=[[internal,external,zipped]] .])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   304
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   305
  # --enable-zip-debug-info is deprecated.
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   306
  # Please use --with-native-debug-symbols=zipped .
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   307
  BASIC_DEPRECATED_ARG_ENABLE(zip-debug-info, zip_debug_info,
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   308
                              [Please use --with-native-debug-symbols=zipped .])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   309
35032
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   310
  AC_SUBST(COMPILE_WITH_DEBUG_SYMBOLS)
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   311
  AC_SUBST(COPY_DEBUG_SYMBOLS)
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   312
  AC_SUBST(ZIP_EXTERNAL_DEBUG_SYMBOLS)
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   313
c2f315819691 8145596: Enable debug symbols for all libraries
ihse
parents: 35014
diff changeset
   314
  # Legacy values
34493
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   315
  AC_SUBST(DEBUG_BINARIES)
c68e0ab807d8 8036003: Add --with-debug-symbols=[none|internal|external|zipped]
ysuenaga
parents: 33954
diff changeset
   316
  AC_SUBST(STRIP_POLICY)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   317
])
29305
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   318
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   319
################################################################################
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   320
#
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   321
# Gcov coverage data for hotspot
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   322
#
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   323
AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   324
[
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   325
  AC_ARG_ENABLE(native-coverage, [AS_HELP_STRING([--enable-native-coverage],
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   326
      [enable native compilation with code coverage data@<:@disabled@:>@])])
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   327
  GCOV_ENABLED="false"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   328
  if test "x$enable_native_coverage" = "xyes"; then
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   329
    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   330
      AC_MSG_CHECKING([if native coverage is enabled])
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   331
      AC_MSG_RESULT([yes])
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   332
      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   333
      GCOV_LDFLAGS="-fprofile-arcs"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   334
      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   335
      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   336
      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   337
      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   338
      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   339
      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   340
      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   341
      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   342
      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   343
      GCOV_ENABLED="true"
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   344
    else
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   345
      AC_MSG_ERROR([--enable-native-coverage only works with toolchain type gcc])
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   346
    fi
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   347
  elif test "x$enable_native_coverage" = "xno"; then
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   348
    AC_MSG_CHECKING([if native coverage is enabled])
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   349
    AC_MSG_RESULT([no])
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   350
  elif test "x$enable_native_coverage" != "x"; then
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   351
    AC_MSG_ERROR([--enable-native-coverage can only be assigned "yes" or "no"])
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   352
  fi
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   353
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   354
  AC_SUBST(GCOV_ENABLED)
4ddc6faf7842 8073021: add native code coverage target into makefiles
erikj
parents: 29162
diff changeset
   355
])
33562
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   356
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   357
################################################################################
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   358
#
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   359
# Static build support.  When enabled will generate static 
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   360
# libraries instead of shared libraries for all JDK libs.
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   361
#
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   362
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   363
[
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   364
  AC_ARG_ENABLE([static-build], [AS_HELP_STRING([--enable-static-build],
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   365
    [enable static library build @<:@disabled@:>@])])
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   366
  STATIC_BUILD=false
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   367
  if test "x$enable_static_build" = "xyes"; then
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   368
    AC_MSG_CHECKING([if static build is enabled])
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   369
    AC_MSG_RESULT([yes])
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   370
    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   371
      AC_MSG_ERROR([--enable-static-build is only supported for macosx builds])
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   372
    fi
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   373
    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   374
    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   375
    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   376
    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   377
    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   378
    STATIC_BUILD=true
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   379
  elif test "x$enable_static_build" = "xno"; then
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   380
    AC_MSG_CHECKING([if static build is enabled])
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   381
    AC_MSG_RESULT([no])
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   382
  elif test "x$enable_static_build" != "x"; then
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   383
    AC_MSG_ERROR([--enable-static-build can only be assigned "yes" or "no"])
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   384
  fi
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   385
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   386
  AC_SUBST(STATIC_BUILD)
c76b2fa11486 8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents: 32554
diff changeset
   387
])