Another attempt at getting these expectations right for the bots.
[WebKit-https.git] / configure.ac
index bcc0a8e..7544b56 100644 (file)
@@ -2,14 +2,14 @@ AC_PREREQ(2.60)
 
 m4_define([webkit_major_version], [1])
 m4_define([webkit_minor_version], [11])
-m4_define([webkit_micro_version], [0])
+m4_define([webkit_micro_version], [2])
 
 # This is the version we'll be using as part of our User-Agent string
 # e.g., AppleWebKit/$(webkit_user_agent_version) ...
 #
 # Sourced from Source/WebCore/Configurations/Version.xcconfig
 m4_define([webkit_user_agent_major_version], [537])
-m4_define([webkit_user_agent_minor_version], [4])
+m4_define([webkit_user_agent_minor_version], [20])
 
 AC_INIT([WebKitGTK],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
 
@@ -35,13 +35,13 @@ AC_CONFIG_SRCDIR([Source/WebCore/config.h])
 
 dnl # Libtool library version, not to confuse with API version
 dnl # see http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
-LIBWEBKITGTK_VERSION=16:0:16
+LIBWEBKITGTK_VERSION=17:1:17
 AC_SUBST([LIBWEBKITGTK_VERSION])
 
-LIBJAVASCRIPTCOREGTK_VERSION=13:5:13
+LIBJAVASCRIPTCOREGTK_VERSION=13:7:13
 AC_SUBST([LIBJAVASCRIPTCOREGTK_VERSION])
 
-LIBWEBKIT2GTK_VERSION=17:0:17
+LIBWEBKIT2GTK_VERSION=19:0:19
 AC_SUBST([LIBWEBKIT2GTK_VERSION])
 
 AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip tar-ustar])
@@ -336,44 +336,12 @@ esac
 
 AC_MSG_RESULT([$with_target])
 
-AC_MSG_CHECKING([the GStreamer version to use])
-AC_ARG_WITH([gstreamer],
-        [AS_HELP_STRING([--with-gstreamer=0.10|1.0], [the GStreamer version to use (default: 0.10)])],
-        [case "$with_gstreamer" in
-        0.10|1.0) ;;
-        *) AC_MSG_ERROR([invalid GStreamer version specified]) ;;
-        esac],
-        [with_gstreamer=0.10])
-AC_MSG_RESULT([$with_gstreamer])
-
-GSTREAMER_0_10_REQUIRED_VERSION=0.10
-GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION=0.10.30
-GSTREAMER_1_0_REQUIRED_VERSION=0.11.90
-GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION=0.11.90
-
-case "$with_gstreamer" in
-     0.10) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_0_10_REQUIRED_VERSION
-           GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION
-           GST_API_VERSION=0.10
-           ;;
-     1.0) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_1_0_REQUIRED_VERSION
-           GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION
-           GST_API_VERSION=1.0
-           ;;
-esac
-
-AC_SUBST([GST_API_VERSION])
-if test "$GST_API_VERSION" = "1.0"; then
-AC_DEFINE([GST_USE_UNSTABLE_API], [1], [Using unstable GStreamer API])
-AC_DEFINE([GST_API_VERSION_1],[1], [Using GStreamer 1.0])
-fi
-
 # minimum base dependencies
 CAIRO_REQUIRED_VERSION=1.10
 FONTCONFIG_REQUIRED_VERSION=2.4
 FREETYPE2_REQUIRED_VERSION=9.0
 GLIB_REQUIRED_VERSION=2.32.0
-LIBSOUP_REQUIRED_VERSION=2.39.2
+LIBSOUP_REQUIRED_VERSION=2.40.0
 LIBXML_REQUIRED_VERSION=2.6
 PANGO_REQUIRED_VERSION=1.21.0
 
@@ -390,6 +358,11 @@ AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :, :, gmodule gobject gthread gio)
 if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then
    AC_MSG_ERROR([You need the GLib dev tools in your path])
 fi
+
+# GResources
+GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
+AC_SUBST(GLIB_COMPILE_RESOURCES)
+
 GLIB_GSETTINGS
 
 # Check and identify which unicode backend to use
