[Chromium] Unreviewed debug build fix for r120457
[WebKit-https.git] / configure.ac
index 5866f8a..1da7975 100644 (file)
@@ -1,4 +1,4 @@
-AC_PREREQ(2.59)
+AC_PREREQ(2.60)
 
 m4_define([webkit_major_version], [1])
 m4_define([webkit_minor_version], [9])
@@ -527,40 +527,59 @@ AC_ARG_ENABLE(optimizations,
               [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
 AC_MSG_RESULT([$enable_optimizations])
 
-# check whether to enable WebGL support
+found_opengl="no"
+if test "$with_target" = "x11"; then
+    AC_CHECK_HEADERS([GL/gl.h], [found_opengl="yes"], [])
+    AC_CHECK_HEADERS([GL/glx.h], [], [found_opengl="no"])
+fi
+AC_MSG_CHECKING([which GPU acceleration backend to use])
+AC_ARG_WITH(acceleration_backend,
+            AC_HELP_STRING([--with-acceleration-backend=@<:@opengl/clutter/none@:>@],
+                           [Select accelerated backend (Clutter currently unsupported, OpenGL autodetected) [default=autodetect]]), [],
+                           [
+                                if test "$found_opengl" = "yes"; then
+                                   with_acceleration_backend="opengl";
+                                else
+                                   with_acceleration_backend="none";
+                                fi
+                           ])
+AC_MSG_RESULT([$with_acceleration_backend])
+
+# OpenGL is turned on by default (along with WebGL and accelerated compositing), but if
+# Clutter is chosen as the accelerated drawing backend, we want to disable it. COGL does 
+# not play well with OpenGL.
 AC_MSG_CHECKING([whether to enable WebGL support])
 AC_ARG_ENABLE(webgl,
-              AC_HELP_STRING([--enable-webgl], [enable support for WebGL [default=yes]]),
-              [], [if test "$with_target" = "x11"; then enable_webgl="yes"; else enable_webgl="no"; fi])
+              AC_HELP_STRING([--enable-webgl], [enable support for WebGL [default=check]]), [],
+              [
+                if test "$with_acceleration_backend" = "opengl"; then
+                    enable_webgl="yes";
+                else
+                    enable_webgl="no";
+                fi
+             ])
 AC_MSG_RESULT([$enable_webgl])
+if test "$enable_webgl" = "yes" && test "$with_acceleration_backend" != "opengl"; then
+    AC_MSG_ERROR([OpenGL must be active (and Clutter disabled) to use WebGL.])
+fi;
 
-# check whether to enable accelerated compositing support
 AC_MSG_CHECKING([whether to enable accelerated compositing support])
-AC_ARG_WITH(accelerated_compositing,
-            AC_HELP_STRING([--with-accelerated-compositing=@<:@no/opengl/cairo/clutter@:>@],
-                           [use accelerated compositing (experimental) [default=no]]),
-            [], [with_accelerated_compositing="no"])
-AC_MSG_RESULT([$with_accelerated_compositing])
-
-if test "$enable_webgl" = "yes" ||  test "$with_accelerated_compositing" = "opengl" ; then
-    if test "$with_target" != "x11"; then
-        AC_MSG_ERROR([OpenGL support is only available on X11 currently.])
-    fi
-    AC_CHECK_HEADERS([GL/gl.h], [], AC_MSG_ERROR([OpenGL header not found]))
-    AC_CHECK_HEADERS([GL/glx.h], [], AC_MSG_ERROR([GLX header not found]))
-    OPENGL_LIBS="-lGL -ldl"
-fi
-AC_SUBST([OPENGL_LIBS])
-
-if test "$with_accelerated_compositing" = "clutter"; then
-   PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
-   PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED_VERSION])
-
-   AC_SUBST(CLUTTER_CFLAGS)
-   AC_SUBST(CLUTTER_LIBS)
-   AC_SUBST(CLUTTER_GTK_CFLAGS)
-   AC_SUBST(CLUTTER_GTK_LIBS)
-fi
+AC_ARG_ENABLE(accelerated_compositing,
+            AC_HELP_STRING([--enable-accelerated-compositing], [enable support for accelerated compositing [default=check]]),
+            [
+                if test "$enableval" = "yes" && test "$with_acceleration_backend" = "none"; then
+                    AC_MSG_ERROR([OpenGL or Clutter must be active to use accelerated compositing.])
+                fi
+                enable_accelerated_compositing=$enableval;
+            ],
+            [
+                if test "$with_acceleration_backend" != "none"; then
+                    enable_accelerated_compositing="yes";
+                else
+                    enable_accelerated_compositing="no";
+                fi
+            ])
+AC_MSG_RESULT([$enable_accelerated_compositing])
 
 # check whether to enable channel messaging support
 AC_MSG_CHECKING([whether to enable HTML5 Channel Messaging support])
