1 #
2 # Copyright (c) 2011, 2014, 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
419 CACERTS_FILE=$with_cacerts_file
420 fi
421 AC_SUBST(CACERTS_FILE)
422
423 ###############################################################################
424 #
425 # Enable or disable unlimited crypto
426 #
427 AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
428 [Enable unlimited crypto policy @<:@disabled@:>@])],,
429 [enable_unlimited_crypto=no])
430 if test "x$enable_unlimited_crypto" = "xyes"; then
431 UNLIMITED_CRYPTO=true
432 else
433 UNLIMITED_CRYPTO=false
434 fi
435 AC_SUBST(UNLIMITED_CRYPTO)
436
437 ###############################################################################
438 #
439 # Enable or disable the elliptic curve crypto implementation
440 #
441 AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
442 [
443 AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
444
445 if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
446 ENABLE_INTREE_EC=yes
447 AC_MSG_RESULT([yes])
448 else
449 ENABLE_INTREE_EC=no
450 AC_MSG_RESULT([no])
451 fi
452
453 AC_SUBST(ENABLE_INTREE_EC)
454 ])
455
456 ###############################################################################
457 #
458 # --enable-rmiconnector-iiop
459 #
460 AC_ARG_ENABLE(rmiconnector-iiop, [AS_HELP_STRING([--enable-rmiconnector-iiop],
461 [enable the JMX RMIConnector iiop transport @<:@disabled@:>@])])
462 if test "x$enable_rmiconnector_iiop" = "xyes"; then
463 RMICONNECTOR_IIOP=true
464 else
465 RMICONNECTOR_IIOP=false
466 fi
467 AC_SUBST(RMICONNECTOR_IIOP)
468
469 ###############################################################################
470 #
471 # Compress jars
472 #
473 COMPRESS_JARS=false
474
475 AC_SUBST(COMPRESS_JARS)
476 ])
477
478 ###############################################################################
479 #
480 # Setup version numbers
481 #
482 AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
483 [
484 # Source the version numbers
485 . $AUTOCONF_DIR/version-numbers
486
487 # Get the settings from parameters
488 AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
489 [Set milestone value for build @<:@internal@:>@])])
490 if test "x$with_milestone" = xyes; then
491 AC_MSG_ERROR([Milestone must have a value])
492 elif test "x$with_milestone" != x; then
493 MILESTONE="$with_milestone"
494 fi
495 if test "x$MILESTONE" = x; then
496 MILESTONE=internal
497 fi
498
499 AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version],
500 [Set update version value for build @<:@b00@:>@])])
501 if test "x$with_update_version" = xyes; then
502 AC_MSG_ERROR([Update version must have a value])
503 elif test "x$with_update_version" != x; then
504 JDK_UPDATE_VERSION="$with_update_version"
505 # On macosx 10.7, it's not possible to set --with-update-version=0X due
506 # to a bug in expr (which reduces it to just X). To work around this, we
507 # always add a 0 to one digit update versions.
508 if test "${#JDK_UPDATE_VERSION}" = "1"; then
509 JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
510 fi
511 fi
512
513 AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
514 [Add a custom string to the version string if build number is not set.@<:@username_builddateb00@:>@])])
515 if test "x$with_user_release_suffix" = xyes; then
516 AC_MSG_ERROR([Release suffix must have a value])
517 elif test "x$with_user_release_suffix" != x; then
518 USER_RELEASE_SUFFIX="$with_user_release_suffix"
519 fi
520
521 AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
522 [Set build number value for build @<:@b00@:>@])])
523 if test "x$with_build_number" = xyes; then
524 AC_MSG_ERROR([Build number must have a value])
525 elif test "x$with_build_number" != x; then
526 JDK_BUILD_NUMBER="$with_build_number"
527 fi
528 # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
529 if test "x$JDK_BUILD_NUMBER" = x; then
530 JDK_BUILD_NUMBER=b00
531 if test "x$USER_RELEASE_SUFFIX" = x; then
532 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
533 # Avoid [:alnum:] since it depends on the locale.
534 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
535 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
536 fi
537 fi
538
539 # Now set the JDK version, milestone, build number etc.
540 AC_SUBST(USER_RELEASE_SUFFIX)
541 AC_SUBST(JDK_MAJOR_VERSION)
542 AC_SUBST(JDK_MINOR_VERSION)
543 AC_SUBST(JDK_MICRO_VERSION)
544 AC_SUBST(JDK_UPDATE_VERSION)
545 AC_SUBST(JDK_BUILD_NUMBER)
546 AC_SUBST(MILESTONE)
547 AC_SUBST(LAUNCHER_NAME)
548 AC_SUBST(PRODUCT_NAME)
549 AC_SUBST(PRODUCT_SUFFIX)
550 AC_SUBST(JDK_RC_PLATFORM_NAME)
551 AC_SUBST(COMPANY_NAME)
552 AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
553 AC_SUBST(MACOSX_BUNDLE_ID_BASE)
554
555 AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
556 [Set copyright year value for build @<:@current year@:>@])])
557 if test "x$with_copyright_year" = xyes; then
558 AC_MSG_ERROR([Copyright year must have a value])
559 elif test "x$with_copyright_year" != x; then
560 COPYRIGHT_YEAR="$with_copyright_year"
561 else
562 COPYRIGHT_YEAR=`date +'%Y'`
563 fi
564 AC_SUBST(COPYRIGHT_YEAR)
565
566 if test "x$JDK_UPDATE_VERSION" != x; then
567 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
568 else
569 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
570 fi
571 AC_SUBST(JDK_VERSION)
572
573 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
574 AC_SUBST(COOKED_BUILD_NUMBER)
575 ])
576
577 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
578 [
579 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
580 AC_SUBST(HOTSPOT_MAKE_ARGS)
581
582 # The name of the Service Agent jar.
583 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
584 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
585 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
586 fi
587 AC_SUBST(SALIB_NAME)
588 ])
589
590 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
591 [
592 #
593 # ENABLE_DEBUG_SYMBOLS
594 # This must be done after the toolchain is setup, since we're looking at objcopy.
595 #
596 AC_ARG_ENABLE([debug-symbols],
597 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
598
599 AC_MSG_CHECKING([if we should generate debug symbols])
600
601 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
602 # explicit enabling of enable-debug-symbols and can't find objcopy
603 # this is an error
604 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
605 fi
606
607 if test "x$enable_debug_symbols" = "xyes"; then
608 ENABLE_DEBUG_SYMBOLS=true
|
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
419 CACERTS_FILE=$with_cacerts_file
420 fi
421 AC_SUBST(CACERTS_FILE)
422
423 ###############################################################################
424 #
425 # Enable or disable unlimited crypto
426 #
427 AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
428 [Enable unlimited crypto policy @<:@disabled@:>@])],,
429 [enable_unlimited_crypto=no])
430 if test "x$enable_unlimited_crypto" = "xyes"; then
431 UNLIMITED_CRYPTO=true
432 else
433 UNLIMITED_CRYPTO=false
434 fi
435 AC_SUBST(UNLIMITED_CRYPTO)
436
437 ###############################################################################
438 #
439 # --enable-rmiconnector-iiop
440 #
441 AC_ARG_ENABLE(rmiconnector-iiop, [AS_HELP_STRING([--enable-rmiconnector-iiop],
442 [enable the JMX RMIConnector iiop transport @<:@disabled@:>@])])
443 if test "x$enable_rmiconnector_iiop" = "xyes"; then
444 RMICONNECTOR_IIOP=true
445 else
446 RMICONNECTOR_IIOP=false
447 fi
448 AC_SUBST(RMICONNECTOR_IIOP)
449
450 ###############################################################################
451 #
452 # Compress jars
453 #
454 COMPRESS_JARS=false
455
456 AC_SUBST(COMPRESS_JARS)
457
458 # Setup default copyright year. Mostly overridden when building close to a new year.
459 AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
460 [Set copyright year value for build @<:@current year@:>@])])
461 if test "x$with_copyright_year" = xyes; then
462 AC_MSG_ERROR([Copyright year must have a value])
463 elif test "x$with_copyright_year" != x; then
464 COPYRIGHT_YEAR="$with_copyright_year"
465 else
466 COPYRIGHT_YEAR=`date +'%Y'`
467 fi
468 AC_SUBST(COPYRIGHT_YEAR)
469 ])
470
471 AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
472 [
473 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
474 AC_SUBST(HOTSPOT_MAKE_ARGS)
475
476 # The name of the Service Agent jar.
477 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
478 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
479 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
480 fi
481 AC_SUBST(SALIB_NAME)
482 ])
483
484 ###############################################################################
485 #
486 # Enable or disable the elliptic curve crypto implementation
487 #
488 AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
489 [
490 AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
491
492 if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
493 ENABLE_INTREE_EC=yes
494 AC_MSG_RESULT([yes])
495 else
496 ENABLE_INTREE_EC=no
497 AC_MSG_RESULT([no])
498 fi
499
500 AC_SUBST(ENABLE_INTREE_EC)
501 ])
502
503
504 AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
505 [
506 #
507 # ENABLE_DEBUG_SYMBOLS
508 # This must be done after the toolchain is setup, since we're looking at objcopy.
509 #
510 AC_ARG_ENABLE([debug-symbols],
511 [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
512
513 AC_MSG_CHECKING([if we should generate debug symbols])
514
515 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
516 # explicit enabling of enable-debug-symbols and can't find objcopy
517 # this is an error
518 AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
519 fi
520
521 if test "x$enable_debug_symbols" = "xyes"; then
522 ENABLE_DEBUG_SYMBOLS=true
|