@@ -470,18 +443,6 @@ AC_SUBST(ENCHANT_CFLAGS)
 AC_SUBST(ENCHANT_LIBS)
 fi
 
-# farstream-0.1 depends on gstreamer 0.10 currently. Disable
-# media_stream if gstreamer 0.11 build support is enabled.
-if test "$GST_API_VERSION" = "1.0"; then
-   enable_media_stream=false
-fi
-if test "$enable_media_stream" = "yes"; then
-   PKG_CHECK_MODULES([FARSTREAM], [farstream-0.1],
-                     [have_farstream=yes], [enable_media_stream=false])
-   AC_SUBST([FARSTREAM_CFLAGS])
-   AC_SUBST([FARSTREAM_LIBS])
-fi
-
 PKG_CHECK_MODULES(GAIL, $GAIL_PC_NAME >= $GAIL_REQUIRED_VERSION)
 AC_SUBST(GAIL_CFLAGS)
 AC_SUBST(GAIL_LIBS)
@@ -696,14 +657,6 @@ if test "$enable_gamepad" = "yes" && test "$os_linux" = no; then
    enable_gamepad=no;
 fi
 
-# check whether to enable the indexed database API
-AC_MSG_CHECKING([whether to enable the indexed database API])
-AC_ARG_ENABLE(indexed_database,
-              AC_HELP_STRING([--enable-indexed-database],
-                             [enable the indexed database API (incomplete) [default=no]]),
-              [],[enable_indexed_database="no"])
-AC_MSG_RESULT([$enable_indexed_database])
-
 # check whether to enable HTML5 audio/video support
 AC_MSG_CHECKING([whether to enable HTML5 video support])
 AC_ARG_ENABLE(video,
@@ -749,14 +702,6 @@ if test "$enable_svg" = "no"; then
    enable_svg_fonts=no
 fi
 
-# check whether to enable support for filters
-AC_MSG_CHECKING([whether to enable support for filters])
-AC_ARG_ENABLE(filters,
-              AC_HELP_STRING([--enable-filters],
-                             [enable support for filters (experimental) [default=yes]]),
-              [],[enable_filters="yes"])
-AC_MSG_RESULT([$enable_filters])
-
 # check whether to enable support for SVG fonts
 AC_MSG_CHECKING([whether to enable support for SVG fonts])
 AC_ARG_ENABLE(svg_fonts,
@@ -771,14 +716,6 @@ if test "$enable_svg_fonts" = "yes" && test "$enable_svg" = "no"; then
    enable_svg=yes
 fi
 
-# check whether to enable Web Socket support
-AC_MSG_CHECKING([whether to enable Web Sockets support])
-AC_ARG_ENABLE(web_sockets,
-              AC_HELP_STRING([--enable-web-sockets],
-                             [enable support for Web Sockets [default=yes]]),
-              [],[enable_web_sockets="yes"])
-AC_MSG_RESULT([$enable_web_sockets])
-
 # check whether to enable Web Audio support
 AC_MSG_CHECKING([whether to enable Web Audio support])
 AC_ARG_ENABLE(web_audio,
@@ -806,11 +743,68 @@ AC_MSG_RESULT([$enable_fast_malloc])
 # check whether to enable debug symbols
 AC_MSG_CHECKING([whether to enable debug symbols])
 AC_ARG_ENABLE(debug_symbols,
-              AC_HELP_STRING([--enable-debug-symbols],
+              AC_HELP_STRING([--enable-debug-symbols=yes|no|min|full],
                              [enable debug symbols default=no, default=yes for debug builds]),
               [],[if test "$enable_debug" = "yes"; then enable_debug_symbols="yes"; else enable_debug_symbols="no"; fi])
+
+case "$enable_debug_symbols" in
+  yes) enable_debug_symbols="full" ;;
+  no|min|full) ;;
+  *) AC_MSG_ERROR([Invalid debug symbols option: must be yes, no, min or full.]) ;;
+esac
 AC_MSG_RESULT([$enable_debug_symbols])
 
+#selecting GStreamer version
+AC_MSG_CHECKING([the GStreamer version to use])
+AC_ARG_WITH([gstreamer],
+        [AS_HELP_STRING([--with-gstreamer=1.0|0.10|auto], [the GStreamer version to use (default: auto, tries 1.0 first, 0.10 is fallback)])],
+        [case "$with_gstreamer" in
+        0.10|1.0|auto) ;;
+        *) AC_MSG_ERROR([invalid GStreamer version specified]) ;;
+        esac],
+        [with_gstreamer=auto])
+AC_MSG_RESULT([$with_gstreamer])
+
+GSTREAMER_0_10_REQUIRED_VERSION=0.10
+GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION=0.10.30
+GSTREAMER_1_0_REQUIRED_VERSION=1.0.3
+GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION=1.0.3
+
+if test "$enable_video" = "yes" || test "$enable_web_audio" = "yes"; then
+   if test "$with_gstreamer" = "auto"; then
+       gstreamer_modules="gstreamer-1.0 >= $GSTREAMER_1_0_REQUIRED_VERSION
+                          gstreamer-app-1.0
+                          gstreamer-audio-1.0
+                          gstreamer-fft-1.0
+                          gstreamer-base-1.0
+                          gstreamer-pbutils-1.0
+                          gstreamer-plugins-base-1.0 >= $GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION
+                          gstreamer-video-1.0";
+       PKG_CHECK_MODULES([GSTREAMER_1_0], [$gstreamer_modules], [with_gstreamer=1.0], [with_gstreamer=0.10])
+       AC_MSG_NOTICE([Selected GStreamer $with_gstreamer])
+   fi
+else
+   if test "$with_gstreamer" != "auto"; then
+       AC_MSG_WARN([You have specified GStreamer $with_gstreamer version but it will not be used because neither HTML5 Video nor Web Audio are enabled])
+   fi
+fi
+
+case "$with_gstreamer" in
+     0.10) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_0_10_REQUIRED_VERSION
+           GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION
+           GST_API_VERSION=0.10
+           ;;
+     1.0) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_1_0_REQUIRED_VERSION
+           GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION
+           GST_API_VERSION=1.0
+           ;;
+esac
+
+AC_SUBST([GST_API_VERSION])
+if test "$GST_API_VERSION" = "1.0"; then
+   AC_DEFINE([GST_API_VERSION_1],[1], [Using GStreamer 1.0])
+fi
+
 # check whether to enable debug features
 AC_MSG_CHECKING([whether to enable debug features])
 AC_ARG_ENABLE(debug_features,
@@ -852,15 +846,15 @@ AC_ARG_ENABLE([introspection],
   [],[enable_introspection=no])
 AC_MSG_RESULT([$enable_introspection])
 
-# Enable css shaders if unstable_features, css_filters and
-# accelerated_compositing are turned on.
-AC_MSG_CHECKING([whether to enable CSS Shaders])
+# Enable CSS Filters and Shaders if unstable_features and accelerated_compositing are turned on.
+enable_css_filters=no;
+enable_css_shaders=no;
+AC_MSG_CHECKING([whether to enable CSS Filters and Shaders])
 if test "$enable_unstable_features" = "yes" && test "$enable_accelerated_compositing" = "yes" && test "$with_acceleration_backend" = "opengl"; then
-    enable_css_shaders=yes;
     enable_css_filters=yes;
+    enable_css_shaders=yes;
 fi
 AC_MSG_RESULT([$enable_css_filters])
-AC_MSG_RESULT([$enable_css_shaders])
 
 G_IR_SCANNER=
 G_IR_COMPILER=
@@ -882,26 +876,16 @@ AC_SUBST([G_IR_SCANNER])
 AC_SUBST([G_IR_COMPILER])
 AC_SUBST([G_IR_GENERATE])
 
-# determine the font backend
-AC_MSG_CHECKING([the font backend to use])
-AC_ARG_WITH(font_backend,
-            AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
-                           [Select font backend [default=freetype]]),
-            [],[with_font_backend="freetype"])
-
-case "$with_font_backend" in
-     freetype|pango) ;;
-     *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
-esac
-AC_MSG_RESULT([$with_font_backend])
-
 if test "$host_cpu" = "sh4"; then
    CXXFLAGS="$CXXFLAGS -mieee -w"
    CFLAGS="$CFLAGS -mieee -w"
 fi
 
 # Add '-g' flag to gcc to build with debug symbols
