1 #
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.
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
97 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
98 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
99 if test "x$COUNT_VARIANTS" != "x,1"; then
100 BUILDING_MULTIPLE_JVM_VARIANTS=yes
101 else
102 BUILDING_MULTIPLE_JVM_VARIANTS=no
103 fi
104
105 if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
106 AC_MSG_ERROR([You cannot build multiple variants with zero.])
107 fi
108
109 AC_SUBST(JVM_VARIANTS)
110 AC_SUBST(JVM_VARIANT_SERVER)
111 AC_SUBST(JVM_VARIANT_CLIENT)
112 AC_SUBST(JVM_VARIANT_MINIMAL1)
113 AC_SUBST(JVM_VARIANT_ZERO)
114 AC_SUBST(JVM_VARIANT_ZEROSHARK)
115 AC_SUBST(JVM_VARIANT_CORE)
116
117 INCLUDE_SA=true
118 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
119 INCLUDE_SA=false
120 fi
121 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
122 INCLUDE_SA=false
123 fi
124 if test "x$OPENJDK_TARGET_OS" = xaix ; then
125 INCLUDE_SA=false
126 fi
127 if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
128 INCLUDE_SA=false
129 fi
130 AC_SUBST(INCLUDE_SA)
131
132 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
133 MACOSX_UNIVERSAL="true"
134 fi
135
136 AC_SUBST(MACOSX_UNIVERSAL)
137 ])
138
139
140 ###############################################################################
141 # Setup legacy vars/targets and new vars to deal with different debug levels.
142 #
143 # release: no debug information, all optimizations, no asserts.
144 # optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
145 # fastdebug: debug information (-g), all optimizations, all asserts
146 # slowdebug: debug information (-g), no optimizations, all asserts
147 #
148 AC_DEFUN_ONCE([HOTSPOT_SETUP_DEBUG_LEVEL],
|
1 #
2 # Copyright (c) 2011, 2016, 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
97 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
98 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
99 if test "x$COUNT_VARIANTS" != "x,1"; then
100 BUILDING_MULTIPLE_JVM_VARIANTS=yes
101 else
102 BUILDING_MULTIPLE_JVM_VARIANTS=no
103 fi
104
105 if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
106 AC_MSG_ERROR([You cannot build multiple variants with zero.])
107 fi
108
109 AC_SUBST(JVM_VARIANTS)
110 AC_SUBST(JVM_VARIANT_SERVER)
111 AC_SUBST(JVM_VARIANT_CLIENT)
112 AC_SUBST(JVM_VARIANT_MINIMAL1)
113 AC_SUBST(JVM_VARIANT_ZERO)
114 AC_SUBST(JVM_VARIANT_ZEROSHARK)
115 AC_SUBST(JVM_VARIANT_CORE)
116
117 AC_MSG_CHECKING([if servicability agent (jdk.hotspot.agent) should be built])
118 INCLUDE_SA=true
119 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
120 INCLUDE_SA=false
121 fi
122 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
123 INCLUDE_SA=false
124 fi
125 if test "x$OPENJDK_TARGET_OS" = xaix ; then
126 INCLUDE_SA=false
127 fi
128 if test "x$OPENJDK_TARGET_OS_ENV" = xbsd.openbsd || test "x$OPENJDK_TARGET_OS_ENV" = xbsd.netbsd; then
129 INCLUDE_SA=false
130 fi
131 if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
132 INCLUDE_SA=false
133 fi
134 if test "x$INCLUDE_SA" = xtrue; then
135 AC_MSG_RESULT([yes])
136 else
137 AC_MSG_RESULT([no])
138 fi
139 AC_SUBST(INCLUDE_SA)
140
141 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
142 MACOSX_UNIVERSAL="true"
143 fi
144
145 AC_SUBST(MACOSX_UNIVERSAL)
146 ])
147
148
149 ###############################################################################
150 # Setup legacy vars/targets and new vars to deal with different debug levels.
151 #
152 # release: no debug information, all optimizations, no asserts.
153 # optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
154 # fastdebug: debug information (-g), all optimizations, all asserts
155 # slowdebug: debug information (-g), no optimizations, all asserts
156 #
157 AC_DEFUN_ONCE([HOTSPOT_SETUP_DEBUG_LEVEL],
|