Changeset 156271 in webkit
- Timestamp:
- Sep 23, 2013 8:09:34 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r156269 r156271 1 2013-09-23 Zan Dobersek <zdobersek@igalia.com> 2 3 [Autotools] Rework the build target selection 4 https://bugs.webkit.org/show_bug.cgi?id=121703 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Replace the --with-target configuration flag with target-specific --enable-*-target flags: 9 - --enable-x11-target 10 - --enable-wayland-target 11 - --enable-win32-target 12 - --enable-quartz-target 13 - --enable-directfb-target 14 15 By default, the X11 target is enabled. This default is preserved only if no --enable-*-target flag 16 is passed on the command line. When that occurs, the newly-constructed list of build targets is 17 used to determine what build targets should actually be built. So for instance, executing just 18 `./configure` would only enable the X11 target as that's the default, and executing 19 `./configure --enable-wayland-target` would only enable the Wayland target, as the defaults are 20 completely ignored. 21 22 * Source/autotools/CheckSystemAndBasicDependencies.m4: Abort if grep was not found, just in case. 23 * Source/autotools/CustomMacros.m4: The new file that contains helpful custom macros. 24 * Source/autotools/FindDependencies.m4: Use the appropriate 'enable_*_target' references instead of 'with_*target'. 25 * Source/autotools/PrintBuildConfiguration.m4: Use the new AM_APPEND_TO_DESCRIPTION macro to construct a pretty-looking 26 description string of what targets will be built. 27 * Source/autotools/ReadCommandLineArguments.m4: Replace the --with-target configuration flag and the related 28 hacks with the set of --enable-*-target flags. The new AM_DETERMINE_BUILD_TARGET_STATUS macro is used to determine 29 whether to enable specific build targets, based indirectly on the passed-in --enable-*-target flags. 30 * Source/autotools/SetupAutoconfHeader.m4: Use the appropriate 'enable_*_target' references instead of 'with_*target'. 31 * Source/autotools/SetupAutomake.m4: Use the appropriate 'enable_*_target' references instead of 'with_*target'. 32 * configure.ac: Include the new CustomMacros.m4 file. 33 1 34 2013-09-23 Claudio Saavedra <csaavedra@igalia.com> 2 35 -
trunk/Source/autotools/CheckSystemAndBasicDependencies.m4
r155246 r156271 48 48 if test -z "$MV"; then 49 49 AC_MSG_ERROR([You need 'mv' to compile WebKit]) 50 fi 51 52 AC_PATH_PROG(GREP, grep) 53 if test -z "$GREP"; then 54 AC_MSG_ERROR([You need 'grep' to compile WebKit]) 50 55 fi 51 56 -
trunk/Source/autotools/FindDependencies.m4
r155534 r156271 151 151 fi 152 152 153 # Check for target-specific dependencies. 154 if test "$with_target" = "directfb"; then 155 PKG_CHECK_MODULES(CAIRO, cairo-directfb >= cairo_required_version) 156 PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION) 157 else 158 PKG_CHECK_MODULES(CAIRO, cairo >= cairo_required_version) 159 PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION) 160 GTK_ACTUAL_VERSION=`pkg-config --modversion gtk+-$GTK_API_VERSION` 161 fi 153 PKG_CHECK_MODULES(CAIRO, cairo >= cairo_required_version) 154 PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION) 155 GTK_ACTUAL_VERSION=`pkg-config --modversion gtk+-$GTK_API_VERSION` 156 157 if test "$enable_directfb_target" = "yes"; then 158 PKG_CHECK_MODULES(CAIRO_DIRECTFB, cairo-directfb >= cairo_required_version) 159 CAIRO_CFLAGS="$CAIRO_CFLAGS $CAIRO_DIRECTFB_CFLAGS" 160 CAIRO_LIBS="$CAIRO_LIBS $CAIRO_DIRECTFB_LIBS" 161 162 PKG_CHECK_MODULES(GTK_DIRECTFB, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION) 163 GTK_CFLAGS="$GTK_CFLAGS $GTK_DIRECTFB_CFLAGS" 164 GTK_LIBS="$GTK_LIBS $GTK_DIRECTFB_LIBS" 165 fi 166 162 167 AC_SUBST(GTK_CFLAGS) 163 168 AC_SUBST(GTK_LIBS) … … 165 170 AC_SUBST(CAIRO_LIBS) 166 171 167 if test "$ with_x11_target" = "yes"; then172 if test "$enable_x11_target" = "yes"; then 168 173 # The GTK+ X11 target dependency should match the version of the master GTK+ dependency. 169 174 PKG_CHECK_MODULES(GTK_X11, gtk+-x11-$GTK_API_VERSION = $GTK_ACTUAL_VERSION) … … 187 192 # Check for XRender under Linux/Unix. Some linkers require explicit linkage (like GNU Gold), 188 193 # so we cannot rely on GTK+ pulling XRender. 189 if test "$ with_x11_target" = "yes"; then194 if test "$enable_x11_target" = "yes"; then 190 195 PKG_CHECK_MODULES([XRENDER], [xrender]) 191 196 AC_SUBST([XRENDER_CFLAGS]) … … 197 202 fi 198 203 199 if test "$ with_wayland_target" = "yes"; then204 if test "$enable_wayland_target" = "yes"; then 200 205 # The GTK+ Wayland target dependency should match the version of the master GTK+ dependency. 201 206 PKG_CHECK_MODULES(GTK_WAYLAND, gtk+-wayland-$GTK_API_VERSION = $GTK_ACTUAL_VERSION) … … 268 273 fi 269 274 270 if test "$ with_x11_target" = "yes" && test "$found_opengl" = "yes"; then275 if test "$enable_x11_target" = "yes" && test "$found_opengl" = "yes"; then 271 276 PKG_CHECK_MODULES([XCOMPOSITE], [xcomposite]) 272 277 PKG_CHECK_MODULES([XDAMAGE], [xdamage]) … … 288 293 fi 289 294 290 if test "$ with_x11_target" != "yes" && test "$with_wayland_target" = "yes" && test "enable_accelerated_compositing" != "no"; then295 if test "$enable_x11_target" != "yes" && test "$enable_wayland_target" = "yes" && test "enable_accelerated_compositing" != "no"; then 291 296 AC_MSG_WARN([Accelerated compositing for Wayland is not yet implemented, disabling due to the Wayland-only target.]) 292 297 enable_accelerated_compositing=no … … 365 370 366 371 # Check if FreeType/FontConfig are available. 367 if test "$ with_target" = "directfb"; then372 if test "$enable_directfb_target" = "yes"; then 368 373 PKG_CHECK_MODULES([FREETYPE], 369 374 [fontconfig >= fontconfig_required_version freetype2 >= freetype2_required_version harfbuzz >= harfbuzz_required_version]) -
trunk/Source/autotools/PrintBuildConfiguration.m4
r155032 r156271 1 target_description="" 2 AS_IF([test "$enable_x11_target" = "yes"], [AM_APPEND_TO_DESCRIPTION(target_description, "x11")], []) 3 AS_IF([test "$enable_wayland_target" = "yes"], [AM_APPEND_TO_DESCRIPTION(target_description, "wayland")], []) 4 AS_IF([test "$enable_win32_target" = "yes"], [AM_APPEND_TO_DESCRIPTION(target_description, "win32")], []) 5 AS_IF([test "$enable_quartz_target" = "yes"], [AM_APPEND_TO_DESCRIPTION(target_description, "quartz")], []) 6 AS_IF([test "$enable_directfb_target" = "yes"], [AM_APPEND_TO_DESCRIPTION(target_description, "directfb")], []) 7 1 8 AC_OUTPUT 2 9 … … 35 42 GTK+ configuration: 36 43 GTK+ version : $with_gtk 37 GDK targets : $ with_target44 GDK targets : $target_description 38 45 Introspection support : $enable_introspection 39 46 Generate documentation : $enable_gtk_doc -
trunk/Source/autotools/ReadCommandLineArguments.m4
r155918 r156271 59 59 AC_MSG_RESULT([$with_gtk]) 60 60 61 AC_MSG_CHECKING([the target windowing system]) 62 AC_ARG_WITH(target, 63 AC_HELP_STRING([--with-target=@<:@x11/wayland/x11,wayland/win32/quartz/directfb@:>@], [Select webkit target [default=x11]]), 64 [ 65 case "$with_target" in 66 x11|wayland|x11,wayland|win32|quartz|directfb) ;; 67 *) AC_MSG_ERROR([Invalid target: must be x11, wayland, both x11 and wayland (x11,wayland), quartz, win32, or directfb.]) ;; 68 esac 69 ], 70 [with_target="x11"]) 71 AC_MSG_RESULT([$with_target]) 72 73 # To support building for X11 and Wayland targets concurrently, the $with_target value is checked for this 74 # special case and two additional variables are introduced that denote specifically whether we're building 75 # the X11 target, the Wayland target, both of these or neither. 76 if test "$with_target" = "x11,wayland"; then 77 with_x11_target=yes 78 with_wayland_target=yes 79 elif test "$with_target" = "x11"; then 80 with_x11_target=yes 81 with_wayland_target=no 82 elif test "$with_target" = "wayland"; then 83 with_x11_target=no 84 with_wayland_target=yes 85 else 86 with_x11_target=no 87 with_wayland_target=no 61 default_build_targets="x11=yes wayland=no win32=no quartz=no directfb=no" 62 build_targets="" 63 64 AC_ARG_ENABLE([x11-target], [AC_HELP_STRING([--enable-x11-target], [enable building for the X11 target [default=yes]])], 65 [build_targets="$build_targets x11=$enable_x11_target"], []) 66 AC_ARG_ENABLE([wayland-target], [AC_HELP_STRING([--enable-wayland-target], [enable building for the Wayland target [default=auto]])], 67 [build_targets="$build_targets wayland=$enable_wayland_target"], []) 68 AC_ARG_ENABLE([win32-target], [AC_HELP_STRING([--enable-win32-target], [enable building for the Win32 target [default=no]])], 69 [build_targets="$build_targets win32=$enable_win32_target"], []) 70 AC_ARG_ENABLE([quartz-target], [AC_HELP_STRING([--enable-quartz-target], [enable building for the Quartz target [default=no]])], 71 [build_targets="$build_targets quartz=$enable_quartz_target"], []) 72 AC_ARG_ENABLE([directfb-target], [AC_HELP_STRING([--enable-directfb-target], [enable building for the DirectFB target [default=no]])], 73 [build_targets="$build_targets directfb=$enable_directfb_target"], []) 74 75 if test "$build_targets" = ""; then 76 build_targets="$default_build_targets" 88 77 fi 78 79 AM_WEBKIT_DETERMINE_BUILD_TARGET_STATUS([x11], [enable_x11_target], [build_targets]) 80 AM_WEBKIT_DETERMINE_BUILD_TARGET_STATUS([wayland], [enable_wayland_target], [build_targets]) 81 AM_WEBKIT_DETERMINE_BUILD_TARGET_STATUS([win32], [enable_win32_target], [build_targets]) 82 AM_WEBKIT_DETERMINE_BUILD_TARGET_STATUS([quartz], [enable_quartz_target], [build_targets]) 83 AM_WEBKIT_DETERMINE_BUILD_TARGET_STATUS([directfb], [enable_directfb_target], [build_targets]) 84 85 AC_MSG_CHECKING([whether to build for the Win32 target]) 86 AC_MSG_RESULT([$enable_wayland_target]) 89 87 90 88 AC_MSG_CHECKING([whether to enable spellcheck support]) -
trunk/Source/autotools/SetupAutoconfHeader.m4
r155509 r156271 32 32 AC_DEFINE([UNICODE], [1], [ ]) 33 33 AC_DEFINE([_UNICODE], [1], [ ]) 34 elif test "$ with_x11_target" = "yes" || test "$with_wayland_target" != "yes"; then34 elif test "$enable_x11_target" = "yes" || test "$enable_wayland_target" != "yes"; then 35 35 AC_DEFINE([XP_UNIX], [1], [ ]) 36 36 fi 37 37 38 if test "$ with_x11_target" = "yes"; then38 if test "$enable_x11_target" = "yes"; then 39 39 AC_DEFINE([MOZ_X11], [1], [ ]) 40 40 AC_DEFINE([WTF_PLATFORM_X11], [1], [Define if target is X11]) 41 41 fi 42 42 43 if test "$ with_wayland_target" = "yes"; then43 if test "$enable_wayland_target" = "yes"; then 44 44 AC_DEFINE([WTF_PLATFORM_WAYLAND], [1], [Define if target is Wayland]) 45 45 fi -
trunk/Source/autotools/SetupAutomake.m4
r155918 r156271 24 24 25 25 # Target conditionals. 26 AM_CONDITIONAL([TARGET_X11], [test "$ with_x11_target" = "yes"])27 AM_CONDITIONAL([TARGET_WAYLAND], [test "$ with_wayland_target" = "yes"])28 AM_CONDITIONAL([TARGET_X11_OR_WAYLAND], [test "$ with_x11_target" = "yes" || test "$with_wayland_target" = "yes"])29 AM_CONDITIONAL([TARGET_WIN32], [test "$ with_target" = "win32"])30 AM_CONDITIONAL([TARGET_QUARTZ], [test "$ with_target" = "quartz"])31 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$ with_target" = "directfb"])26 AM_CONDITIONAL([TARGET_X11], [test "$enable_x11_target" = "yes"]) 27 AM_CONDITIONAL([TARGET_WAYLAND], [test "$enable_wayland_target" = "yes"]) 28 AM_CONDITIONAL([TARGET_X11_OR_WAYLAND], [test "$enable_x11_target" = "yes" || test "$enable_wayland_target" = "yes"]) 29 AM_CONDITIONAL([TARGET_WIN32], [test "$enable_win32_target" = "yes"]) 30 AM_CONDITIONAL([TARGET_QUARTZ], [test "$enable_quartz_target" = "yes"]) 31 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$enable_directfb_target" = "yes"]) 32 32 33 33 # GStreamer feature conditionals. -
trunk/configure.ac
r154787 r156271 23 23 AC_DEFINE([USER_AGENT_GTK_MINOR_VERSION], [webkit_user_agent_minor_version], [The minor version used in user agent string]) 24 24 25 m4_include([Source/autotools/CustomMacros.m4]) 25 26 m4_include([Source/autotools/CheckSystemAndBasicDependencies.m4]) 26 27 m4_include([Source/autotools/SetupLibtool.m4])
Note: See TracChangeset
for help on using the changeset viewer.