|
1 # |
|
2 # Copyright (c) 2011, 2012, 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 |
|
23 # questions. |
|
24 # |
|
25 |
|
26 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT], |
|
27 [ |
|
28 ############################################################################### |
|
29 # |
|
30 # Check which variant of the JDK that we want to build. |
|
31 # Currently we have: |
|
32 # normal: standard edition |
|
33 # embedded: cut down to a smaller footprint |
|
34 # |
|
35 # Effectively the JDK variant gives a name to a specific set of |
|
36 # modules to compile into the JDK. In the future, these modules |
|
37 # might even be Jigsaw modules. |
|
38 # |
|
39 AC_MSG_CHECKING([which variant of the JDK to build]) |
|
40 AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant], |
|
41 [JDK variant to build (normal, embedded) @<:@normal@:>@])]) |
|
42 |
|
43 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then |
|
44 JAVASE_EMBEDDED="" |
|
45 MINIMIZE_RAM_USAGE="" |
|
46 JDK_VARIANT="normal" |
|
47 elif test "x$with_jdk_variant" = xembedded; then |
|
48 JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true" |
|
49 MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true" |
|
50 JDK_VARIANT="embedded" |
|
51 else |
|
52 AC_MSG_ERROR([The available JDK variants are: normal, embedded]) |
|
53 fi |
|
54 |
|
55 AC_SUBST(JAVASE_EMBEDDED) |
|
56 AC_SUBST(MINIMIZE_RAM_USAGE) |
|
57 AC_SUBST(JDK_VARIANT) |
|
58 |
|
59 AC_MSG_RESULT([$JDK_VARIANT]) |
|
60 ]) |
|
61 |
|
62 AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS], |
|
63 [ |
|
64 |
|
65 ############################################################################### |
|
66 # |
|
67 # Check which variants of the JVM that we want to build. |
|
68 # Currently we have: |
|
69 # server: normal interpreter and a tiered C1/C2 compiler |
|
70 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) |
|
71 # kernel: kernel footprint JVM that passes the TCK without major performance problems, |
|
72 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc |
|
73 # zero: no machine code interpreter, no compiler |
|
74 # zeroshark: zero interpreter and shark/llvm compiler backend |
|
75 AC_MSG_CHECKING([which variants of the JVM that should be built]) |
|
76 AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], |
|
77 [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])]) |
|
78 |
|
79 if test "x$with_jvm_variants" = x; then |
|
80 if test "x$JDK_VARIANT" = xembedded; then |
|
81 with_jvm_variants="client" |
|
82 else |
|
83 with_jvm_variants="server" |
|
84 fi |
|
85 fi |
|
86 |
|
87 JVM_VARIANTS=",$with_jvm_variants," |
|
88 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` |
|
89 |
|
90 if test "x$TEST_VARIANTS" != "x,"; then |
|
91 AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark]) |
|
92 fi |
|
93 AC_MSG_RESULT([$with_jvm_variants]) |
|
94 |
|
95 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` |
|
96 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` |
|
97 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` |
|
98 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` |
|
99 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` |
|
100 |
|
101 if test "x$JVM_VARIANT_CLIENT" = xtrue; then |
|
102 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
|
103 AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) |
|
104 fi |
|
105 fi |
|
106 if test "x$JVM_VARIANT_KERNEL" = xtrue; then |
|
107 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
|
108 AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) |
|
109 fi |
|
110 fi |
|
111 |
|
112 # Replace the commas with AND for use in the build directory name. |
|
113 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` |
|
114 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` |
|
115 if test "x$COUNT_VARIANTS" != "x,1"; then |
|
116 BUILDING_MULTIPLE_JVM_VARIANTS=yes |
|
117 else |
|
118 BUILDING_MULTIPLE_JVM_VARIANTS=no |
|
119 fi |
|
120 |
|
121 AC_SUBST(JVM_VARIANTS) |
|
122 AC_SUBST(JVM_VARIANT_SERVER) |
|
123 AC_SUBST(JVM_VARIANT_CLIENT) |
|
124 AC_SUBST(JVM_VARIANT_KERNEL) |
|
125 AC_SUBST(JVM_VARIANT_ZERO) |
|
126 AC_SUBST(JVM_VARIANT_ZEROSHARK) |
|
127 |
|
128 |
|
129 ]) |
|
130 |
|
131 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL], |
|
132 [ |
|
133 ############################################################################### |
|
134 # |
|
135 # Set the debug level |
|
136 # release: no debug information, all optimizations, no asserts. |
|
137 # fastdebug: debug information (-g), all optimizations, all asserts |
|
138 # slowdebug: debug information (-g), no optimizations, all asserts |
|
139 # |
|
140 DEBUG_LEVEL="release" |
|
141 AC_MSG_CHECKING([which debug level to use]) |
|
142 AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], |
|
143 [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])], |
|
144 [ |
|
145 ENABLE_DEBUG="${enableval}" |
|
146 DEBUG_LEVEL="fastdebug" |
|
147 ], [ENABLE_DEBUG="no"]) |
|
148 |
|
149 AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level], |
|
150 [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])], |
|
151 [ |
|
152 DEBUG_LEVEL="${withval}" |
|
153 if test "x$ENABLE_DEBUG" = xyes; then |
|
154 AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.]) |
|
155 fi |
|
156 ]) |
|
157 AC_MSG_RESULT([$DEBUG_LEVEL]) |
|
158 |
|
159 if test "x$DEBUG_LEVEL" != xrelease && \ |
|
160 test "x$DEBUG_LEVEL" != xfastdebug && \ |
|
161 test "x$DEBUG_LEVEL" != xslowdebug; then |
|
162 AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug]) |
|
163 fi |
|
164 |
|
165 |
|
166 ############################################################################### |
|
167 # |
|
168 # Setup legacy vars/targets and new vars to deal with different debug levels. |
|
169 # |
|
170 |
|
171 case $DEBUG_LEVEL in |
|
172 release ) |
|
173 VARIANT="OPT" |
|
174 FASTDEBUG="false" |
|
175 DEBUG_CLASSFILES="false" |
|
176 BUILD_VARIANT_RELEASE="" |
|
177 HOTSPOT_DEBUG_LEVEL="product" |
|
178 HOTSPOT_EXPORT="product" |
|
179 ;; |
|
180 fastdebug ) |
|
181 VARIANT="DBG" |
|
182 FASTDEBUG="true" |
|
183 DEBUG_CLASSFILES="true" |
|
184 BUILD_VARIANT_RELEASE="-fastdebug" |
|
185 HOTSPOT_DEBUG_LEVEL="fastdebug" |
|
186 HOTSPOT_EXPORT="fastdebug" |
|
187 ;; |
|
188 slowdebug ) |
|
189 VARIANT="DBG" |
|
190 FASTDEBUG="false" |
|
191 DEBUG_CLASSFILES="true" |
|
192 BUILD_VARIANT_RELEASE="-debug" |
|
193 HOTSPOT_DEBUG_LEVEL="jvmg" |
|
194 HOTSPOT_EXPORT="debug" |
|
195 ;; |
|
196 esac |
|
197 |
|
198 ##### |
|
199 # Generate the legacy makefile targets for hotspot. |
|
200 # The hotspot api for selecting the build artifacts, really, needs to be improved. |
|
201 # |
|
202 HOTSPOT_TARGET="" |
|
203 |
|
204 if test "x$JVM_VARIANT_SERVER" = xtrue; then |
|
205 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " |
|
206 fi |
|
207 |
|
208 if test "x$JVM_VARIANT_CLIENT" = xtrue; then |
|
209 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " |
|
210 fi |
|
211 |
|
212 if test "x$JVM_VARIANT_KERNEL" = xtrue; then |
|
213 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " |
|
214 fi |
|
215 |
|
216 if test "x$JVM_VARIANT_ZERO" = xtrue; then |
|
217 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " |
|
218 fi |
|
219 |
|
220 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then |
|
221 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " |
|
222 fi |
|
223 |
|
224 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" |
|
225 |
|
226 ##### |
|
227 |
|
228 AC_SUBST(DEBUG_LEVEL) |
|
229 AC_SUBST(VARIANT) |
|
230 AC_SUBST(FASTDEBUG) |
|
231 AC_SUBST(DEBUG_CLASSFILES) |
|
232 AC_SUBST(BUILD_VARIANT_RELEASE) |
|
233 ]) |
|
234 |
|
235 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], |
|
236 [ |
|
237 |
|
238 ############################################################################### |
|
239 # |
|
240 # Should we build only OpenJDK even if closed sources are present? |
|
241 # |
|
242 AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], |
|
243 [build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,) |
|
244 |
|
245 if test "x$enable_openjdk_only" = "xyes"; then |
|
246 OPENJDK=true |
|
247 elif test "x$enable_openjdk_only" = "xno"; then |
|
248 OPENJDK=false |
|
249 elif test -d "$SRC_ROOT/jdk/src/closed"; then |
|
250 OPENJDK=false |
|
251 else |
|
252 OPENJDK=true |
|
253 fi |
|
254 |
|
255 if test "x$OPENJDK" = "xtrue"; then |
|
256 SET_OPENJDK=OPENJDK=true |
|
257 fi |
|
258 |
|
259 AC_SUBST(SET_OPENJDK) |
|
260 |
|
261 ############################################################################### |
|
262 # |
|
263 # JIGSAW or not. The JIGSAW variable is used during the intermediate |
|
264 # stage when we are building both the old style JDK and the new style modularized JDK. |
|
265 # When the modularized JDK is finalized, this option will go away. |
|
266 # |
|
267 AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw], |
|
268 [build Jigsaw images (not yet available) @<:@disabled@:>@])],,) |
|
269 |
|
270 if test "x$enable_jigsaw" = "xyes"; then |
|
271 JIGSAW=true |
|
272 else |
|
273 JIGSAW=false |
|
274 fi |
|
275 AC_SUBST(JIGSAW) |
|
276 |
|
277 ############################################################################### |
|
278 # |
|
279 # Should we build a JDK/JVM with headful support (ie a graphical ui)? |
|
280 # We always build headless support. |
|
281 # |
|
282 AC_MSG_CHECKING([headful support]) |
|
283 AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful], |
|
284 [build headful support (graphical UI support) @<:@enabled@:>@])], |
|
285 [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes]) |
|
286 |
|
287 SUPPORT_HEADLESS=yes |
|
288 BUILD_HEADLESS="BUILD_HEADLESS:=true" |
|
289 |
|
290 if test "x$SUPPORT_HEADFUL" = xyes; then |
|
291 # We are building both headful and headless. |
|
292 BUILD_HEADLESS_ONLY="" |
|
293 headful_msg="inlude support for both headful and headless" |
|
294 fi |
|
295 |
|
296 if test "x$SUPPORT_HEADFUL" = xno; then |
|
297 # Thus we are building headless only. |
|
298 BUILD_HEADLESS="BUILD_HEADLESS:=true" |
|
299 BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true" |
|
300 headful_msg="headless only" |
|
301 fi |
|
302 |
|
303 AC_MSG_RESULT([$headful_msg]) |
|
304 |
|
305 AC_SUBST(SUPPORT_HEADLESS) |
|
306 AC_SUBST(SUPPORT_HEADFUL) |
|
307 AC_SUBST(BUILD_HEADLESS) |
|
308 AC_SUBST(BUILD_HEADLESS_ONLY) |
|
309 |
|
310 ############################################################################### |
|
311 # |
|
312 # Should we run the painfully slow javadoc tool? |
|
313 # |
|
314 AC_MSG_CHECKING([whether to build documentation]) |
|
315 AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs], |
|
316 [enable generation of Javadoc documentation @<:@disabled@:>@])], |
|
317 [ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no']) |
|
318 AC_MSG_RESULT([$ENABLE_DOCS]) |
|
319 AC_SUBST(ENABLE_DOCS) |
|
320 GENERATE_DOCS=false |
|
321 if test "x$ENABLE_DOCS" = xyes; then |
|
322 GENERATE_DOCS=true |
|
323 fi |
|
324 AC_SUBST(GENERATE_DOCS) |
|
325 |
|
326 ############################################################################### |
|
327 # |
|
328 # Should we compile nimbus swing L&F? We can probably remove this option |
|
329 # since nimbus is officially part of javax now. |
|
330 # |
|
331 AC_MSG_CHECKING([whether to build nimbus L&F]) |
|
332 AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus], |
|
333 [disable Nimbus L&F @<:@enabled@:>@])], |
|
334 [ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes']) |
|
335 AC_MSG_RESULT([$ENABLE_NIMBUS]) |
|
336 DISABLE_NIMBUS= |
|
337 if test "x$ENABLE_NIMBUS" = xno; then |
|
338 DISABLE_NIMBUS=true |
|
339 fi |
|
340 AC_SUBST(DISABLE_NIMBUS) |
|
341 |
|
342 # Control wether Hotspot runs Queens test after build. |
|
343 AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], |
|
344 [enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],, |
|
345 [enable_hotspot_test_in_build=no]) |
|
346 if test "x$enable_hotspot_test_in_build" = "xyes"; then |
|
347 TEST_IN_BUILD=true |
|
348 else |
|
349 TEST_IN_BUILD=false |
|
350 fi |
|
351 AC_SUBST(TEST_IN_BUILD) |
|
352 |
|
353 ############################################################################### |
|
354 # |
|
355 # Choose cacerts source file |
|
356 # |
|
357 AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file], |
|
358 [specify alternative cacerts file])]) |
|
359 if test "x$with_cacerts_file" != x; then |
|
360 CACERTS_FILE=$with_cacerts_file |
|
361 else |
|
362 if test "x$OPENJDK" = "xtrue"; then |
|
363 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts |
|
364 else |
|
365 CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal |
|
366 fi |
|
367 fi |
|
368 AC_SUBST(CACERTS_FILE) |
|
369 |
|
370 ############################################################################### |
|
371 # |
|
372 # Compress jars |
|
373 # |
|
374 COMPRESS_JARS=false |
|
375 |
|
376 # default for embedded is yes... |
|
377 if test "x$JDK_VARIANT" = "xembedded"; then |
|
378 COMPRESS_JARS=true |
|
379 fi |
|
380 AC_SUBST(COMPRESS_JARS) |
|
381 |
|
382 ############################################################################### |
|
383 # |
|
384 # Should we compile JFR |
|
385 # default no, except for on closed-jdk and !embedded |
|
386 # |
|
387 ENABLE_JFR=no |
|
388 |
|
389 # Is the JFR source present |
|
390 |
|
391 # |
|
392 # For closed && !embedded default is yes if the source is present |
|
393 # |
|
394 if test "x${OPENJDK}" != "xtrue" && test "x$JDK_VARIANT" != "xembedded" && test -d "$SRC_ROOT/jdk/src/closed/share/native/oracle/jfr"; then |
|
395 ENABLE_JFR=yes |
|
396 fi |
|
397 |
|
398 AC_MSG_CHECKING([whether to build jfr]) |
|
399 AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr], |
|
400 [enable jfr (default is no)])] |
|
401 [ENABLE_JFR="${enableval}"]) |
|
402 AC_MSG_RESULT([${ENABLE_JFR}]) |
|
403 |
|
404 if test "x$ENABLE_JFR" = "xyes"; then |
|
405 ENABLE_JFR=true |
|
406 elif test "x$ENABLE_JFR" = "xno"; then |
|
407 ENABLE_JFR=false |
|
408 else |
|
409 AC_MSG_ERROR([Invalid argument to --enable-jfr]) |
|
410 fi |
|
411 |
|
412 AC_SUBST(ENABLE_JFR) |
|
413 ]) |
|
414 |
|
415 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], |
|
416 [ |
|
417 # Source the version numbers |
|
418 . $AUTOCONF_DIR/version.numbers |
|
419 if test "x$OPENJDK" = "xfalse"; then |
|
420 . $AUTOCONF_DIR/closed.version.numbers |
|
421 fi |
|
422 # Now set the JDK version, milestone, build number etc. |
|
423 AC_SUBST(JDK_MAJOR_VERSION) |
|
424 AC_SUBST(JDK_MINOR_VERSION) |
|
425 AC_SUBST(JDK_MICRO_VERSION) |
|
426 AC_SUBST(JDK_UPDATE_VERSION) |
|
427 AC_SUBST(JDK_BUILD_NUMBER) |
|
428 AC_SUBST(MILESTONE) |
|
429 AC_SUBST(LAUNCHER_NAME) |
|
430 AC_SUBST(PRODUCT_NAME) |
|
431 AC_SUBST(PRODUCT_SUFFIX) |
|
432 AC_SUBST(JDK_RC_PLATFORM_NAME) |
|
433 AC_SUBST(COMPANY_NAME) |
|
434 |
|
435 COPYRIGHT_YEAR=`date +'%Y'` |
|
436 AC_SUBST(COPYRIGHT_YEAR) |
|
437 |
|
438 RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX" |
|
439 AC_SUBST(RUNTIME_NAME) |
|
440 |
|
441 if test "x$JDK_UPDATE_VERSION" != x; then |
|
442 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" |
|
443 else |
|
444 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" |
|
445 fi |
|
446 AC_SUBST(JDK_VERSION) |
|
447 |
|
448 if test "x$MILESTONE" != x; then |
|
449 RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}" |
|
450 else |
|
451 RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}" |
|
452 fi |
|
453 AC_SUBST(RELEASE) |
|
454 |
|
455 if test "x$JDK_BUILD_NUMBER" != x; then |
|
456 FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}" |
|
457 else |
|
458 JDK_BUILD_NUMBER=b00 |
|
459 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` |
|
460 # Avoid [:alnum:] since it depends on the locale. |
|
461 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` |
|
462 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'` |
|
463 FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}" |
|
464 fi |
|
465 AC_SUBST(FULL_VERSION) |
|
466 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` |
|
467 AC_SUBST(COOKED_BUILD_NUMBER) |
|
468 ]) |
|
469 |
|
470 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS], |
|
471 [ |
|
472 HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET" |
|
473 AC_SUBST(HOTSPOT_MAKE_ARGS) |
|
474 |
|
475 # The name of the Service Agent jar. |
|
476 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" |
|
477 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then |
|
478 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" |
|
479 fi |
|
480 AC_SUBST(SALIB_NAME) |
|
481 |
|
482 ]) |
|
483 |
|
484 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], |
|
485 [ |
|
486 # |
|
487 # ENABLE_DEBUG_SYMBOLS |
|
488 # This must be done after the toolchain is setup, since we're looking at objcopy. |
|
489 # |
|
490 ENABLE_DEBUG_SYMBOLS=default |
|
491 |
|
492 # default on macosx is no... |
|
493 if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
|
494 ENABLE_DEBUG_SYMBOLS=no |
|
495 fi |
|
496 |
|
497 # default for embedded is no... |
|
498 if test "x$JDK_VARIANT" = "xembedded"; then |
|
499 ENABLE_DEBUG_SYMBOLS=no |
|
500 fi |
|
501 |
|
502 AC_ARG_ENABLE([debug-symbols], |
|
503 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])], |
|
504 [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}], |
|
505 ) |
|
506 |
|
507 AC_MSG_CHECKING([if we should generate debug symbols]) |
|
508 |
|
509 if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then |
|
510 # explicit enabling of enable-debug-symbols and can't find objcopy |
|
511 # this is an error |
|
512 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) |
|
513 fi |
|
514 |
|
515 if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then |
|
516 # Default is on if objcopy is found, otherwise off |
|
517 if test "x$OBJCOPY" != x; then |
|
518 ENABLE_DEBUG_SYMBOLS=yes |
|
519 else |
|
520 ENABLE_DEBUG_SYMBOLS=no |
|
521 fi |
|
522 fi |
|
523 |
|
524 AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) |
|
525 |
|
526 # |
|
527 # ZIP_DEBUGINFO_FILES |
|
528 # |
|
529 ZIP_DEBUGINFO_FILES=yes |
|
530 |
|
531 AC_ARG_ENABLE([zip-debug-info], |
|
532 [AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])], |
|
533 [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}], |
|
534 ) |
|
535 |
|
536 AC_MSG_CHECKING([if we should zip debug-info files]) |
|
537 AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES]) |
|
538 |
|
539 # Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes |
|
540 # use that... |
|
541 if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then |
|
542 ZIP_DEBUGINFO_FILES=1 |
|
543 else |
|
544 ZIP_DEBUGINFO_FILES=0 |
|
545 fi |
|
546 |
|
547 AC_SUBST(ENABLE_DEBUG_SYMBOLS) |
|
548 AC_SUBST(ZIP_DEBUGINFO_FILES) |
|
549 AC_SUBST(CFLAGS_DEBUG_SYMBOLS) |
|
550 AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS) |
|
551 ]) |