-if test "$enable_debug_symbols" = "yes"; then
+if test "$enable_debug_symbols" = "min"; then
+   CXXFLAGS="$CXXFLAGS -g1"
+   CFLAGS="$CFLAGS -g1"
+elif test "$enable_debug_symbols" != "no"; then
    CXXFLAGS="$CXXFLAGS -g"
    CFLAGS="$CFLAGS -g"
 fi
@@ -924,21 +908,25 @@ PKG_CHECK_MODULES([LIBSOUP],
 AC_SUBST([LIBSOUP_CFLAGS])
 AC_SUBST([LIBSOUP_LIBS])
 
+PKG_CHECK_MODULES([LIBSECRET], [libsecret-1])
+AC_SUBST([LIBSECRET_CFLAGS])
+AC_SUBST([LIBSECRET_LIBS])
+
 # check if FreeType/FontConfig are available
-if test "$with_font_backend" = "freetype"; then
-   if test "$with_target" = "directfb"; then
-   PKG_CHECK_MODULES([FREETYPE],
-                     [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
-                     freetype2 >= $FREETYPE2_REQUIRED_VERSION])
-   else
-   PKG_CHECK_MODULES([FREETYPE],
-                     [cairo-ft
-                     fontconfig >= $FONTCONFIG_REQUIRED_VERSION
-                     freetype2 >= $FREETYPE2_REQUIRED_VERSION])
-   fi
-   AC_SUBST([FREETYPE_CFLAGS])
-   AC_SUBST([FREETYPE_LIBS])
+if test "$with_target" = "directfb"; then
+PKG_CHECK_MODULES([FREETYPE],
+                  [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
+                  freetype2 >= $FREETYPE2_REQUIRED_VERSION
+                  harfbuzz])
+else
+PKG_CHECK_MODULES([FREETYPE],
+                  [cairo-ft
+                  fontconfig >= $FONTCONFIG_REQUIRED_VERSION
+                  freetype2 >= $FREETYPE2_REQUIRED_VERSION
+                  harfbuzz])
 fi
+AC_SUBST([FREETYPE_CFLAGS])
+AC_SUBST([FREETYPE_LIBS])
 
 # check if SQLite3 is available. Error out only if one of the
 # features hard-depending on it is enabled while SQLite3 is
@@ -999,6 +987,21 @@ if test "$enable_video" = "yes" || test "$enable_web_audio" = "yes"; then
    AC_SUBST([GSTREAMER_LIBS])
 fi
 
+# farstream-0.1 depends on gstreamer 0.10 currently. Disable
+# media_stream if gstreamer 1.0 build support is enabled.
+if test "$have_gstreamer" != "yes" || test "$GST_API_VERSION" = "1.0"; then
+   if test "$enable_media_stream" = "yes"; then
+      AC_MSG_WARN([Disabling Media Stream because no GStreamer 0.10 support is enabled])
+   fi
+   enable_media_stream=false
+fi
+if test "$enable_media_stream" = "yes"; then
+   PKG_CHECK_MODULES([FARSTREAM], [farstream-0.1],
+                     [have_farstream=yes], [enable_media_stream=false])
+   AC_SUBST([FARSTREAM_CFLAGS])
+   AC_SUBST([FARSTREAM_LIBS])
+fi
+
 acceleration_backend_description=$with_acceleration_backend
 if test "$with_acceleration_backend" = "clutter"; then
    PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
@@ -1031,16 +1034,6 @@ if test "$with_acceleration_backend" = "opengl"; then
 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],
