common/autoconf/configure.ac

Tue, 24 Jul 2018 13:19:47 +0800

author
aoqi
date
Tue, 24 Jul 2018 13:19:47 +0800
changeset 2161
e50b76885c16
parent 1482
8fb429038513
child 2316
64a3eeabf6e5
permissions
-rw-r--r--

#6580 added Loongson release info to java -version output
Summary: info includes Loongson OpenJDK version, host name and build OS name
Reviewed-by: zhaixiang

     1 #
     2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.  Oracle designates this
     8 # particular file as subject to the "Classpath" exception as provided
     9 # by Oracle in the LICENSE file that accompanied this code.
    10 #
    11 # This code is distributed in the hope that it will be useful, but WITHOUT
    12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14 # version 2 for more details (a copy is included in the LICENSE file that
    15 # accompanied this code).
    16 #
    17 # You should have received a copy of the GNU General Public License version
    18 # 2 along with this work; if not, write to the Free Software Foundation,
    19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20 #
    21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22 # or visit www.oracle.com if you need additional information or have any
    23 # questions.
    24 #
    26 #
    27 # This file has been modified by Loongson Technology in 2018. These
    28 # modifications are Copyright (c) 2018 Loongson Technology, and are made
    29 # available on the same license terms set forth above.
    30 #
    32 ###############################################################################
    33 #
    34 # Includes and boilerplate
    35 #
    36 ###############################################################################
    39 AC_PREREQ([2.69])
    40 AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
    42 AC_CONFIG_AUX_DIR([build-aux])
    43 m4_include([build-aux/pkg.m4])
    45 # Include these first...
    46 m4_include([basics.m4])
    47 m4_include([basics_windows.m4])
    48 m4_include([builddeps.m4])
    49 # ... then the rest
    50 m4_include([boot-jdk.m4])
    51 m4_include([build-performance.m4])
    52 m4_include([help.m4])
    53 m4_include([jdk-options.m4])
    54 m4_include([libraries.m4])
    55 m4_include([platform.m4])
    56 m4_include([source-dirs.m4])
    57 m4_include([toolchain.m4])
    58 m4_include([toolchain_windows.m4])
    60 AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
    61 AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
    62 AC_DEFUN_ONCE([CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK])
    64 # This line needs to be here, verbatim, after all includes and the dummy hook
    65 # definitions. It is replaced with custom functionality when building
    66 # custom sources.
    67 #CUSTOM_AUTOCONF_INCLUDE
    69 # Do not change or remove the following line, it is needed for consistency checks:
    70 DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
    72 ###############################################################################
    73 #
    74 # Initialization / Boot-strapping
    75 #
    76 # The bootstrapping process needs to solve the "chicken or the egg" problem,
    77 # thus it jumps back and forth, each time gaining something needed later on.
    78 #
    79 ###############################################################################
    81 # Basic initialization that must happen first of all
    82 BASIC_INIT
    83 BASIC_SETUP_FUNDAMENTAL_TOOLS
    85 # Now we can determine OpenJDK build and target platforms. This is required to
    86 # have early on.
    87 PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
    89 # Continue setting up basic stuff. Most remaining code require fundamental tools.
    90 BASIC_SETUP_PATHS
    91 BASIC_SETUP_LOGGING
    93 # Check if it's a pure open build or if custom sources are to be used.
    94 JDKOPT_SETUP_OPEN_OR_CUSTOM
    96 # These are needed to be able to create a configuration name (and thus the output directory)
    97 JDKOPT_SETUP_JDK_VARIANT
    98 JDKOPT_SETUP_JVM_INTERPRETER
    99 JDKOPT_SETUP_JVM_VARIANTS
   100 JDKOPT_SETUP_DEBUG_LEVEL
   102 # With basic setup done, call the custom early hook.
   103 CUSTOM_EARLY_HOOK
   105 # To properly create a configuration name, we need to have the OpenJDK target
   106 # and options (variants and debug level) parsed.
   107 BASIC_SETUP_OUTPUT_DIR
   109 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
   110 HELP_SETUP_DEPENDENCY_HELP
   112 # Setup tools that requires more complex handling, or that is not needed by the configure script.
   113 BASIC_SETUP_COMPLEX_TOOLS
   115 # Check if pkg-config is available.
   116 PKG_PROG_PKG_CONFIG
   118 # After basic tools have been setup, we can check build os specific details.
   119 PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
   121 # Setup builddeps, for automatic downloading of tools we need.
   122 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
   123 # boot-jdk setup, but we need to have basic tools setup first.
   124 BDEPS_CONFIGURE_BUILDDEPS
   125 BDEPS_SCAN_FOR_BUILDDEPS
   127 ###############################################################################
   128 #
   129 # Determine OpenJDK variants, options and version numbers.
   130 #
   131 ###############################################################################
   133 # We need build & target for this.
   134 JDKOPT_SETUP_JDK_OPTIONS
   135 JDKOPT_SETUP_JDK_VERSION_NUMBERS
   137 ###############################################################################
   138 #
   139 # Setup BootJDK, used to bootstrap the build.
   140 #
   141 ###############################################################################
   143 BOOTJDK_SETUP_BOOT_JDK
   144 BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
   146 ###############################################################################
   147 #
   148 # Configure the sources to use. We can add or override individual directories.
   149 #
   150 ###############################################################################
   152 SRCDIRS_SETUP_TOPDIRS
   153 SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS
   154 SRCDIRS_SETUP_OUTPUT_DIRS
   156 ###############################################################################
   157 #
   158 # Setup the toolchain (compilers etc), i.e. the tools that need to be
   159 # cross-compilation aware.
   160 #
   161 ###############################################################################
   163 TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
   164 # Locate the actual tools
   165 TOOLCHAIN_SETUP_PATHS
   167 # FIXME: Currently we must test this after paths but before flags. Fix!
   169 # And we can test some aspects on the target using configure macros.
   170 PLATFORM_SETUP_OPENJDK_TARGET_BITS
   171 PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
   172 GET_BUILDER_AND_HOST_DATA
   174 # Configure flags for the tools
   175 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
   176 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
   177 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
   178 TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC
   180 # Setup debug symbols (need objcopy from the toolchain for that)
   181 JDKOPT_SETUP_DEBUG_SYMBOLS
   183 ###############################################################################
   184 #
   185 # Check dependencies for external and internal libraries.
   186 #
   187 ###############################################################################
   189 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
   190 BASIC_COMPILE_FIXPATH
   192 LIB_SETUP_INIT
   193 LIB_SETUP_X11
   194 LIB_SETUP_CUPS
   195 LIB_SETUP_FREETYPE
   196 LIB_SETUP_ALSA
   197 LIB_SETUP_MISC_LIBS
   198 LIB_SETUP_STATIC_LINK_LIBSTDCPP
   201 ###############################################################################
   202 #
   203 # We need to do some final tweaking, when everything else is done.
   204 #
   205 ###############################################################################
   207 JDKOPT_SETUP_BUILD_TWEAKS
   208 JDKOPT_DETECT_INTREE_EC
   210 ###############################################################################
   211 #
   212 # Configure parts of the build that only affect the build performance,
   213 # not the result.
   214 #
   215 ###############################################################################
   217 BPERF_SETUP_BUILD_CORES
   218 BPERF_SETUP_BUILD_MEMORY
   219 BPERF_SETUP_BUILD_JOBS
   221 # Setup smart javac (after cores and memory have been setup)
   222 BPERF_SETUP_SMART_JAVAC
   224 # Can the C/C++ compiler use precompiled headers?
   225 BPERF_SETUP_PRECOMPILED_HEADERS
   227 # Setup use of ccache, if available
   228 BPERF_SETUP_CCACHE
   230 ###############################################################################
   231 #
   232 # And now the finish...
   233 #
   234 ###############################################################################
   236 # Check for some common pitfalls
   237 BASIC_TEST_USABILITY_ISSUES
   239 # At the end, call the custom hook. (Dummy macro if no custom sources available)
   240 CUSTOM_LATE_HOOK
   242 # We're messing a bit with internal autoconf variables to put the config.status
   243 # in the output directory instead of the current directory.
   244 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
   246 # Create the actual output files. Now the main work of configure is done.
   247 AC_OUTPUT
   248 CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK
   250 # Try to move the config.log file to the output directory.
   251 if test -e ./config.log; then
   252   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
   253 fi
   255 # Make the compare script executable
   256 $CHMOD +x $OUTPUT_ROOT/compare.sh
   258 # Finally output some useful information to the user
   259 HELP_PRINT_SUMMARY_AND_WARNINGS

mercurial