common/autoconf/configure.ac
changeset 14111 2a82ecb35fc7
parent 13697 5262b00bc10c
child 15069 c6dab988d808
equal deleted inserted replaced
14104:8d9d430b4244 14111:2a82ecb35fc7
    29 #
    29 #
    30 ###############################################################################
    30 ###############################################################################
    31 
    31 
    32 
    32 
    33 AC_PREREQ([2.61])
    33 AC_PREREQ([2.61])
    34 AC_INIT(openjdk, jdk8, build-dev@openjdk.java.net)
    34 AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
    35 
       
    36 # Do not change or remove the following line, it is needed for consistency checks:
       
    37 # DATE_WHEN_GENERATED: @DATE_WHEN_GENERATED@
       
    38 
    35 
    39 AC_CONFIG_AUX_DIR([build-aux])
    36 AC_CONFIG_AUX_DIR([build-aux])
    40 m4_include([build-aux/pkg.m4])
    37 m4_include([build-aux/pkg.m4])
    41 
    38 
    42 # Include these first...
    39 # Include these first...
    43 m4_include([basics.m4])
    40 m4_include([basics.m4])
       
    41 m4_include([basics_windows.m4])
    44 m4_include([builddeps.m4])
    42 m4_include([builddeps.m4])
    45 # ... then the rest
    43 # ... then the rest
    46 m4_include([boot-jdk.m4])
    44 m4_include([boot-jdk.m4])
    47 m4_include([build-performance.m4])
    45 m4_include([build-performance.m4])
    48 m4_include([help.m4])
    46 m4_include([help.m4])
    49 m4_include([jdk-options.m4])
    47 m4_include([jdk-options.m4])
    50 m4_include([libraries.m4])
    48 m4_include([libraries.m4])
    51 m4_include([platform.m4])
    49 m4_include([platform.m4])
    52 m4_include([source-dirs.m4])
    50 m4_include([source-dirs.m4])
    53 m4_include([toolchain.m4])
    51 m4_include([toolchain.m4])
    54 
    52 m4_include([toolchain_windows.m4])
    55 # This line needs to be here, verbatim, after all includes.
    53 
    56 # It is replaced with custom functionality when building
    54 AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
       
    55 AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
       
    56 
       
    57 # This line needs to be here, verbatim, after all includes and the dummy hook
       
    58 # definitions. It is replaced with custom functionality when building
    57 # custom sources.
    59 # custom sources.
    58 AC_DEFUN_ONCE([CUSTOM_HOOK])
    60 #CUSTOM_AUTOCONF_INCLUDE
    59 
    61 
    60 ###############################################################################
    62 # Do not change or remove the following line, it is needed for consistency checks:
    61 #
    63 DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
    62 # Initialization
    64 
       
    65 ###############################################################################
       
    66 #
       
    67 # Initialization / Boot-strapping
       
    68 #
       
    69 # The bootstrapping process needs to solve the "chicken or the egg" problem,
       
    70 # thus it jumps back and forth, each time gaining something needed later on.
    63 #
    71 #
    64 ###############################################################################
    72 ###############################################################################
    65 
    73 
    66 # Basic initialization that must happen first of all
    74 # Basic initialization that must happen first of all
    67 BASIC_INIT
    75 BASIC_INIT
       
    76 BASIC_SETUP_FUNDAMENTAL_TOOLS
    68 
    77 
    69 # Now we can determine OpenJDK build and target platforms. This is required to
    78 # Now we can determine OpenJDK build and target platforms. This is required to
    70 # have early on.
    79 # have early on.
    71 PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
    80 PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
    72 
    81 
    73 # Continue setting up basic stuff.
    82 # Continue setting up basic stuff. Most remaining code require fundamental tools.
    74 BASIC_SETUP_PATHS
    83 BASIC_SETUP_PATHS
    75 BASIC_SETUP_LOGGING
    84 BASIC_SETUP_LOGGING
    76 
    85 
       
    86 # These are needed to be able to create a configuration name (and thus the output directory)
       
    87 JDKOPT_SETUP_JDK_VARIANT
       
    88 JDKOPT_SETUP_JVM_VARIANTS
       
    89 JDKOPT_SETUP_DEBUG_LEVEL
       
    90 
       
    91 # With basic setup done, call the custom early hook.
       
    92 CUSTOM_EARLY_HOOK
       
    93 
       
    94 # To properly create a configuration name, we need to have the OpenJDK target
       
    95 # and options (variants and debug level) parsed.
       
    96 BASIC_SETUP_OUTPUT_DIR
       
    97 
    77 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
    98 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
    78 HELP_SETUP_DEPENDENCY_HELP
    99 HELP_SETUP_DEPENDENCY_HELP
    79 
   100 
    80 # Setup simple tools, that do not need have cross compilation support.
   101 # Setup tools that requires more complex handling, or that is not needed by the configure script.
    81 # Without these, we can't properly run the rest of the configure script.
   102 BASIC_SETUP_COMPLEX_TOOLS
    82 BASIC_SETUP_TOOLS
       
    83 
   103 
    84 # Check if pkg-config is available.
   104 # Check if pkg-config is available.
    85 PKG_PROG_PKG_CONFIG
   105 PKG_PROG_PKG_CONFIG
    86 
   106 
    87 # After basic tools have been setup, we can check build os specific details.
   107 # After basic tools have been setup, we can check build os specific details.
    98 # Determine OpenJDK variants, options and version numbers.
   118 # Determine OpenJDK variants, options and version numbers.
    99 #
   119 #
   100 ###############################################################################
   120 ###############################################################################
   101 
   121 
   102 # We need build & target for this.
   122 # We need build & target for this.
   103 JDKOPT_SETUP_JDK_VARIANT
       
   104 JDKOPT_SETUP_JVM_VARIANTS
       
   105 JDKOPT_SETUP_DEBUG_LEVEL
       
   106 JDKOPT_SETUP_JDK_OPTIONS
   123 JDKOPT_SETUP_JDK_OPTIONS
   107 JDKOPT_SETUP_JDK_VERSION_NUMBERS
   124 JDKOPT_SETUP_JDK_VERSION_NUMBERS
   108 
       
   109 # To properly create a configuration name, we need to have the OpenJDK target
       
   110 # and options (variants and debug level) parsed.
       
   111 BASIC_SETUP_OUTPUT_DIR
       
   112 
   125 
   113 ###############################################################################
   126 ###############################################################################
   114 #
   127 #
   115 # Setup BootJDK, used to bootstrap the build.
   128 # Setup BootJDK, used to bootstrap the build.
   116 #
   129 #
   135 # cross-compilation aware.
   148 # cross-compilation aware.
   136 #
   149 #
   137 ###############################################################################
   150 ###############################################################################
   138 
   151 
   139 TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
   152 TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
   140 TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
       
   141 # Locate the actual tools
   153 # Locate the actual tools
   142 TOOLCHAIN_SETUP_PATHS
   154 TOOLCHAIN_SETUP_PATHS
   143 
   155 
   144 # FIXME: Currently we must test this after paths but before flags. Fix!
   156 # FIXME: Currently we must test this after paths but before flags. Fix!
   145 
   157 
   149 
   161 
   150 # Configure flags for the tools
   162 # Configure flags for the tools
   151 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
   163 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
   152 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
   164 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
   153 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
   165 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
   154 
       
   155 # After we have toolchain, we can compile the uncygdrive helper
       
   156 BASIC_COMPILE_UNCYGDRIVE
       
   157 
       
   158 
   166 
   159 # Setup debug symbols (need objcopy from the toolchain for that)
   167 # Setup debug symbols (need objcopy from the toolchain for that)
   160 JDKOPT_SETUP_DEBUG_SYMBOLS
   168 JDKOPT_SETUP_DEBUG_SYMBOLS
   161 
   169 
   162 ###############################################################################
   170 ###############################################################################
   171 LIB_SETUP_FREETYPE
   179 LIB_SETUP_FREETYPE
   172 LIB_SETUP_ALSA
   180 LIB_SETUP_ALSA
   173 LIB_SETUP_MISC_LIBS
   181 LIB_SETUP_MISC_LIBS
   174 LIB_SETUP_STATIC_LINK_LIBSTDCPP
   182 LIB_SETUP_STATIC_LINK_LIBSTDCPP
   175 
   183 
       
   184 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
       
   185 BASIC_COMPILE_FIXPATH
       
   186 
   176 ###############################################################################
   187 ###############################################################################
   177 #
   188 #
   178 # We need to do some final tweaking, when everything else is done.
   189 # We need to do some final tweaking, when everything else is done.
   179 #
   190 #
   180 ###############################################################################
   191 ###############################################################################
   208 
   219 
   209 # Check for some common pitfalls
   220 # Check for some common pitfalls
   210 BASIC_TEST_USABILITY_ISSUES
   221 BASIC_TEST_USABILITY_ISSUES
   211 
   222 
   212 # At the end, call the custom hook. (Dummy macro if no custom sources available)
   223 # At the end, call the custom hook. (Dummy macro if no custom sources available)
   213 CUSTOM_HOOK
   224 CUSTOM_LATE_HOOK
   214 
   225 
   215 # We're messing a bit with internal autoconf variables to put the config.status
   226 # We're messing a bit with internal autoconf variables to put the config.status
   216 # in the output directory instead of the current directory.
   227 # in the output directory instead of the current directory.
   217 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
   228 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
   218 # Create the actual output files. Now the main work of configure is done.
   229 # Create the actual output files. Now the main work of configure is done.