-                     [atspi-2 >= $ATSPI2_REQUIRED_VERSION],
-                     [have_atspi2=yes], [have_atspi2=no])
-
-   AC_SUBST([ATSPI2_CFLAGS])
-   AC_SUBST([ATSPI2_LIBS])
-fi
-
 if test "$enable_gamepad" = "yes"; then
    PKG_CHECK_MODULES([GAMEPAD], [gio-unix-2.0 gudev-1.0])
 
@@ -1078,6 +1071,13 @@ if test "$enable_webkit2" = "yes"; then
    if test "$have_gtk_unix_printing" = "yes"; then
        AC_DEFINE([HAVE_GTK_UNIX_PRINTING], [1], [Define if GTK+ UNIX Printing is available])
    fi
+
+   # On some Linux/Unix platforms, shm_* may only be available if linking
+   # against librt
+   if test "$os_win32" = "no"; then
+       AC_SEARCH_LIBS([shm_open], [rt], [SHM_LIBS="-lrt"])
+       AC_SUBST(SHM_LIBS)
+   fi
 fi
 
 # Plugin Process
@@ -1101,6 +1101,16 @@ AC_SUBST(GTK2_LIBS)
 
 GTK_DOC_CHECK([1.10])
 
+# We need atspi2 for Webkit2 unit tests
+if test "$enable_webkit2" = "yes"; then
+   PKG_CHECK_MODULES([ATSPI2],
+                     [atspi-2 >= $ATSPI2_REQUIRED_VERSION],
+                     [have_atspi2=yes], [have_atspi2=no])
+
+   AC_SUBST([ATSPI2_CFLAGS])
+   AC_SUBST([ATSPI2_LIBS])
+fi
+
 # OS conditionals
 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
