1 # |
1 # |
2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # |
4 # |
5 # This code is free software; you can redistribute it and/or modify it |
5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as |
6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. Oracle designates this |
7 # published by the Free Software Foundation. Oracle designates this |
233 # On Macosx universal binaries are produced, but they only contain |
233 # On Macosx universal binaries are produced, but they only contain |
234 # 64 bit intel. This invalidates control of which jvms are built |
234 # 64 bit intel. This invalidates control of which jvms are built |
235 # from configure, but only server is valid anyway. Fix this |
235 # from configure, but only server is valid anyway. Fix this |
236 # when hotspot makefiles are rewritten. |
236 # when hotspot makefiles are rewritten. |
237 if test "x$MACOSX_UNIVERSAL" = xtrue; then |
237 if test "x$MACOSX_UNIVERSAL" = xtrue; then |
238 HOTSPOT_TARGET=universal_product |
238 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} |
239 fi |
239 fi |
240 |
240 |
241 ##### |
241 ##### |
242 |
242 |
243 AC_SUBST(DEBUG_LEVEL) |
243 AC_SUBST(DEBUG_LEVEL) |
245 AC_SUBST(FASTDEBUG) |
245 AC_SUBST(FASTDEBUG) |
246 AC_SUBST(DEBUG_CLASSFILES) |
246 AC_SUBST(DEBUG_CLASSFILES) |
247 AC_SUBST(BUILD_VARIANT_RELEASE) |
247 AC_SUBST(BUILD_VARIANT_RELEASE) |
248 ]) |
248 ]) |
249 |
249 |
|
250 |
|
251 ############################################################################### |
|
252 # |
|
253 # Should we build only OpenJDK even if closed sources are present? |
|
254 # |
|
255 AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM], |
|
256 [ |
|
257 AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], |
|
258 [suppress building custom source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"]) |
|
259 |
|
260 AC_MSG_CHECKING([for presence of closed sources]) |
|
261 if test -d "$SRC_ROOT/jdk/src/closed"; then |
|
262 CLOSED_SOURCE_PRESENT=yes |
|
263 else |
|
264 CLOSED_SOURCE_PRESENT=no |
|
265 fi |
|
266 AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT]) |
|
267 |
|
268 AC_MSG_CHECKING([if closed source is suppressed (openjdk-only)]) |
|
269 SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only" |
|
270 AC_MSG_RESULT([$SUPPRESS_CLOSED_SOURCE]) |
|
271 |
|
272 if test "x$CLOSED_SOURCE_PRESENT" = xno; then |
|
273 OPENJDK=true |
|
274 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then |
|
275 AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense]) |
|
276 fi |
|
277 else |
|
278 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then |
|
279 OPENJDK=true |
|
280 else |
|
281 OPENJDK=false |
|
282 fi |
|
283 fi |
|
284 |
|
285 if test "x$OPENJDK" = "xtrue"; then |
|
286 SET_OPENJDK="OPENJDK=true" |
|
287 fi |
|
288 |
|
289 AC_SUBST(SET_OPENJDK) |
|
290 ]) |
|
291 |
250 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], |
292 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], |
251 [ |
293 [ |
252 |
|
253 ############################################################################### |
|
254 # |
|
255 # Should we build only OpenJDK even if closed sources are present? |
|
256 # |
|
257 AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], |
|
258 [supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"]) |
|
259 |
|
260 AC_MSG_CHECKING([for presence of closed sources]) |
|
261 if test -d "$SRC_ROOT/jdk/src/closed"; then |
|
262 CLOSED_SOURCE_PRESENT=yes |
|
263 else |
|
264 CLOSED_SOURCE_PRESENT=no |
|
265 fi |
|
266 AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT]) |
|
267 |
|
268 AC_MSG_CHECKING([if closed source is supressed (openjdk-only)]) |
|
269 SUPRESS_CLOSED_SOURCE="$enable_openjdk_only" |
|
270 AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE]) |
|
271 |
|
272 if test "x$CLOSED_SOURCE_PRESENT" = xno; then |
|
273 OPENJDK=true |
|
274 if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then |
|
275 AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense]) |
|
276 fi |
|
277 else |
|
278 if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then |
|
279 OPENJDK=true |
|
280 else |
|
281 OPENJDK=false |
|
282 fi |
|
283 fi |
|
284 |
|
285 if test "x$OPENJDK" = "xtrue"; then |
|
286 SET_OPENJDK="OPENJDK=true" |
|
287 fi |
|
288 |
|
289 AC_SUBST(SET_OPENJDK) |
|
290 |
294 |
291 ############################################################################### |
295 ############################################################################### |
292 # |
296 # |
293 # Should we build a JDK/JVM with headful support (ie a graphical ui)? |
297 # Should we build a JDK/JVM with headful support (ie a graphical ui)? |
294 # We always build headless support. |
298 # We always build headless support. |
367 COMPRESS_JARS=false |
371 COMPRESS_JARS=false |
368 |
372 |
369 AC_SUBST(COMPRESS_JARS) |
373 AC_SUBST(COMPRESS_JARS) |
370 ]) |
374 ]) |
371 |
375 |
|
376 ############################################################################### |
|
377 # |
|
378 # Setup version numbers |
|
379 # |
372 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], |
380 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], |
373 [ |
381 [ |
374 # Source the version numbers |
382 # Source the version numbers |
375 . $AUTOCONF_DIR/version.numbers |
383 . $AUTOCONF_DIR/version-numbers |
376 if test "x$OPENJDK" = "xfalse"; then |
384 |
377 . $AUTOCONF_DIR/closed.version.numbers |
385 # Get the settings from parameters |
378 fi |
386 AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone], |
|
387 [Set milestone value for build @<:@internal@:>@])]) |
|
388 if test "x$with_milestone" = xyes; then |
|
389 AC_MSG_ERROR([Milestone must have a value]) |
|
390 elif test "x$with_milestone" != x; then |
|
391 MILESTONE="$with_milestone" |
|
392 else |
|
393 MILESTONE=internal |
|
394 fi |
|
395 |
|
396 AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number], |
|
397 [Set build number value for build @<:@b00@:>@])]) |
|
398 if test "x$with_build_number" = xyes; then |
|
399 AC_MSG_ERROR([Build number must have a value]) |
|
400 elif test "x$with_build_number" != x; then |
|
401 JDK_BUILD_NUMBER="$with_build_number" |
|
402 fi |
|
403 if test "x$JDK_BUILD_NUMBER" = x; then |
|
404 JDK_BUILD_NUMBER=b00 |
|
405 fi |
|
406 |
|
407 AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], |
|
408 [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])]) |
|
409 if test "x$with_user_release_suffix" = xyes; then |
|
410 AC_MSG_ERROR([Release suffix must have a value]) |
|
411 elif test "x$with_user_release_suffix" != x; then |
|
412 USER_RELEASE_SUFFIX="$with_user_release_suffix" |
|
413 else |
|
414 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` |
|
415 # Avoid [:alnum:] since it depends on the locale. |
|
416 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` |
|
417 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
|
418 fi |
|
419 AC_SUBST(USER_RELEASE_SUFFIX) |
|
420 |
379 # Now set the JDK version, milestone, build number etc. |
421 # Now set the JDK version, milestone, build number etc. |
380 AC_SUBST(JDK_MAJOR_VERSION) |
422 AC_SUBST(JDK_MAJOR_VERSION) |
381 AC_SUBST(JDK_MINOR_VERSION) |
423 AC_SUBST(JDK_MINOR_VERSION) |
382 AC_SUBST(JDK_MICRO_VERSION) |
424 AC_SUBST(JDK_MICRO_VERSION) |
383 AC_SUBST(JDK_UPDATE_VERSION) |
425 AC_SUBST(JDK_UPDATE_VERSION) |
392 AC_SUBST(MACOSX_BUNDLE_ID_BASE) |
434 AC_SUBST(MACOSX_BUNDLE_ID_BASE) |
393 |
435 |
394 COPYRIGHT_YEAR=`date +'%Y'` |
436 COPYRIGHT_YEAR=`date +'%Y'` |
395 AC_SUBST(COPYRIGHT_YEAR) |
437 AC_SUBST(COPYRIGHT_YEAR) |
396 |
438 |
397 RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX" |
|
398 AC_SUBST(RUNTIME_NAME) |
|
399 |
|
400 if test "x$JDK_UPDATE_VERSION" != x; then |
439 if test "x$JDK_UPDATE_VERSION" != x; then |
401 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" |
440 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" |
402 else |
441 else |
403 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" |
442 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" |
404 fi |
443 fi |
405 AC_SUBST(JDK_VERSION) |
444 AC_SUBST(JDK_VERSION) |
406 |
445 |
407 if test "x$MILESTONE" != x; then |
|
408 RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}" |
|
409 else |
|
410 RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}" |
|
411 fi |
|
412 AC_SUBST(RELEASE) |
|
413 |
|
414 if test "x$JDK_BUILD_NUMBER" != x; then |
|
415 FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}" |
|
416 else |
|
417 JDK_BUILD_NUMBER=b00 |
|
418 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` |
|
419 # Avoid [:alnum:] since it depends on the locale. |
|
420 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` |
|
421 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
|
422 FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}" |
|
423 fi |
|
424 AC_SUBST(FULL_VERSION) |
|
425 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` |
446 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` |
426 AC_SUBST(COOKED_BUILD_NUMBER) |
447 AC_SUBST(COOKED_BUILD_NUMBER) |
427 ]) |
448 ]) |
428 |
449 |
429 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS], |
450 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS], |