make/autoconf/boot-jdk.m4
author dchuyko
Tue, 19 Jun 2018 18:18:46 +0300
changeset 50642 fff48b02d4a6
parent 49706 dd26184768b0
child 51822 f3c1945fa8aa
permissions -rw-r--r--
8198719: MethodHandleHelper.linkToStatic should drop MH arg Reviewed-by: vlivanov, dlong
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
#
43383
5e74f3dd4656 8173107: Fix autoconf/spec.gmk mismatches
ihse
parents: 42852
diff changeset
     2
# Copyright (c) 2011, 2017, 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
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    26
########################################################################
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    27
# This file handles detection of the Boot JDK. The Boot JDK detection
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    28
# process has been developed as a response to solve a complex real-world
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    29
# problem. Initially, it was simple, but it has grown as platform after
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    30
# platform, idiosyncracy after idiosyncracy has been supported.
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    31
#
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    32
# The basic idea is this:
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    33
# 1) You need an acceptable *) JDK to use as a Boot JDK
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    34
# 2) There are several ways to locate a JDK, that are mostly platform
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    35
#    dependent **)
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    36
# 3) You can have multiple JDKs installed
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    37
# 4) If possible, configure should try to dig out an acceptable JDK
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    38
#    automatically, without having to resort to command-line options
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    39
#
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    40
# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    41
#     javac) and not a JRE, etc.
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    42
#
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    43
# **) On Windows we typically use a well-known path.
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    44
#     On MacOSX we typically use the tool java_home.
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    45
#     On Linux we typically find javac in the $PATH, and then follow a
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    46
#     chain of symlinks that often ends up in a real JDK.
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    47
#
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    48
# This leads to the code where we check in different ways to locate a
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    49
# JDK, and if one is found, check if it is acceptable. If not, we print
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    50
# our reasons for rejecting it (useful when debugging non-working
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
    51