@@ -1118,10 +1128,6 @@ AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
 AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
 AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
 
-# Font backend conditionals
-AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
-AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
-
 # GStreamer feature conditional
 AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"])
 AM_CONDITIONAL([USE_WEBAUDIO_GSTREAMER], [test "$enable_web_audio" = "yes"])
@@ -1141,10 +1147,6 @@ AM_CONDITIONAL([USE_EGL], [test "$enable_egl" = "yes"])
 AM_CONDITIONAL([USE_GLES2], [test "$enable_gles2" = "yes"])
 AM_CONDITIONAL([USE_GLX], [test "$enable_glx" = "yes"])
 
-# IndexedDB implies LevelDB, but other features may one day require LevelDB.
-AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
-AM_CONDITIONAL([USE_LEVELDB],[test "$enable_indexed_database" = "yes"])
-
 # Farstream feature conditional
 AM_CONDITIONAL([USE_FARSTREAM], [test "$have_farstream" = "yes"])
 
@@ -1154,7 +1156,6 @@ AM_CONDITIONAL([ENABLE_UNSTABLE_FEATURES],[test "$enable_unstable_features" = "y
 AM_CONDITIONAL([ENABLE_WEBGL],[test "$enable_webgl" = "yes"])
 AM_CONDITIONAL([ENABLE_GAMEPAD],[test "$enable_gamepad" = "yes"])
 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
-AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
 AM_CONDITIONAL([ENABLE_MEDIA_STREAM],[test "$enable_media_stream" = "yes"])
@@ -1180,6 +1181,7 @@ GNUmakefile
 
 AC_CONFIG_FILES([
 Source/WebKit/gtk/webkit/webkitversion.h
+Source/WebKit/gtk/po/POTFILES
 DerivedSources/WebCore/UserAgentGtk.h:Source/WebCore/platform/gtk/UserAgentGtk.h.in
 ])
 
@@ -1216,14 +1218,12 @@ Build configuration:
  Enable GCC build optimization                            : $enable_optimizations
  Code coverage support                                    : $enable_coverage
  Unicode backend                                          : $with_unicode_backend
- Font backend                                             : $with_font_backend
  Optimized memory allocator                               : $enable_fast_malloc
  Accelerated rendering backend                            : $acceleration_backend_description
 
 Features:
 =======
  Accelerated Compositing                                  : $enable_accelerated_compositing
- Filters support                                          : $enable_filters
  Gamepad support                                          : $enable_gamepad
  Geolocation support                                      : $enable_geolocation
  HTML5 video element support                              : $enable_video