@@ -868,6 +887,14 @@ if test "$enable_svg" = "no"; then
    enable_svg_fonts=no
 fi
 
+# check whether to enable support for CSS box-decoration-break
+AC_MSG_CHECKING([whether to enable support for CSS box-decoration-break])
+AC_ARG_ENABLE(css_box_decoration_break,
+              AC_HELP_STRING([--enable-css-box-decoration-break],
+                             [enable support for CSS box-decoration-break (experimental) [default=yes]]),
+              [],[enable_css_box_decoration_break="yes"])
+AC_MSG_RESULT([$enable_css_box_decoration_break])
+
 # check whether to enable support for filters
 AC_MSG_CHECKING([whether to enable support for filters])
 AC_ARG_ENABLE(filters,
@@ -1014,10 +1041,6 @@ AC_ARG_ENABLE([link-prefetch],
   [],[enable_link_prefetch=no])
 AC_MSG_RESULT([$enable_link_prefetch])
 
-if test "$enable_link_prefetch" = "yes"; then 
-  AC_DEFINE([ENABLE_LINK_PREFETCH], [1], [Define to enable link prefetch support])
-fi
-
 # GObject Introspection
 AC_MSG_CHECKING([whether to enable GObject introspection support])
 AC_ARG_ENABLE([introspection],
@@ -1227,7 +1250,7 @@ if test "$enable_video" = "yes" || test "$enable_web_audio" = "yes"; then
 fi
 
 
-if test "$with_accelerated_compositing" = "clutter"; then
+if test "$with_acceleration_backend" = "clutter"; then
    PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
    PKG_CHECK_MODULES([CLUTTER_GTK],
                      [clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED_VERSION])
@@ -1238,6 +1261,11 @@ if test "$with_accelerated_compositing" = "clutter"; then
    AC_SUBST(CLUTTER_GTK_LIBS)
 fi
 
+if test "$with_acceleration_backend" = "opengl"; then
+    OPENGL_LIBS="-lGL -ldl"
+fi
+AC_SUBST([OPENGL_LIBS])
+
 # check if atspi2 is available (only needed for Webkit2 unit tests)
 if test "$enable_webkit2" = "yes"; then
    PKG_CHECK_MODULES([ATSPI2],
@@ -1335,14 +1363,14 @@ AM_CONDITIONAL([USE_WEBAUDIO_GSTREAMER], [test "$enable_web_audio" = "yes"])
 AM_CONDITIONAL([HAVE_ATSPI2], [test "$have_atspi2" = "yes"])
 
 # Accelerated compositing conditional
-AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$with_accelerated_compositing" = "cairo" || test "$with_accelerated_compositing" = "opengl" || test "$with_accelerated_compositing" = "clutter"])
-AM_CONDITIONAL([USE_TEXTURE_MAPPER_CAIRO], [test "$with_accelerated_compositing" = "cairo"])
-AM_CONDITIONAL([USE_TEXTURE_MAPPER_GL], [test "$with_accelerated_compositing" = "opengl"])
-AM_CONDITIONAL([USE_CLUTTER], [test "$with_accelerated_compositing" = "clutter"])
+AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$enable_accelerated_compositing" = "yes"])
+AM_CONDITIONAL([USE_TEXTURE_MAPPER_CAIRO], [test "$enable_accelerated_compositing" = "yes" && test "$with_acceleration_backend" = "none"])
+AM_CONDITIONAL([USE_TEXTURE_MAPPER_GL], [test "$enable_accelerated_compositing" = "yes" && test "$with_acceleration_backend" = "opengl"])
+AM_CONDITIONAL([USE_CLUTTER], [test "$with_acceleration_backend" = "clutter"])
 
 # These are the same now, but they will soon be separate.
-AM_CONDITIONAL([USE_GLX], [test "$with_accelerated_compositing" = "opengl" || test "$enable_webgl" = "yes"])
-AM_CONDITIONAL([USE_OPENGL], [test "$with_accelerated_compositing" = "opengl" || test "$enable_webgl" = "yes"])
+AM_CONDITIONAL([USE_GLX], [test "$with_acceleration_backend" = "opengl"])
+AM_CONDITIONAL([USE_OPENGL], [test "$with_acceleration_backend" = "opengl"])
 
 # IndexedDB implies LevelDB, but other features may one day require LevelDB.
 AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
@@ -1374,6 +1402,7 @@ AM_CONDITIONAL([ENABLE_INPUT_TYPE_COLOR],[test "$enable_input_type_color" = "yes
 AM_CONDITIONAL([ENABLE_INPUT_SPEECH],[test "$enable_input_speech" = "yes"])
 AM_CONDITIONAL([ENABLE_SCRIPTED_SPEECH],[test "$enable_scripted_speech" = "yes"])
 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
+AM_CONDITIONAL([ENABLE_CSS_BOX_DECORATION_BREAK],[test "$enable_css_box_decoration_break" = "yes"])
 AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
 AM_CONDITIONAL([ENABLE_MATHML], [test "$enable_mathml" = "yes"])
@@ -1404,6 +1433,7 @@ AM_CONDITIONAL([ENABLE_OPCODE_STATS],[test "$enable_opcode_stats" = "yes"])
 AM_CONDITIONAL([ENABLE_WEBKIT2],[test "$enable_webkit2" = "yes"])
 AM_CONDITIONAL([ENABLE_PLUGIN_PROCESS],[test "$enable_plugin_process" = "yes"])
 AM_CONDITIONAL([ENABLE_SPELLCHECK],[test "$enable_spellcheck" = "yes"])
+AM_CONDITIONAL([ENABLE_LINK_PREFETCH],[test "$enable_link_prefetch" = "yes"])
 AM_CONDITIONAL([ENABLE_ANIMATION_API],[test "$enable_animation_api" = "yes"])
 AM_CONDITIONAL([ENABLE_REQUEST_ANIMATION_FRAME],[test "$enable_request_animation_frame" = "yes"])
 AM_CONDITIONAL([ENABLE_TOUCH_ICON_LOADING],[test "$enable_touch_icon_loading" = "yes"])
@@ -1462,13 +1492,17 @@ Build configuration:
  Unicode backend                                          : $with_unicode_backend
  Font backend                                             : $with_font_backend
  Optimized memory allocator                               : $enable_fast_malloc
- Accelerated Compositing                                  : $with_accelerated_compositing
+ Accelerated rendering backend                            : $with_acceleration_backend
 
 Features:
+=======
+ WebGL                                                    : $enable_webgl
+ Accelerated Compositing                                  : $enable_accelerated_compositing
  Animation API                                            : $enable_animation_api
  Blob support                                             : $enable_blob
  Color input support                                      : $enable_input_type_color
  CSS3 Flexbox support                                     : $enable_css3_flexbox
+ CSS box-decoration-break support                         : $enable_css_box_decoration_break
  CSS Exclusions support                                   : $enable_css_exclusions
  CSS Regions support                                      : $enable_css_regions
  DeviceOrientation support                                : $enable_device_orientation