# configure situations) and continue checking the next one.
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    52
########################################################################
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
    53
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    54
# Execute the check given as argument, and verify the result
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    55
# If the Boot JDK was previously found, do nothing
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    56
# $1 A command line (typically autoconf macro) to execute
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    57
AC_DEFUN([BOOTJDK_DO_CHECK],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    58
[
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    59
  if test "x$BOOT_JDK_FOUND" = xno; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    60
    # Now execute the test
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    61
    $1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    62
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    63
    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    64
    if test "x$BOOT_JDK_FOUND" = xmaybe; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    65
      # Do we have a bin/java?
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    66
      if test ! -x "$BOOT_JDK/bin/java"; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    67
        AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    68
        BOOT_JDK_FOUND=no
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    69
      else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    70
        # Do we have a bin/javac?
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    71
        if test ! -x "$BOOT_JDK/bin/javac"; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    72
          AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    73
          AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    74
          BOOT_JDK_FOUND=no
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
    75
        else
27865
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    76
          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
38843
2b141e8e916f 8158535: Configure script uses basic tools directly in many places
erikj
parents: 37771
diff changeset
    77
          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27865
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    78
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    79
          # Extra M4 quote needed to protect [] in grep expression.
49159
436f1e03fd04 8199266: Update boot and build jdk requirements in configure
erikj
parents: 48845
diff changeset
    80
          [FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION \
436f1e03fd04 8199266: Update boot and build jdk requirements in configure
erikj
parents: 48845
diff changeset
    81
              | $EGREP "\"(${DEFAULT_ACCEPTABLE_BOOT_VERSIONS// /|})([\.+-].*)?\""`]
27865
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    82
          if test "x$FOUND_CORRECT_VERSION" = x; then
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    83
            AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
49159
436f1e03fd04 8199266: Update boot and build jdk requirements in configure
erikj
parents: 48845
diff changeset
    84
            AC_MSG_NOTICE([(Your Boot JDK version must be one of: $DEFAULT_ACCEPTABLE_BOOT_VERSIONS)])
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    85
            BOOT_JDK_FOUND=no
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    86
          else
27865
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    87
            # We're done! :-)
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    88
            BOOT_JDK_FOUND=yes
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    89
            BASIC_FIXUP_PATH(BOOT_JDK)
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    90
            AC_MSG_CHECKING([for Boot JDK])
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    91
            AC_MSG_RESULT([$BOOT_JDK])
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    92
            AC_MSG_CHECKING([Boot JDK version])
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    93
            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    94
            AC_MSG_RESULT([$BOOT_JDK_VERSION])
6c830e3b9caf 8066828: configure fails if it's set --with-boot-jdk to use JDK 9 modular image
erikj
parents: 27602
diff changeset
    95
          fi # end check jdk version
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    96
        fi # end check javac
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    97
      fi # end check java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    98
    fi # end check boot jdk found
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
    99
  fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   100
])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   101
42300
218374d35efd 8039103: "explicitly" is misspelled as "explicitely" in configure scripts
ihse
parents: 41458
diff changeset
   102
# Test: Is bootjdk explicitly set by command line arguments?
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   103
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   104
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   105
  if test "x$with_boot_jdk" != x; then
48845
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   106
    if test -d "$with_boot_jdk"; then
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   107
      BOOT_JDK=$with_boot_jdk
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   108
      BOOT_JDK_FOUND=maybe
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   109
    elif test -f "$with_boot_jdk"; then
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   110
      case "$with_boot_jdk" in
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   111
        *.tar.gz )
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   112
            BOOT_JDK_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/boot-jdk
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   113
            $RM -rf $BOOT_JDK_SUPPORT_DIR
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   114
            $MKDIR -p $BOOT_JDK_SUPPORT_DIR
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   115
            $GUNZIP -c $with_boot_jdk | $TAR xf - -C $BOOT_JDK_SUPPORT_DIR
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   116
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   117
            # Try to find javac to determine BOOT_JDK path
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   118
            BOOT_JDK_JAVAC_PATH=`$FIND $BOOT_JDK_SUPPORT_DIR | $GREP "/bin/javac"`
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   119
            if test "x$BOOT_JDK_JAVAC_PATH" != x; then
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   120
              BOOT_JDK_FOUND=maybe
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   121
              BOOT_JDK=$($DIRNAME $($DIRNAME $BOOT_JDK_JAVAC_PATH))
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   122
            else
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   123
              BOOT_JDK_FOUND=no
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   124
            fi
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   125
          ;;
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   126
        * )
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   127
            BOOT_JDK_FOUND=no
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   128
          ;;
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   129
      esac
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   130
    else
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   131
      BOOT_JDK_FOUND=no
b3a833c9c6e9 8193189: Allow --boot-jdk to accept a .tar.gz compressed JDK image
ehelin
parents: 48406
diff changeset
   132
    fi
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   133
    AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   134
  fi
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   135
])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   136
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   137
# Test: Is $JAVA_HOME set?
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   138
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   139
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   140
  if test "x$JAVA_HOME" != x; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   141
    JAVA_HOME_PROCESSED="$JAVA_HOME"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   142
    BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   143
    if test ! -d "$JAVA_HOME_PROCESSED"; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   144
      AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   145
    else
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   146
      # Aha, the user has set a JAVA_HOME
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   147
      # let us use that as the Boot JDK.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   148
      BOOT_JDK="$JAVA_HOME_PROCESSED"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   149
      BOOT_JDK_FOUND=maybe
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   150
      AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   151
    fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   152
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   153
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   154
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   155
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   156
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   157
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   158
  AC_PATH_PROG(JAVAC_CHECK, javac)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   159
  AC_PATH_PROG(JAVA_CHECK, java)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   160
  BINARY="$JAVAC_CHECK"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   161
  if test "x$JAVAC_CHECK" = x; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   162
    BINARY="$JAVA_CHECK"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   163
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   164
  if test "x$BINARY" != x; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   165
    # So there is a java(c) binary, it might be part of a JDK.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   166
    # Lets find the JDK/JRE directory by following symbolic links.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   167
    # Linux/GNU systems often have links from /usr/bin/java to
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   168
    # /etc/alternatives/java to the real JDK binary.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   169
    BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   170
    BOOT_JDK=`dirname "$BINARY"`
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   171
    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   172
    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   173
      # Looks like we found ourselves an JDK
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   174
      BOOT_JDK_FOUND=maybe
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   175
      AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   176
    fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   177
  fi
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   178
])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   179
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   180
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   181
# $1: Argument to the java_home binary (optional)
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   182
AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME],
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   183
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   184
  if test -x /usr/libexec/java_home; then
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   185
    BOOT_JDK=`/usr/libexec/java_home $1`
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   186
    BOOT_JDK_FOUND=maybe
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   187
    AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home $1])
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   188
  fi
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   189
])
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   190
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   191
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   192
AC_DEFUN([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR],
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   193
[
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   194
  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   195
    # First check at user selected default
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   196
    BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME()])
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   197
    # If that did not work out (e.g. too old), try explicit versions instead
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   198
    BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.9])])
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   199
    BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.8])])
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   200
    BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.7])])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   201
  fi
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   202
])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   203
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   204
# Look for a jdk in the given path. If there are multiple, try to select the newest.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   205
# If found, set BOOT_JDK and BOOT_JDK_FOUND.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   206
# $1 = Path to directory containing jdk installations.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   207
# $2 = String to append to the found JDK directory to get the proper JDK home
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   208
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY],
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   209
[
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   210
  BOOT_JDK_PREFIX="$1"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   211
  BOOT_JDK_SUFFIX="$2"
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   212
  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   213
  if test "x$ALL_JDKS_FOUND" != x; then
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   214
    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   215
      BOOTJDK_DO_CHECK([
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   216
        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   217
        if test -d "$BOOT_JDK"; then
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   218
          BOOT_JDK_FOUND=maybe
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   219
          AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)])
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   220
        fi
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   221
      ])
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   222
    done
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   223
  fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   224
])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   225
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   226
# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   227
# environmental variable as base for where to look.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   228
# $1 Name of an environmal variable, assumed to point to the Program Files directory.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   229
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   230
[
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   231
  if test "x[$]$1" != x; then
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   232
    VIRTUAL_DIR="[$]$1/Java"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   233
    BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   234
    BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   235
  fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   236
])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   237
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   238
# Test: Is there a JDK installed in default, well-known locations?
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   239
AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   240
[
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   241
  if test "x$OPENJDK_TARGET_OS" = xwindows; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   242
    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramW6432])])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   243
    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMW6432])])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   244
    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMFILES])])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   245
    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramFiles])])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   246
    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/cygdrive/c/Program Files/Java])])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   247
  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   248
    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/Library/Java/JavaVirtualMachines],[/Contents/Home])])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   249
    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/System/Library/Java/JavaVirtualMachines],[/Contents/Home])])
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   250
  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   251
    BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/usr/lib/jvm])])
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   252
  fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   253
])
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   254
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   255
# Check that a command-line tool in the Boot JDK is correct
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   256
# $1 = name of variable to assign
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   257
# $2 = name of binary
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   258
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   259
[
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   260
  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
27595
cff167b3bfa2 8065914: Various improvements and cleanup of build system
ihse
parents: 26131
diff changeset
   261
  BASIC_SETUP_TOOL($1,
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   262
    [
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   263
      AC_MSG_CHECKING([for $2 in Boot JDK])
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   264
      $1=$BOOT_JDK/bin/$2
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   265
      if test ! -x [$]$1; then
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   266
        AC_MSG_RESULT(not found)
42300
218374d35efd 8039103: "explicitly" is misspelled as "explicitely" in configure scripts
ihse
parents: 41458
diff changeset
   267
        AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk])
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   268
        AC_MSG_ERROR([Could not find $2 in the Boot JDK])
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   269
      fi
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   270
      AC_MSG_RESULT(ok)
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   271
      AC_SUBST($1)
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   272
    ])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   273
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   274
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   275
###############################################################################
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   276
#
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   277
# We need a Boot JDK to bootstrap the build.
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   278
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   279
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   280
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   281
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   282
  BOOT_JDK_FOUND=no
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   283
  AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   284
      [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   285
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   286
  # We look for the Boot JDK through various means, going from more certain to
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   287
  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   288
  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   289
  # must check if this is indeed valid; otherwise we'll continue looking.
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   290
42300
218374d35efd 8039103: "explicitly" is misspelled as "explicitely" in configure scripts
ihse
parents: 41458
diff changeset
   291
  # Test: Is bootjdk explicitly set by command line arguments?
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   292
  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   293
  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   294
    # Having specified an argument which is incorrect will produce an instant failure;
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   295
    # we should not go on looking
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   296
    AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   297
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   298
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   299
  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   300
  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   301
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   302
  # Test: Is $JAVA_HOME set?
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   303
  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   304
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   305
  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   306
  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   307
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   308
  # Test: Is there a JDK installed in default, well-known locations?
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   309
  BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS])
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents: 13133
diff changeset
   310
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   311
  # If we haven't found anything yet, we've truly lost. Give up.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   312
  if test "x$BOOT_JDK_FOUND" = xno; then
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   313
    HELP_MSG_MISSING_DEPENDENCY([openjdk])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   314
    AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG])
42300
218374d35efd 8039103: "explicitly" is misspelled as "explicitely" in configure scripts
ihse
parents: 41458
diff changeset
   315
    AC_MSG_NOTICE([This might be fixed by explicitly setting --with-boot-jdk])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   316
    AC_MSG_ERROR([Cannot continue])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   317
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   318
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   319
  AC_SUBST(BOOT_JDK)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   320
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   321
  # Setup tools from the Boot JDK.
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   322
  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, java)
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   323
  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac)
47432
28d6070f5f2f 8189056: javadoc target for stable specdiff comparisons
ihse
parents: 47364
diff changeset
   324
  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc)
22477
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   325
  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar)
789f51111cb9 8033119: Improve and document boot-jdk.m4
ihse
parents: 22473
diff changeset
   326
  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   327
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   328
  # Finally, set some other options...
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   329
47364
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47324
diff changeset
   330
  # When compiling code to be executed by the Boot JDK, force compatibility with the
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47324
diff changeset
   331
  # oldest supported bootjdk.
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47324
diff changeset
   332
  BOOT_JDK_SOURCETARGET="-source 9 -target 9"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   333
  AC_SUBST(BOOT_JDK_SOURCETARGET)
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   334
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   335
  AC_SUBST(JAVAC_FLAGS)
33032
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   336
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   337
  # Check if the boot jdk is 32 or 64 bit
45051
676afd13dea5 8180198: make bootcycle-images fail with uses of -d64 flags
erikj
parents: 43383
diff changeset
   338
  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
33032
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   339
    BOOT_JDK_BITS="64"
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   340
  else
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   341
    BOOT_JDK_BITS="32"
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   342
  fi
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   343
  AC_MSG_CHECKING([if Boot JDK is 32 or 64 bits])
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   344
  AC_MSG_RESULT([$BOOT_JDK_BITS])
47324
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   345
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   346
  # Try to enable CDS
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   347
  AC_MSG_CHECKING([for local Boot JDK Class Data Sharing (CDS)])
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   348
  BOOT_JDK_CDS_ARCHIVE=$CONFIGURESUPPORT_OUTPUTDIR/classes.jsa
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   349
  ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   350
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   351
  if test "x$boot_jdk_cds_args" != x; then
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   352
    # Try creating a CDS archive
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   353
    "$JAVA" $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   354
    if test $? -eq 0; then
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   355
      BOOTJDK_USE_LOCAL_CDS=true
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   356
      AC_MSG_RESULT([yes, created])
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   357
    else
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   358
      # Generation failed, don't use CDS.
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   359
      BOOTJDK_USE_LOCAL_CDS=false
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   360
      AC_MSG_RESULT([no, creation failed])
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   361
    fi
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   362
  else
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   363
    BOOTJDK_USE_LOCAL_CDS=false
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   364
    AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   365
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   366
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   367
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   368
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   369
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   370
  ##############################################################################
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   371
  #
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   372
  # Specify jvm options for anything that is run with the Boot JDK.
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   373
  # Not all JVM:s accept the same arguments on the command line.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   374
  #
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   375
  AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   376
  [specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   377
  e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   378
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   379
  AC_MSG_CHECKING([flags for boot jdk java command] )
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   380
39684
1373dd6d26fa 8160873: (cs) JDK9 Build failure on Hindi locale
naoto
parents: 39189
diff changeset
   381
  # Force en-US environment
1373dd6d26fa 8160873: (cs) JDK9 Build failure on Hindi locale
naoto
parents: 39189
diff changeset
   382
  ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
1373dd6d26fa 8160873: (cs) JDK9 Build failure on Hindi locale
naoto
parents: 39189
diff changeset
   383
47324
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   384
  if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   385
    # Use our own CDS archive
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   386
    ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   387
  else
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   388
    # Otherwise optimistically use the system-wide one, if one is present
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   389
    ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   390
  fi
51b0b8d8fe56 8188312: Use CDS if present when running the Boot JDK during build
ihse
parents: 47254
diff changeset
   391
23171
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   392
  # Apply user provided options.
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   393
  ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   394
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   395
  AC_MSG_RESULT([$boot_jdk_jvmargs])
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   396
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   397
  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   398
  JAVA_FLAGS=$boot_jdk_jvmargs
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   399
  AC_SUBST(JAVA_FLAGS)
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   400
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   401
  AC_MSG_CHECKING([flags for boot jdk java command for big workloads])
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   402
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   403
  # Starting amount of heap memory.
23171
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   404
  ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
39187
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   405
  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   406
39187
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   407
  # Maximum amount of heap memory and stack size.
49706
dd26184768b0 8201495: [Zero] Reduce limits of max heap size for boot JDK on s390
sgehwolf
parents: 49159
diff changeset
   408
  JVM_HEAP_LIMIT_32="768"
39187
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   409
  # Running a 64 bit JVM allows for and requires a bigger heap
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   410
  JVM_HEAP_LIMIT_64="1600"
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   411
  STACK_SIZE_32=768
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   412
  STACK_SIZE_64=1536
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   413
  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   414
  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   415
    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   416
  fi
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   417
  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   418
    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   419
  fi
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   420
  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   421
    JVM_HEAP_LIMIT_32=512
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   422
    JVM_HEAP_LIMIT_64=512
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   423
  fi
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   424
33032
19ae7cdc0cd0 8139813: Base heap size on type of boot jdk, not architecture of build machine
erikj
parents: 32921
diff changeset
   425
  if test "x$BOOT_JDK_BITS" = "x32"; then
39187
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   426
    STACK_SIZE=$STACK_SIZE_32
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   427
    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   428
  else
39187
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   429
    STACK_SIZE=$STACK_SIZE_64
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   430
    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 14111
diff changeset
   431
  fi
26131
311b5e288cf5 8014510: Fix sjavac on all platforms in jprt
erikj
parents: 25854
diff changeset
   432
  ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
23171
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   433
  ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   434
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   435
  AC_MSG_RESULT([$boot_jdk_jvmargs_big])
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   436
23171
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   437
  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   438
  AC_SUBST(JAVA_FLAGS_BIG)
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   439
39187
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   440
  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   441
    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   442
    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   443
  else
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   444
    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   445
    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   446
  fi
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   447
  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   448
  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   449
  AC_MSG_CHECKING([flags for bootcycle boot jdk java command for big workloads])
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   450
  AC_MSG_RESULT([$BOOTCYCLE_JVM_ARGS_BIG])
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   451
  AC_SUBST(BOOTCYCLE_JVM_ARGS_BIG)
9decd6e374e2 8160285: Bootcycle builds are broken on jdk9/hs for windows i586
erikj
parents: 38843
diff changeset
   452
34101
a1db3b482137 8143296: javac-server/sjavac not compatible with LogFailures on Windows
erikj
parents: 33032
diff changeset
   453
  # By default, the main javac compilations use big
a1db3b482137 8143296: javac-server/sjavac not compatible with LogFailures on Windows
erikj
parents: 33032
diff changeset
   454
  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
a1db3b482137 8143296: javac-server/sjavac not compatible with LogFailures on Windows
erikj
parents: 33032
diff changeset
   455
  AC_SUBST(JAVA_FLAGS_JAVAC)
23171
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   456
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   457
  AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   458
23171
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   459
  # Use serial gc for small short lived tools if possible
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   460
  ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   461
  ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   462
  ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
37659
3715a97ba87b 8155824: JDK build should tune down small apps more aggressively
redestad
parents: 37014
diff changeset
   463
  ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])
22728
0a9d96bf2023 8036079: --with-boot-jdk-jvmargs configure options are ignored
mduigou
parents: 22477
diff changeset
   464
23171
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   465
  AC_MSG_RESULT([$boot_jdk_jvmargs_small])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   466
23171
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   467
  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
56a45cb104d1 8010767: Build fails on OEL6 with 16 cores
erikj
parents: 22728
diff changeset
   468
  AC_SUBST(JAVA_FLAGS_SMALL)
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24304
diff changeset
   469
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24304
diff changeset
   470
  JAVA_TOOL_FLAGS_SMALL=""
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24304
diff changeset
   471
  for f in $JAVA_FLAGS_SMALL; do
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24304
diff changeset
   472
    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24304
diff changeset
   473
  done
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24304
diff changeset
   474
  AC_SUBST(JAVA_TOOL_FLAGS_SMALL)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   475
])
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   476
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   477
# BUILD_JDK: the location of the latest JDK that can run
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   478
#   on the host system and supports the target class file version
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   479
#   generated in this JDK build.  This variable should only be
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   480
#   used after the launchers are built.
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   481
#
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   482
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   483
# Execute the check given as argument, and verify the result.
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   484
# If the JDK was previously found, do nothing.
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   485
# $1 A command line (typically autoconf macro) to execute
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   486
AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   487
[
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   488
  if test "x$BUILD_JDK_FOUND" = xno; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   489
    # Execute the test
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   490
    $1
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   491
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   492
    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   493
    if test "x$BUILD_JDK_FOUND" = xmaybe; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   494
      # Do we have a bin/java?
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   495
      if test ! -x "$BUILD_JDK/bin/java"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   496
        AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   497
        BUILD_JDK_FOUND=no
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   498
      elif test ! -x "$BUILD_JDK/bin/jlink"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   499
        AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   500
        BUILD_JDK_FOUND=no
37771
30f2faf0e7a6 8153685: Parfait integration missing in the new tools (jmod and jlink)
erikj
parents: 37770
diff changeset
   501
      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30f2faf0e7a6 8153685: Parfait integration missing in the new tools (jmod and jlink)
erikj
parents: 37770
diff changeset
   502
        AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring])
30f2faf0e7a6 8153685: Parfait integration missing in the new tools (jmod and jlink)
erikj
parents: 37770
diff changeset
   503
        BUILD_JDK_FOUND=no
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   504
      elif test ! -x "$BUILD_JDK/bin/javac"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   505
        # Do we have a bin/javac?
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   506
        AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   507
        AC_MSG_NOTICE([(This might be a JRE instead of an JDK)])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   508
        BUILD_JDK_FOUND=no
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   509
      else
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   510
        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
38843
2b141e8e916f 8158535: Configure script uses basic tools directly in many places
erikj
parents: 37771
diff changeset
   511
        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   512
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   513
        # Extra M4 quote needed to protect [] in grep expression.
49159
436f1e03fd04 8199266: Update boot and build jdk requirements in configure
erikj
parents: 48845
diff changeset
   514
        [FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   515
        if test "x$FOUND_CORRECT_VERSION" = x; then
37014
da8d0d4aa7ea 8154070: Configuration script unable to detect boot JDK's modules support
erikj
parents: 36506
diff changeset
   516
          AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
49159
436f1e03fd04 8199266: Update boot and build jdk requirements in configure
erikj
parents: 48845
diff changeset
   517
          AC_MSG_NOTICE([(Your Build JDK must be version $VERSION_FEATURE)])
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   518
          BUILD_JDK_FOUND=no
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   519
        else
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   520
          # We're done!
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   521
          BUILD_JDK_FOUND=yes
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   522
          BASIC_FIXUP_PATH(BUILD_JDK)
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   523
          AC_MSG_CHECKING([for Build JDK])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   524
          AC_MSG_RESULT([$BUILD_JDK])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   525
          AC_MSG_CHECKING([Build JDK version])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   526
          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   527
          AC_MSG_RESULT([$BUILD_JDK_VERSION])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   528
        fi # end check jdk version
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   529
      fi # end check java
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   530
    fi # end check build jdk found
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   531
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   532
])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   533
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   534
# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   535
# is different than the host system doing the build (e.g. cross-compilation),
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   536
# a special BUILD_JDK is built as part of the build process.  An external
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   537
# prebuilt BUILD_JDK can also be supplied.
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   538
AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   539
[
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   540
  AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk],
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   541
      [path to JDK of same version as is being built@<:@the newly built JDK@:>@])])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   542
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents: 37659
diff changeset
   543
  CREATE_BUILDJDK=false
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents: 37659
diff changeset
   544
  EXTERNAL_BUILDJDK=false
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   545
  BUILD_JDK_FOUND="no"
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   546
  if test "x$with_build_jdk" != "x"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   547
    BOOTJDK_CHECK_BUILD_JDK([
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   548
       if test "x$with_build_jdk" != x; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   549
         BUILD_JDK=$with_build_jdk
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   550
         BUILD_JDK_FOUND=maybe
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   551
         AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   552
       fi])
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents: 37659
diff changeset
   553
    EXTERNAL_BUILDJDK=true
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   554
  else
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   555
    if test "x$COMPILE_TYPE" = "xcross"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   556
      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   557
      BUILD_JDK_FOUND=yes
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   558
      CREATE_BUILDJDK=true
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   559
      AC_MSG_CHECKING([for Build JDK])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   560
      AC_MSG_RESULT([yes, will build it for the host platform])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   561
    else
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   562
      BUILD_JDK="\$(JDK_OUTPUTDIR)"
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   563
      BUILD_JDK_FOUND=yes
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   564
      AC_MSG_CHECKING([for Build JDK])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   565
      AC_MSG_RESULT([yes, will use output dir])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   566
    fi
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   567
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   568
37771
30f2faf0e7a6 8153685: Parfait integration missing in the new tools (jmod and jlink)
erikj
parents: 37770
diff changeset
   569
  JMOD="$BUILD_JDK/bin/jmod"
30f2faf0e7a6 8153685: Parfait integration missing in the new tools (jmod and jlink)
erikj
parents: 37770
diff changeset
   570
  JLINK="$BUILD_JDK/bin/jlink"
30f2faf0e7a6 8153685: Parfait integration missing in the new tools (jmod and jlink)
erikj
parents: 37770
diff changeset
   571
  AC_SUBST(JMOD)
30f2faf0e7a6 8153685: Parfait integration missing in the new tools (jmod and jlink)
erikj
parents: 37770
diff changeset
   572
  AC_SUBST(JLINK)
30f2faf0e7a6 8153685: Parfait integration missing in the new tools (jmod and jlink)
erikj
parents: 37770
diff changeset
   573
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   574
  if test "x$BUILD_JDK_FOUND" != "xyes"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   575
    AC_MSG_CHECKING([for Build JDK])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   576
    AC_MSG_RESULT([no])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   577
    AC_MSG_ERROR([Could not find a suitable Build JDK])
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   578
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   579
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   580
  AC_SUBST(CREATE_BUILDJDK)
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   581
  AC_SUBST(BUILD_JDK)
37770
9f040cf69078 8150044: Generate classlists at build-time
redestad
parents: 37659
diff changeset
   582
  AC_SUBST(EXTERNAL_BUILDJDK)
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 34120
diff changeset
   583
])