[Autotools] Rework the build target selection
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Sep 2013 15:09:34 +0000 (15:09 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Sep 2013 15:09:34 +0000 (15:09 +0000)
commit033e7989c1d5614f7b27719bc8f47a3903228284
treee4d507c856f2636f64aa283b1a0319822fa17fca
parent8555c897e6e8605f5f169b981ad0f93d68fdaa56
[Autotools] Rework the build target selection
https://bugs.webkit.org/show_bug.cgi?id=121703

Reviewed by Gustavo Noronha Silva.

Replace the --with-target configuration flag with target-specific --enable-*-target flags:
- --enable-x11-target
- --enable-wayland-target
- --enable-win32-target
- --enable-quartz-target
- --enable-directfb-target

By default, the X11 target is enabled. This default is preserved only if no --enable-*-target flag
is passed on the command line. When that occurs, the newly-constructed list of build targets is
used to determine what build targets should actually be built. So for instance, executing just
`./configure` would only enable the X11 target as that's the default, and executing
`./configure --enable-wayland-target` would only enable the Wayland target, as the defaults are
completely ignored.

* Source/autotools/CheckSystemAndBasicDependencies.m4: Abort if grep was not found, just in case.
* Source/autotools/CustomMacros.m4: The new file that contains helpful custom macros.
* Source/autotools/FindDependencies.m4: Use the appropriate 'enable_*_target' references instead of 'with_*target'.
* Source/autotools/PrintBuildConfiguration.m4: Use the new AM_APPEND_TO_DESCRIPTION macro to construct a pretty-looking
description string of what targets will be built.
* Source/autotools/ReadCommandLineArguments.m4: Replace the --with-target configuration flag and the related
hacks with the set of --enable-*-target flags. The new AM_DETERMINE_BUILD_TARGET_STATUS macro is used to determine
whether to enable specific build targets, based indirectly on the passed-in --enable-*-target flags.
* Source/autotools/SetupAutoconfHeader.m4: Use the appropriate 'enable_*_target' references instead of 'with_*target'.
* Source/autotools/SetupAutomake.m4: Use the appropriate 'enable_*_target' references instead of 'with_*target'.
* configure.ac: Include the new CustomMacros.m4 file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
Source/autotools/CheckSystemAndBasicDependencies.m4
Source/autotools/CustomMacros.m4 [new file with mode: 0644]
Source/autotools/FindDependencies.m4
Source/autotools/PrintBuildConfiguration.m4
Source/autotools/ReadCommandLineArguments.m4
Source/autotools/SetupAutoconfHeader.m4
Source/autotools/SetupAutomake.m4
configure.ac