3 m4_define([webkit_major_version], [1])
4 m4_define([webkit_minor_version], [9])
5 m4_define([webkit_micro_version], [2])
7 # This is the version we'll be using as part of our User-Agent string
8 # e.g., AppleWebKit/$(webkit_user_agent_version) ...
10 # Sourced from Source/WebCore/Configurations/Version.xcconfig
11 m4_define([webkit_user_agent_major_version], [536])
12 m4_define([webkit_user_agent_minor_version], [10])
14 AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
16 AC_CONFIG_MACRO_DIR([Source/autotools])
17 AC_CONFIG_AUX_DIR([Source/autotools])
18 AC_SUBST(ACLOCAL_AMFLAGS, "-I Source/autotools")
20 AC_CONFIG_HEADERS([autotoolsconfig.h])
23 WEBKIT_MAJOR_VERSION=webkit_major_version
24 WEBKIT_MINOR_VERSION=webkit_minor_version
25 WEBKIT_MICRO_VERSION=webkit_micro_version
26 WEBKIT_USER_AGENT_MAJOR_VERSION=webkit_user_agent_major_version
27 WEBKIT_USER_AGENT_MINOR_VERSION=webkit_user_agent_minor_version
28 AC_SUBST(WEBKIT_MAJOR_VERSION)
29 AC_SUBST(WEBKIT_MINOR_VERSION)
30 AC_SUBST(WEBKIT_MICRO_VERSION)
31 AC_SUBST(WEBKIT_USER_AGENT_MAJOR_VERSION)
32 AC_SUBST(WEBKIT_USER_AGENT_MINOR_VERSION)
34 AC_CONFIG_SRCDIR([Source/WebCore/config.h])
36 dnl # Libtool library version, not to confuse with API version
37 dnl # see http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
38 LIBWEBKITGTK_VERSION=13:1:13
39 AC_SUBST([LIBWEBKITGTK_VERSION])
41 AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip tar-ustar])
43 # Use AM_SILENT_RULES if present
44 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
46 # host checking - inspired by the GTK+ configure.in
47 # TODO: move these to webkit.m4?
48 AC_MSG_CHECKING([for native Win32])
57 AC_MSG_RESULT([$os_win32])
72 gnu* | linux* | k*bsd*-gnu)
80 # If CFLAGS and CXXFLAGS are unset, default to empty.
81 # This is to tell automake not to include '-g' if C{XX,}FLAGS is not set
82 # For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler
83 if test -z "$CXXFLAGS"; then
86 if test -z "$CFLAGS"; then
92 AC_PATH_PROG(PERL, perl)
93 if test -z "$PERL"; then
94 AC_MSG_ERROR([You need 'perl' to compile WebKit])
97 AC_PATH_PROG(PYTHON, python)
98 if test -z "$PYTHON"; then
99 AC_MSG_ERROR([You need 'python' to compile WebKit])
102 AC_PATH_PROG(BISON, bison)
103 if test -z "$BISON"; then
104 AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit])
108 if test -z "$MV"; then
109 AC_MSG_ERROR([You need 'mv' to compile WebKit])
119 # Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
122 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
125 # C/C++ Language Features
138 # use dolt to speedup the build
141 AC_PATH_PROG(FLEX, flex)
142 if test -z "$FLEX"; then
143 AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit])
145 FLEX_VERSION=`$FLEX --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'`
146 AX_COMPARE_VERSION([2.5.33],[gt],[$FLEX_VERSION],
147 AC_MSG_WARN([You need at least version 2.5.33 of the 'flex' lexer generator to compile WebKit correctly]))
150 AC_PATH_PROG(GPERF, gperf)
151 if test -z "$GPERF"; then
152 AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
155 # check for -fvisibility=hidden compiler support (GCC >= 4)
156 saved_CFLAGS="$CFLAGS"
157 CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
158 AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
159 AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
160 [ AC_MSG_RESULT([yes])
161 SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
163 CFLAGS="$saved_CFLAGS"
164 AC_SUBST(SYMBOL_VISIBILITY)
165 AC_SUBST(SYMBOL_VISIBILITY_INLINES)
167 # Disable C++0x compat warnings for GCC >= 4.6.0 until we build
170 TMPCXXFLAGS=$CXXFLAGS
171 CXXFLAGS="-Wall -Werror"
172 AC_MSG_CHECKING([if we have to disable C++0x compat warnings for GCC >= 4.6.0])
177 extern std::nullptr_t nullptr;
179 disable_cxx0x_compat=no,
180 disable_cxx0x_compat=yes)
181 AC_MSG_RESULT($disable_cxx0x_compat)
182 if test "$disable_cxx0x_compat" = yes; then
183 CXXFLAGS="$TMPCXXFLAGS -Wno-c++0x-compat"
185 CXXFLAGS="$TMPCXXFLAGS"
189 # pthread (not needed on Windows)
190 if test "$os_win32" = "no"; then
191 AC_CHECK_HEADERS([pthread.h],
192 AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exists]),
193 AC_MSG_ERROR([pthread support is required to build WebKit]))
194 AC_CHECK_LIB(pthread, pthread_rwlock_init,
195 AC_DEFINE([HAVE_PTHREAD_RWLOCK],[1],[Define if pthread rwlock is present]),
196 AC_MSG_WARN([pthread rwlock support is not available]))
199 # check for libjpeg the way Gtk does it.
200 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
201 jpeg_ok=yes, jpeg_ok=no
202 AC_MSG_ERROR([JPEG library (libjpeg) not found]))
203 if test "$jpeg_ok" = yes; then
204 AC_MSG_CHECKING([for jpeglib])
210 #include <jpeglib.h>],
213 AC_MSG_RESULT($jpeg_ok)
214 if test "$jpeg_ok" = yes; then
216 # should we check for progressive JPEG like GTK+ as well?
218 AC_MSG_ERROR([JPEG library (libjpeg) not found])
221 AC_SUBST([JPEG_LIBS])
223 # Check for libpng the way Gtk+ does it
224 for l in libpng libpng14 libpng12; do
225 AC_MSG_CHECKING(for $l)
226 if $PKG_CONFIG --exists $l ; then
228 PNG_LIBS=`$PKG_CONFIG --libs $l`
236 if test "$png_ok" != yes; then
237 AC_CHECK_LIB(png, png_read_info,
238 [AC_CHECK_HEADER(png.h,
241 AC_MSG_ERROR([PNG library (libpng) not found]), -lz -lm)
242 if test "$png_ok" = yes; then
243 AC_MSG_CHECKING([for png_structp in png.h])
244 AC_TRY_COMPILE([#include <png.h>],
245 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
248 AC_MSG_RESULT($png_ok)
249 if test "$png_ok" = yes; then
252 AC_MSG_ERROR([PNG library (libpng) not found])
255 AC_MSG_ERROR([PNG library (libpng) not found])
261 if test "$os_win32" = "yes"; then
263 SHLWAPI_LIBS=-lshlwapi
266 AC_SUBST([WINMM_LIBS])
267 AC_SUBST([SHLWAPI_LIBS])
268 AC_SUBST([OLE32_LIBS])
271 # determine the GTK+ version to use
272 AC_MSG_CHECKING([the GTK+ version to use])
274 [AS_HELP_STRING([--with-gtk=2.0|3.0], [the GTK+ version to use (default: 3.0)])],
277 *) AC_MSG_ERROR([invalid GTK+ version specified]) ;;
280 AC_MSG_RESULT([$with_gtk])
282 GTK2_REQUIRED_VERSION=2.10
283 GAIL2_REQUIRED_VERSION=1.8
284 GTK3_REQUIRED_VERSION=3.4.0
285 GAIL3_REQUIRED_VERSION=3.0
288 2.0) GTK_REQUIRED_VERSION=$GTK2_REQUIRED_VERSION
290 WEBKITGTK_API_MAJOR_VERSION=1
291 WEBKITGTK_API_MINOR_VERSION=0
292 WEBKITGTK_API_VERSION=1.0
293 WEBKITGTK_PC_NAME=webkit
295 GAIL_REQUIRED_VERSION=$GAIL2_REQUIRED_VERSION
297 3.0) GTK_REQUIRED_VERSION=$GTK3_REQUIRED_VERSION
299 WEBKITGTK_API_MAJOR_VERSION=3
300 WEBKITGTK_API_MINOR_VERSION=0
301 WEBKITGTK_API_VERSION=3.0
302 WEBKITGTK_PC_NAME=webkitgtk
303 GAIL_PC_NAME=gail-3.0
304 GAIL_REQUIRED_VERSION=$GAIL3_REQUIRED_VERSION
308 AC_SUBST([WEBKITGTK_API_MAJOR_VERSION])
309 AC_SUBST([WEBKITGTK_API_MINOR_VERSION])
310 AC_SUBST([WEBKITGTK_API_VERSION])
311 AC_SUBST([WEBKITGTK_PC_NAME])
312 AC_SUBST([GTK_API_VERSION])
313 AM_CONDITIONAL([GTK_API_VERSION_2],[test "$GTK_API_VERSION" = "2.0"])
315 # determine the GDK/GTK+ target
316 AC_MSG_CHECKING([the target windowing system])
318 AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
319 [Select webkit target [default=x11]]),
320 [],[with_target="x11"])
322 case "$with_target" in
323 x11|win32|quartz|directfb) ;;
324 *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
327 AC_MSG_RESULT([$with_target])
329 AC_MSG_CHECKING([the GStreamer version to use])
330 AC_ARG_WITH([gstreamer],
331 [AS_HELP_STRING([--with-gstreamer=0.10|1.0], [the GStreamer version to use (default: 0.10)])],
332 [case "$with_gstreamer" in
334 *) AC_MSG_ERROR([invalid GStreamer version specified]) ;;
336 [with_gstreamer=0.10])
337 AC_MSG_RESULT([$with_gstreamer])
339 GSTREAMER_0_10_REQUIRED_VERSION=0.10
340 GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION=0.10.30
341 GSTREAMER_1_0_REQUIRED_VERSION=1.0
342 GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION=0.11.90
344 case "$with_gstreamer" in
345 0.10) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_0_10_REQUIRED_VERSION
346 GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION
349 1.0) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_1_0_REQUIRED_VERSION
350 GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION
355 AC_SUBST([GST_API_VERSION])
356 if test "$GST_API_VERSION" = "1.0"; then
357 AC_DEFINE([GST_USE_UNSTABLE_API], [1], [Using unstable GStreamer API])
358 AC_DEFINE([GST_API_VERSION_1],[1], [Using GStreamer 1.0])
361 # minimum base dependencies
362 CAIRO_REQUIRED_VERSION=1.10
363 FONTCONFIG_REQUIRED_VERSION=2.4
364 FREETYPE2_REQUIRED_VERSION=9.0
365 GLIB_REQUIRED_VERSION=2.32.0
366 LIBSOUP_REQUIRED_VERSION=2.37.92
367 LIBXML_REQUIRED_VERSION=2.6
368 PANGO_REQUIRED_VERSION=1.21.0
371 LIBXSLT_REQUIRED_VERSION=1.1.7
372 SQLITE_REQUIRED_VERSION=3.0
373 ENCHANT_REQUIRED_VERSION=0.22
374 CLUTTER_REQUIRED_VERSION=1.8.2
375 CLUTTER_GTK_REQUIRED_VERSION=1.0.2
376 ATSPI2_REQUIRED_VERSION=2.2.1
378 # Check for glib and required utilities
379 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :, :, gmodule gobject gthread gio)
380 if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then
381 AC_MSG_ERROR([You need the GLib dev tools in your path])
385 # Check and identify which unicode backend to use
386 AC_MSG_CHECKING([which Unicode backend to use])
387 AC_ARG_WITH(unicode_backend,
388 AC_HELP_STRING([--with-unicode-backend=@<:@icu/glib@:>@],
389 [Select Unicode backend (WARNING: the glib-based backend is slow, and incomplete) [default=icu]]),
390 [],[with_unicode_backend="icu"])
392 case "$with_unicode_backend" in
394 *) AC_MSG_ERROR([Invalid Unicode backend: must be icu or glib.]) ;;
397 AC_MSG_RESULT([$with_unicode_backend])
399 if test "$with_unicode_backend" = "icu"; then
400 # TODO: use pkg-config (after CFLAGS in their .pc files are cleaned up)
403 UNICODE_CFLAGS="-I$srcdir/Source/JavaScriptCore/icu -I$srcdir/Source/WebCore/icu"
404 UNICODE_LIBS="-licucore"
408 UNICODE_LIBS="-licui18n -licuuc"
411 AC_PATH_PROG(icu_config, icu-config, no)
412 if test "$icu_config" = "no"; then
413 AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.])
416 # We don't use --cflags as this gives us a lot of things that we don't
417 # necessarily want, like debugging and optimization flags
418 # See man (1) icu-config for more info.
419 UNICODE_CFLAGS=`$icu_config --cppflags`
420 UNICODE_LIBS=`$icu_config --ldflags-libsonly`
425 if test "$with_unicode_backend" = "glib"; then
426 PKG_CHECK_MODULES([UNICODE], [glib-2.0 pango >= $PANGO_REQUIRED_VERSION])
429 AC_SUBST([UNICODE_CFLAGS])
430 AC_SUBST([UNICODE_LIBS])
432 PKG_CHECK_MODULES([ZLIB], [zlib])
433 AC_SUBST([ZLIB_CFLAGS])
434 AC_SUBST([ZLIB_LIBS])
436 GETTEXT_PACKAGE=$PACKAGE-$GTK_API_VERSION
437 AC_SUBST(GETTEXT_PACKAGE)
438 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
439 [The gettext catalog name])
441 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
442 AC_SUBST(LIBXML_CFLAGS)
443 AC_SUBST(LIBXML_LIBS)
445 PKG_CHECK_MODULES(PANGO,
446 [pango >= $PANGO_REQUIRED_VERSION
448 AC_SUBST(PANGO_CFLAGS)
451 AC_MSG_CHECKING([whether to enable spellcheck support])
452 AC_ARG_ENABLE([spellcheck],
453 [AS_HELP_STRING([--enable-spellcheck],[enable support for spellcheck])],
454 [],[enable_spellcheck="yes"])
455 AC_MSG_RESULT([$enable_spellcheck])
457 if test "$enable_spellcheck" = "yes"; then
458 PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED_VERSION, [], [enable_spellcheck="no"])
459 AC_SUBST(ENCHANT_CFLAGS)
460 AC_SUBST(ENCHANT_LIBS)
463 PKG_CHECK_MODULES(GAIL, $GAIL_PC_NAME >= $GAIL_REQUIRED_VERSION)
464 AC_SUBST(GAIL_CFLAGS)
467 # check for target-specific dependencies
468 if test "$with_target" = "directfb"; then
469 PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION)
470 PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION)
471 AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB])
473 PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
474 PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
476 if test "$with_target" = "x11" && test "$os_win32" = "no"; then
478 PKG_CHECK_MODULES([XT],
480 [xt_has_pkg_config=yes],
481 [xt_has_pkg_config=no])
482 # some old versions of Xt do not provide xt.pc, so try to link against Xt
483 # and if it's installed fall back to just adding -lXt
484 if test "$xt_has_pkg_config" = "no"; then
485 # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
486 # we don't care about the XtOpenDisplay symbol but only about the
488 AC_CHECK_LIB([Xt], [XtOpenDisplay],
489 [XT_CFLAGS=""; XT_LIBS="-lXt"],
490 [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
492 AC_SUBST([XT_CFLAGS])
494 AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
499 AC_SUBST(CAIRO_CFLAGS)
502 # check whether to build with debugging enabled
503 AC_MSG_CHECKING([whether to do a debug build])
505 AC_HELP_STRING([--enable-debug],
506 [turn on debugging [default=no]]),
507 [],[enable_debug="no"])
508 AC_MSG_RESULT([$enable_debug])
510 # check whether to enable optimized builds
511 AC_MSG_CHECKING([whether to enable optimized builds])
512 AC_ARG_ENABLE(optimizations,
513 AC_HELP_STRING([--enable-optimizations],
514 [turn on optimize builds (GCC only)
516 [enable_optimizations=$enableval],
517 [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
518 AC_MSG_RESULT([$enable_optimizations])
520 # check whether to enable WebGL support
521 AC_MSG_CHECKING([whether to enable WebGL support])
523 AC_HELP_STRING([--enable-webgl], [enable support for WebGL [default=yes]]),
524 [], [if test "$with_target" = "x11"; then enable_webgl="yes"; else enable_webgl="no"; fi])
525 AC_MSG_RESULT([$enable_webgl])
527 # check whether to enable accelerated compositing support
528 AC_MSG_CHECKING([whether to enable accelerated compositing support])
529 AC_ARG_WITH(accelerated_compositing,
530 AC_HELP_STRING([--with-accelerated-compositing=@<:@no/opengl/cairo/clutter@:>@],
531 [use accelerated compositing (experimental) [default=no]]),
532 [], [with_accelerated_compositing="no"])
533 AC_MSG_RESULT([$with_accelerated_compositing])
535 if test "$enable_webgl" = "yes" || test "$with_accelerated_compositing" = "opengl" ; then
536 if test "$with_target" != "x11"; then
537 AC_MSG_ERROR([OpenGL support is only available on X11 currently.])
539 AC_CHECK_HEADERS([GL/gl.h], [], AC_MSG_ERROR([OpenGL header not found]))
540 AC_CHECK_HEADERS([GL/glx.h], [], AC_MSG_ERROR([GLX header not found]))
541 OPENGL_LIBS="-lGL -ldl"
543 AC_SUBST([OPENGL_LIBS])
545 if test "$with_accelerated_compositing" = "clutter"; then
546 PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
547 PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED_VERSION])
549 AC_SUBST(CLUTTER_CFLAGS)
550 AC_SUBST(CLUTTER_LIBS)
551 AC_SUBST(CLUTTER_GTK_CFLAGS)
552 AC_SUBST(CLUTTER_GTK_LIBS)
555 # check whether to enable channel messaging support
556 AC_MSG_CHECKING([whether to enable HTML5 Channel Messaging support])
557 AC_ARG_ENABLE(channel_messaging,
558 AC_HELP_STRING([--enable-channel-messaging],
559 [enable HTML5 channel messaging support [default=yes]]),
560 [],[enable_channel_messaging="yes"])
561 AC_MSG_RESULT([$enable_channel_messaging])
563 # check whether to enable legacy notifications
564 AC_MSG_CHECKING([whether to enable legacy notifications])
565 AC_ARG_ENABLE(legacy_notifications,
566 AC_HELP_STRING([--enable-legacy-notifications],
567 [enable legacy notifications [default=no]]),
568 [],[enable_legacy_notifications="no"])
569 AC_MSG_RESULT([$enable_legacy_notifications])
571 # check whether to enable notifications
572 AC_MSG_CHECKING([whether to enable notifications])
573 AC_ARG_ENABLE(notifications,
574 AC_HELP_STRING([--enable-notifications],
575 [enable notifications [default=no]]),
576 [],[enable_notifications="no"])
577 AC_MSG_RESULT([$enable_notifications])
579 # check whether to enable the meter tag
580 AC_MSG_CHECKING([whether to enable HTML5 meter tag])
581 AC_ARG_ENABLE(meter_tag,
582 AC_HELP_STRING([--enable-meter-tag],
583 [enable HTML5 meter [default=yes]]),
584 [],[enable_meter_tag="yes"])
585 AC_MSG_RESULT([$enable_meter_tag])
587 # check whether to enable HTML5 Microdata support
588 AC_MSG_CHECKING([whether to enable HTML5 Microdata support])
589 AC_ARG_ENABLE(microdata,
590 AC_HELP_STRING([--enable-microdata],
591 [enable HTML5 microdata support [default=no]]),
592 [],[enable_microdata="no"])
593 AC_MSG_RESULT([$enable_microdata])
595 # check whether to enable page visibility API.
596 AC_MSG_CHECKING([whether to enable Page Visibility API support])
597 AC_ARG_ENABLE(page_visibility_api,
598 AC_HELP_STRING([--enable-page-visibility-api],
599 [enable page visibility api[default=no]]),
600 [],[enable_page_visibility_api="no"])
601 AC_MSG_RESULT([$enable_page_visibility_api])
603 # check whether to enable the progress tag
604 AC_MSG_CHECKING([whether to enable HTML5 progress tag])
605 AC_ARG_ENABLE(progress_tag,
606 AC_HELP_STRING([--enable-progress-tag],
607 [enable HTML5 progress [default=yes]]),
608 [],[enable_progress_tag="yes"])
609 AC_MSG_RESULT([$enable_progress_tag])
611 # check whether to enable JavaScript debugger/profiler support
612 AC_MSG_CHECKING([whether to enable JavaScript debugger/profiler support])
613 AC_ARG_ENABLE(javascript_debugger,
614 AC_HELP_STRING([--enable-javascript-debugger],
615 [enable JavaScript debugger/profiler support [default=yes]]),
616 [],[enable_javascript_debugger="yes"])
617 AC_MSG_RESULT([$enable_javascript_debugger])
619 # check whether to enable Gamepad support
620 AC_MSG_CHECKING([whether to enable Gamepad support])
621 AC_ARG_ENABLE(gamepad,
622 AC_HELP_STRING([--enable-gamepad],
623 [enable Gamepad support [default=no]]),
624 [],[enable_gamepad="no"])
625 AC_MSG_RESULT([$enable_gamepad])
627 # check whether to build with datagrid support
628 AC_MSG_CHECKING([whether to enable HTML5 datagrid support])
629 AC_ARG_ENABLE(datagrid,
630 AC_HELP_STRING([--enable-datagrid],
631 [enable HTML5 datagrid support [default=no]]),
632 [],[enable_datagrid="no"])
633 AC_MSG_RESULT([$enable_datagrid])
635 # check whether to build with data transfer items support
636 AC_MSG_CHECKING([whether to enable HTML5 data transfer items support])
637 AC_ARG_ENABLE(data_transfer_items,
638 AC_HELP_STRING([--enable-data-transfer-items],
639 [enable HTML5 data transfer items support [default=no]]),
640 [],[enable_data_transfer_items="no"])
641 AC_MSG_RESULT([$enable_data_transfer_items])
643 # check whether to enable DOM mutation observer support
644 AC_MSG_CHECKING([whether to enable DOM mutation observer support])
645 AC_ARG_ENABLE(mutation_observers,
646 AC_HELP_STRING([--enable-mutation-observers],
647 [enable DOM mutation observer support [default=no]]),
648 [],[enable_mutation_observers="no"])
649 AC_MSG_RESULT([$enable_mutation_observers])
651 # check whether to enable HTML5 client-side session and persitent storage support
652 AC_MSG_CHECKING([whether to enable HTML5 client-side session and persistent storage support])
653 AC_ARG_ENABLE(dom_storage,
654 AC_HELP_STRING([--enable-dom-storage],
655 [enable HTML5 client-side session and persistent storage support [default=yes]]),
656 [],[enable_dom_storage="yes"])
657 AC_MSG_RESULT([$enable_dom_storage])
659 # check whether to enable the indexed database API
660 AC_MSG_CHECKING([whether to enable the indexed database API])
661 AC_ARG_ENABLE(indexed_database,
662 AC_HELP_STRING([--enable-indexed-database],
663 [enable the indexed database API [default=no]]),
664 [],[enable_indexed_database="no"])
665 AC_MSG_RESULT([$enable_indexed_database])
667 # check whether to enable the color input
668 AC_MSG_CHECKING([whether to enable the color input])
669 AC_ARG_ENABLE(input_type_color,
670 AC_HELP_STRING([--enable-input-type-color],
671 [enable the color input [default=no]]),
672 [],[enable_input_type_color="no"])
673 AC_MSG_RESULT([$enable_input_type_color])
675 # check whether to enable the speech input API
676 AC_MSG_CHECKING([whether to enable the speech input API])
677 AC_ARG_ENABLE(input_speech,
678 AC_HELP_STRING([--enable-input-speech],
679 [enable the speech input API [default=no]]),
680 [],[enable_input_speech="no"])
681 AC_MSG_RESULT([$enable_input_speech])
683 # check whether to enable the scripted speech API
684 AC_MSG_CHECKING([whether to enable the scripted speech API])
685 AC_ARG_ENABLE(scripted_speech,
686 AC_HELP_STRING([--enable-scripted-speech],
687 [enable the scripted speech API [default=no]]),
688 [],[enable_scripted_speech="no"])
689 AC_MSG_RESULT([$enable_scripted_speech])
691 # check whether to build with SQL database support
692 AC_MSG_CHECKING([whether to enable SQL client-side database storage support])
693 AC_ARG_ENABLE(sql_database,
694 AC_HELP_STRING([--enable-sql-database],
695 [enable SQL client-side database storage support [default=yes]]),
696 [],[enable_sql_database="yes"])
697 AC_MSG_RESULT([$enable_sql_database])
699 # check whether to build with icon database support
700 AC_MSG_CHECKING([whether to enable icon database support])
701 AC_ARG_ENABLE(icon_database,
702 AC_HELP_STRING([--enable-icon-database],
703 [enable icon database [default=yes]]),
704 [],[enable_icon_database="yes"])
705 AC_MSG_RESULT([$enable_icon_database])
707 # check whether to build with image resizer API support
708 AC_MSG_CHECKING([whether to enable image resizer API support])
709 AC_ARG_ENABLE(image_resizer,
710 AC_HELP_STRING([--enable-image-resizer],
711 [enable image resizer [default=no]]),
712 [],[enable_image_resizer="no"])
713 AC_MSG_RESULT([$enable_image_resizer])
715 # check whether to enable HTML5 datalist support
716 AC_MSG_CHECKING([whether to enable HTML5 datalist support])
717 AC_ARG_ENABLE(datalist,
718 AC_HELP_STRING([--enable-datalist],
719 [enable HTML5 datalist support [default=yes]]),
720 [],[enable_datalist="yes"])
721 AC_MSG_RESULT([$enable_datalist])
723 # check whether to enable HTML5 sandbox iframe support
724 AC_MSG_CHECKING([whether to enable HTML5 sandboxed iframe support])
725 AC_ARG_ENABLE(sandbox,
726 AC_HELP_STRING([--enable-sandbox],
727 [enable HTML5 sandboxed iframe support [default=yes]]),
728 [],[enable_sandbox="yes"])
729 AC_MSG_RESULT([$enable_sandbox])
731 # check whether to enable HTML5 audio/video support
732 AC_MSG_CHECKING([whether to enable HTML5 video support])
734 AC_HELP_STRING([--enable-video],
735 [enable HTML5 video support [default=yes]]),
736 [],[enable_video="yes"])
737 AC_MSG_RESULT([$enable_video])
739 # turn off video features if --disable-video is requested
740 if test "$enable_video" = "no"; then
741 enable_video_track=no
744 # check whether to enable HTML5 video track support
745 AC_MSG_CHECKING([whether to enable HTML5 video track support])
746 AC_ARG_ENABLE(video_track,
747 AC_HELP_STRING([--enable-video-track],
748 [enable HTML5 video track support [default=no]]),
749 [],[enable_video_track="no"])
750 AC_MSG_RESULT([$enable_video_track])
752 # check whether to enable media source support
753 AC_MSG_CHECKING([whether to enable media source support])
754 AC_ARG_ENABLE(media_source,
755 AC_HELP_STRING([--enable-media-source],
756 [enable support for media source [default=no]]),
757 [], [enable_media_source="no"])
758 AC_MSG_RESULT([$enable_media_source])
760 # check whether to enable media statistics support
761 AC_MSG_CHECKING([whether to enable media statistics support])
762 AC_ARG_ENABLE(media_statistics,
763 AC_HELP_STRING([--enable-media-statistics],
764 [enable support for media statistics [default=no]]),
765 [], [enable_media_statistics="no"])
766 AC_MSG_RESULT([$enable_media_statistics])
768 # check whether to enable Javascript Fullscreen API support
769 AC_MSG_CHECKING([whether to enable Fullscreen API support])
770 AC_ARG_ENABLE(fullscreen_api,
771 AC_HELP_STRING([--enable-fullscreen-api],
772 [enable the Fullscreen API support [default=yes]]),
773 [],[enable_fullscreen_api="yes"])
774 AC_MSG_RESULT([$enable_fullscreen_api])
776 # check whether to enable media stream support
777 AC_MSG_CHECKING([whether to enable media stream support])
778 AC_ARG_ENABLE(media_stream,
779 AC_HELP_STRING([--enable-media-stream],
780 [enable media stream support (incomplete) [default=no]]),
781 [],[enable_media_stream="no"])
782 AC_MSG_RESULT([$enable_media_stream])
784 # check whether to enable XSLT support
785 AC_MSG_CHECKING([whether to enable XSLT support])
787 AC_HELP_STRING([--enable-xslt],
788 [enable support for XSLT [default=yes]]),
789 [],[enable_xslt="yes"])
790 AC_MSG_RESULT([$enable_xslt])
792 # check whether to enable geolocation support
793 AC_MSG_CHECKING([whether to enable geolocation support])
794 AC_ARG_ENABLE(geolocation,
795 AC_HELP_STRING([--enable-geolocation],
796 [enable support for geolocation [default=yes]]),
797 [],[enable_geolocation="yes"])
798 AC_MSG_RESULT([$enable_geolocation])
800 # check whether to enable MathML support
801 AC_MSG_CHECKING([whether to enable MathML support])
802 AC_ARG_ENABLE(mathml,
803 AC_HELP_STRING([--enable-mathml],
804 [enable support for MathML [default=yes]]),
805 [],[enable_mathml="yes"])
806 AC_MSG_RESULT([$enable_mathml])
808 # check whether to enable MHTML support
809 AC_MSG_CHECKING([whether to enable MHTML support])
811 AC_HELP_STRING([--enable-mhtml],
812 [enable support for MHTML [default=no]]),
813 [],[enable_mhtml="no"])
814 AC_MSG_RESULT([$enable_mhtml])
816 # check whether to enable SVG support
817 AC_MSG_CHECKING([whether to enable SVG support])
819 AC_HELP_STRING([--enable-svg],
820 [enable support for SVG [default=yes]]),
821 [],[enable_svg="yes"])
822 AC_MSG_RESULT([$enable_svg])
824 # check whether to enable Shadow DOM support
825 AC_MSG_CHECKING([whether to enable Shadow DOM support])
826 AC_ARG_ENABLE(shadow_dom,
827 AC_HELP_STRING([--enable-shadow-dom],
828 [enable support for Shadow DOM [default=yes]]),
829 [],[enable_shadow_dom="yes"])
830 AC_MSG_RESULT([$enable_shadow_dom])
832 # check whether to enable SharedWorkers support
833 AC_MSG_CHECKING([whether to enable SharedWorkers support])
834 AC_ARG_ENABLE(shared_workers,
835 AC_HELP_STRING([--enable-shared-workers],
836 [enable support for SharedWorkers [default=yes]]),
837 [],[enable_shared_workers="yes"])
838 AC_MSG_RESULT([$enable_shared_workers])
840 # check whether to enable Web Workers support
841 AC_MSG_CHECKING([whether to enable Web Workers support])
842 AC_ARG_ENABLE(workers,
843 AC_HELP_STRING([--enable-workers],
844 [enable support for Web Workers [default=yes]]),
845 [],[enable_workers="yes"])
846 AC_MSG_RESULT([$enable_workers])
848 # check whether to enable directory upload support
849 AC_MSG_CHECKING([whether to enable directory upload support])
850 AC_ARG_ENABLE(directory_upload,
851 AC_HELP_STRING([--enable-directory-upload],
852 [enable support for directory upload [default=no]]),
853 [], [enable_directory_upload="no"])
854 AC_MSG_RESULT([$enable_directory_upload])
856 # check whether to enable HTML5 FileSystem API support
857 AC_MSG_CHECKING([whether to enable HTML5 FileSystem API support])
858 AC_ARG_ENABLE(file_system,
859 AC_HELP_STRING([--enable-file-system],
860 [enable support for HTML5 FileSystem API [default=no]]),
861 [], [enable_file_system="no"])
862 AC_MSG_RESULT([$enable_file_system])
864 # check whether to enable HTML5 <style scoped> support
865 AC_MSG_CHECKING([whether to enable HTML5 <style scoped> support])
866 AC_ARG_ENABLE(style_scoped,
867 AC_HELP_STRING([--enable-style-scoped],
868 [enable support for HTML5 <style scoped> [default=no]]),
869 [], [enable_style_scoped="no"])
870 AC_MSG_RESULT([$enable_style_scoped])
872 # check whether to enable Quota API support
873 AC_MSG_CHECKING([whether to enable Quota API support])
875 AC_HELP_STRING([--enable-quota],
876 [enable support for Quota API [default=no]]),
877 [], [enable_quota="no"])
878 AC_MSG_RESULT([$enable_quota])
880 # turn off svg features if --disable-svg is requested
881 if test "$enable_svg" = "no"; then
885 # check whether to enable support for filters
886 AC_MSG_CHECKING([whether to enable support for filters])
887 AC_ARG_ENABLE(filters,
888 AC_HELP_STRING([--enable-filters],
889 [enable support for filters (experimental) [default=yes]]),
890 [],[enable_filters="yes"])
891 AC_MSG_RESULT([$enable_filters])
893 # check whether to enable support for SVG fonts
894 AC_MSG_CHECKING([whether to enable support for SVG fonts])
895 AC_ARG_ENABLE(svg_fonts,
896 AC_HELP_STRING([--enable-svg-fonts],
897 [enable support for SVG fonts (experimental) [default=yes]]),
898 [],[enable_svg_fonts="yes"])
899 AC_MSG_RESULT([$enable_svg_fonts])
901 # check for SVG features, enabling SVG if necessary
902 if test "$enable_svg_fonts" = "yes"; then
904 if test "$enable_svg" = "no"; then
905 AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
910 # check whether to enable Web Socket support
911 AC_MSG_CHECKING([whether to enable Web Sockets support])
912 AC_ARG_ENABLE(web_sockets,
913 AC_HELP_STRING([--enable-web-sockets],
914 [enable support for Web Sockets [default=yes]]),
915 [],[enable_web_sockets="yes"])
916 AC_MSG_RESULT([$enable_web_sockets])
918 # check whether to enable Web Audio support
919 AC_MSG_CHECKING([whether to enable Web Audio support])
920 AC_ARG_ENABLE(web_audio,
921 AC_HELP_STRING([--enable-web-audio],
922 [enable support for Web Audio [default=no]]),
923 [],[enable_web_audio="no"])
924 AC_MSG_RESULT([$enable_web_audio])
926 # check whether to enable Web Timing support
927 AC_MSG_CHECKING([whether to enable Web Timing support])
928 AC_ARG_ENABLE(web_timing,
929 AC_HELP_STRING([--enable-web-timing],
930 [enable support for Web Timing [default=no]]),
931 [],[enable_web_timing="no"])
932 AC_MSG_RESULT([$enable_web_timing])
934 # check whether to enable Blob support
935 AC_MSG_CHECKING([whether to enable Blob support])
937 AC_HELP_STRING([--enable-blob],
938 [enable support for Blob [default=yes]]),
939 [],[enable_blob="yes"])
940 AC_MSG_RESULT([$enable_blob])
942 # check whether to enable Legacy WebKitBlobBuilder support
943 AC_MSG_CHECKING([whether to enable Legacy WebKitBlobBuilder support])
944 AC_ARG_ENABLE(legacy_webkit_blob_builder,
945 AC_HELP_STRING([--enable-legacy-webkit-blob-builder],
946 [enable support for Legacy WebKitBlobBuilder [default=yes]]),
947 [],[enable_legacy_webkit_blob_builder="yes"])
948 AC_MSG_RESULT([$legacy_webkit_blob_builder])
950 # check whether to enable Fast Mobile Scrolling support
951 AC_MSG_CHECKING([whether to enable Fast Mobile Scrolling])
952 AC_ARG_ENABLE(fast_mobile_scrolling,
953 AC_HELP_STRING([--enable-fast-mobile-scrolling],
954 [enable support for Fast Mobile Scrolling [default=no]]),
955 [],[enable_fast_mobile_scrolling="no"])
956 AC_MSG_RESULT([$enable_fast_mobile_scrolling])
958 # check whether to enable code coverage
959 AC_MSG_CHECKING([whether to enable code coverage support])
960 AC_ARG_ENABLE(coverage,
961 AC_HELP_STRING([--enable-coverage],
962 [enable code coverage support [default=no]]),
963 [],[enable_coverage="no"])
964 AC_MSG_RESULT([$enable_coverage])
966 # check whether to enable FastMalloc
967 AC_MSG_CHECKING([whether to enable optimized memory allocator])
968 AC_ARG_ENABLE(fast_malloc,
969 AC_HELP_STRING([--enable-fast-malloc],
970 [enable optimized memory allocator default=yes, default=no for debug builds]),
971 [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
972 AC_MSG_RESULT([$enable_fast_malloc])
974 # check whether to enable debug symbols
975 AC_MSG_CHECKING([whether to enable debug symbols])
976 AC_ARG_ENABLE(debug_symbols,
977 AC_HELP_STRING([--enable-debug-symbols],
978 [enable debug symbols default=no, default=yes for debug builds]),
979 [],[if test "$enable_debug" = "yes"; then enable_debug_symbols="yes"; else enable_debug_symbols="no"; fi])
980 AC_MSG_RESULT([$enable_debug_symbols])
982 # check whether to enable debug features
983 AC_MSG_CHECKING([whether to enable debug features])
984 AC_ARG_ENABLE(debug_features,
985 AC_HELP_STRING([--enable-debug-features],
986 [enable debug features default=no, default=yes for debug builds]),
987 [],[if test "$enable_debug" = "yes"; then enable_debug_features="yes"; else enable_debug_features="no"; fi])
988 AC_MSG_RESULT([$enable_debug_features])
990 AC_MSG_CHECKING([whether to enable JIT compilation])
992 AS_HELP_STRING([--enable-jit],
993 [Enable JIT compilation (default: autodetect)]))
994 case "$enable_jit" in
995 yes) JSC_CPPFLAGS="-DENABLE_JIT=1" ;;
996 no) JSC_CPPFLAGS="-DENABLE_JIT=0" ;;
997 *) enable_jit="autodetect" ;;
999 AC_SUBST(JSC_CPPFLAGS)
1000 AC_MSG_RESULT([$enable_jit])
1003 AC_MSG_CHECKING([whether to enable opcode stats])
1004 AC_ARG_ENABLE([opcode-stats],
1005 [AS_HELP_STRING([--enable-opcode-stats], [Enable Opcode statistics (default: disabled)])],
1006 [], [enable_opcode_stats=no])
1007 AC_MSG_RESULT([$enable_opcode_stats])
1009 if test "$enable_opcode_stats" = "yes"; then
1010 if test "$enable_jit" = "yes"; then
1011 AC_MSG_ERROR([JIT must be disabled for Opcode stats to work.])
1013 AC_DEFINE([ENABLE_OPCODE_STATS], [1], [Define to enable Opcode statistics])
1017 AC_MSG_CHECKING([whether to enable link prefetch support])
1018 AC_ARG_ENABLE([link-prefetch],
1019 [AS_HELP_STRING([--enable-link-prefetch], [Enable Link prefetch support (default: disabled)])],
1020 [],[enable_link_prefetch=no])
1021 AC_MSG_RESULT([$enable_link_prefetch])
1023 if test "$enable_link_prefetch" = "yes"; then
1024 AC_DEFINE([ENABLE_LINK_PREFETCH], [1], [Define to enable link prefetch support])
1027 # GObject Introspection
1028 AC_MSG_CHECKING([whether to enable GObject introspection support])
1029 AC_ARG_ENABLE([introspection],
1030 [AS_HELP_STRING([--enable-introspection],[Enable GObject introspection (default: disabled)])],
1031 [],[enable_introspection=no])
1032 AC_MSG_RESULT([$enable_introspection])
1034 # check whether to enable animation API
1035 AC_MSG_CHECKING([whether to enable Animation API support])
1036 AC_ARG_ENABLE(animation_api,
1037 AC_HELP_STRING([--enable-animation-api],
1038 [enable support for Animation API (experimental) [default=no]]),
1039 [], [enable_animation_api="no"])
1040 AC_MSG_RESULT([$enable_animation_api])
1042 # check whether to enable requestAnimationFrame support
1043 AC_MSG_CHECKING([whether to enable requestAnimationFrame support])
1044 AC_ARG_ENABLE(request_animation_frame,
1045 AC_HELP_STRING([--enable-request-animation-frame],
1046 [enable support for requestAnimationFrame (experimental) [default=yes]]),
1047 [],[enable_request_animation_frame="yes"])
1048 AC_MSG_RESULT([$enable_request_animation_frame])
1050 # check whether to enable touch icon loading
1051 AC_MSG_CHECKING([whether to enable touch icon loading])
1052 AC_ARG_ENABLE(touch_icon_loading,
1053 AC_HELP_STRING([--enable-touch-icon-loading],
1054 [enable support for loading touch icons [default=no]]),
1055 [], [enable_touch_icon_loading="no"])
1056 AC_MSG_RESULT([$enable_touch_icon_loading])
1058 # check whether to enable Register Protocol Handler support
1059 AC_MSG_CHECKING([whether to enable Register Protocol Handler])
1060 AC_ARG_ENABLE(register_protocol_handler,
1061 AC_HELP_STRING([--enable-register-protocol-handler],
1062 [enable support for Register Protocol Handler (experimental) [default=no]]),
1063 [],[enable_register_protocol_handler="no"])
1064 AC_MSG_RESULT([$enable_register_protocol_handler])
1066 # check whether to enable DeviceOrientation support
1067 AC_MSG_CHECKING([whether to enable DeviceOrientation])
1068 AC_ARG_ENABLE(device_orientation,
1069 AC_HELP_STRING([--enable-device-orientation],
1070 [enable support for DeviceOrientation (experimental and incomplete) [default=no]]),
1071 [],[enable_device_orientation="no"])
1072 AC_MSG_RESULT([$enable_device_orientation])
1080 if test "$enable_introspection" = "yes"; then
1081 GOBJECT_INTROSPECTION_REQUIRED=0.9.5
1082 PKG_CHECK_MODULES([INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
1084 G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
1085 G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
1086 G_IR_GENERATE="$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)"
1087 AC_DEFINE([ENABLE_INTROSPECTION],[1],[Define to enable GObject introspection support])
1090 AC_SUBST([G_IR_SCANNER])
1091 AC_SUBST([G_IR_COMPILER])
1092 AC_SUBST([G_IR_GENERATE])
1094 # determine the font backend
1095 AC_MSG_CHECKING([the font backend to use])
1096 AC_ARG_WITH(font_backend,
1097 AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
1098 [Select font backend [default=freetype]]),
1099 [],[with_font_backend="freetype"])
1101 case "$with_font_backend" in
1103 *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
1105 AC_MSG_RESULT([$with_font_backend])
1107 if test "$host_cpu" = "sh4"; then
1108 CXXFLAGS="$CXXFLAGS -mieee -w"
1109 CFLAGS="$CFLAGS -mieee -w"
1112 # Add '-g' flag to gcc to build with debug symbols
1113 if test "$enable_debug_symbols" = "yes"; then
1114 CXXFLAGS="$CXXFLAGS -g"
1118 if test "$enable_debug_features" = "no"; then
1119 AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
1122 # Add the appropriate 'O' level for optimized builds
1123 if test "$enable_optimizations" = "yes"; then
1124 CXXFLAGS="$CXXFLAGS -O2"
1125 CFLAGS="$CFLAGS -O2"
1127 CXXFLAGS="$CXXFLAGS -O0"
1128 CFLAGS="$CFLAGS -O0"
1131 PKG_CHECK_MODULES([LIBSOUP],
1132 [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
1133 AC_SUBST([LIBSOUP_CFLAGS])
1134 AC_SUBST([LIBSOUP_LIBS])
1136 # check if FreeType/FontConfig are available
1137 if test "$with_font_backend" = "freetype"; then
1138 if test "$with_target" = "directfb"; then
1139 PKG_CHECK_MODULES([FREETYPE],
1140 [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
1141 freetype2 >= $FREETYPE2_REQUIRED_VERSION])
1143 PKG_CHECK_MODULES([FREETYPE],
1145 fontconfig >= $FONTCONFIG_REQUIRED_VERSION
1146 freetype2 >= $FREETYPE2_REQUIRED_VERSION])
1148 AC_SUBST([FREETYPE_CFLAGS])
1149 AC_SUBST([FREETYPE_LIBS])
1152 # check if SQLite3 is available. Error out only if one of the
1153 # features hard-depending on it is enabled while SQLite3 is
1155 PKG_CHECK_MODULES([SQLITE3],
1156 [sqlite3 >= $SQLITE_REQUIRED_VERSION],
1157 [sqlite3_has_pkg_config=yes],
1158 [sqlite3_has_pkg_config=no])
1159 if test "$sqlite3_has_pkg_config" = "no"; then
1160 AC_SEARCH_LIBS([sqlite3_open16], [sqlite3],
1161 [sqlite3_found=yes;SQLITE3_LIBS="$LIBS";SQLITE3_CFLAGS="-I $srcdir/WebKitLibraries/WebCoreSQLite3"],
1164 AC_SUBST([SQLITE3_CFLAGS])
1165 AC_SUBST([SQLITE3_LIBS])
1167 if (test "$sqlite3_found" = "no"); then
1168 AC_MSG_ERROR([SQLite3 is required for the Database related features])
1171 # check if libxslt is available
1172 if test "$enable_xslt" = "yes"; then
1173 PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
1174 AC_SUBST([LIBXSLT_CFLAGS])
1175 AC_SUBST([LIBXSLT_LIBS])
1178 # check if geoclue is available
1179 if test "$enable_geolocation" = "yes"; then
1180 PKG_CHECK_MODULES([GEOCLUE], [geoclue])
1181 AC_SUBST([GEOCLUE_CFLAGS])
1182 AC_SUBST([GEOCLUE_LIBS])
1185 # check for XRender under Linux/Unix. Some linkers require explicit
1186 # linkage (like GNU Gold), so we cannot rely on GTK+ pulling XRender
1187 if test "$os_win32" = "no"; then
1188 PKG_CHECK_MODULES([XRENDER], [xrender])
1189 AC_SUBST([XRENDER_CFLAGS])
1190 AC_SUBST([XRENDER_LIBS])
1193 # check if gstreamer is available
1194 if test "$enable_video" = "yes" || test "$enable_web_audio" = "yes"; then
1195 gstreamer_modules="gstreamer-$GST_API_VERSION >= $GSTREAMER_REQUIRED_VERSION
1196 gstreamer-app-$GST_API_VERSION
1197 gstreamer-audio-$GST_API_VERSION
1198 gstreamer-fft-$GST_API_VERSION
1199 gstreamer-base-$GST_API_VERSION
1200 gstreamer-pbutils-$GST_API_VERSION
1201 gstreamer-plugins-base-$GST_API_VERSION >= $GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION
1202 gstreamer-video-$GST_API_VERSION";
1203 if test "$GST_API_VERSION" != "1.0"; then
1204 gstreamer_modules="$gstreamer_modules gstreamer-interfaces-$GST_API_VERSION";
1206 PKG_CHECK_MODULES([GSTREAMER], [$gstreamer_modules], [have_gstreamer=yes])
1207 AC_SUBST([GSTREAMER_CFLAGS])
1208 AC_SUBST([GSTREAMER_LIBS])
1212 if test "$with_accelerated_compositing" = "clutter"; then
1213 PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
1214 PKG_CHECK_MODULES([CLUTTER_GTK],
1215 [clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED_VERSION])
1217 AC_SUBST(CLUTTER_CFLAGS)
1218 AC_SUBST(CLUTTER_LIBS)
1219 AC_SUBST(CLUTTER_GTK_CFLAGS)
1220 AC_SUBST(CLUTTER_GTK_LIBS)
1223 # check if atspi2 is available (only needed for Webkit2 unit tests)
1224 if test "$enable_webkit2" = "yes"; then
1225 PKG_CHECK_MODULES([ATSPI2],
1226 [atspi-2 >= $ATSPI2_REQUIRED_VERSION],
1227 [have_atspi2=yes], [have_atspi2=no])
1229 AC_SUBST([ATSPI2_CFLAGS])
1230 AC_SUBST([ATSPI2_LIBS])
1233 # check for code coverage support
1234 if test "$enable_coverage" = "yes"; then
1235 COVERAGE_CFLAGS="-MD"
1236 COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
1237 AC_SUBST([COVERAGE_CFLAGS])
1238 AC_SUBST([COVERAGE_LDFLAGS])
1241 # check for HTML features
1242 if test "$enable_video" = "yes"; then
1247 # If you change the default here, please also make sure the assumptions made
1248 # in Tools/Scripts/webkitdirs.pm:buildAutotoolsProject still make sense.
1249 AC_MSG_CHECKING([whether to build Webkit2])
1250 AC_ARG_ENABLE(webkit2,
1251 AC_HELP_STRING([--enable-webkit2], [build webkit2 [default=yes]]),
1252 [], [enable_webkit2="yes"])
1253 AC_MSG_RESULT([$enable_webkit2])
1254 if test "$enable_webkit2" = "yes"; then
1255 if test "$GTK_API_VERSION" = "2.0"; then
1256 AC_MSG_ERROR([WebKit2 requires GTK+ 3.x, use --with-gtk=3.0])
1259 # Check Unix printing
1260 PKG_CHECK_MODULES(GTK_UNIX_PRINTING, gtk+-unix-print-3.0,
1261 [have_gtk_unix_printing=yes],
1262 [have_gtk_unix_printing=no])
1263 AC_SUBST(GTK_UNIX_PRINTING_CFLAGS)
1264 AC_SUBST(GTK_UNIX_PRINTING_LIBS)
1265 if test "$have_gtk_unix_printing" = "yes"; then
1266 AC_DEFINE([HAVE_GTK_UNIX_PRINTING], [1], [Define if GTK+ UNIX Printing is available])
1271 AC_MSG_CHECKING([whether to build plugin process for WebKit2])
1272 AC_ARG_ENABLE(plugin_process,
1273 AC_HELP_STRING([--enable-plugin-process], [build plugin process for WebKit2 [default=yes]]),
1274 [], [enable_plugin_process="yes"])
1275 AC_MSG_RESULT([$enable_plugin_process])
1277 # Build the plugin process only when building Webkit2.
1278 if test "$enable_webkit2" = "no"; then
1279 enable_plugin_process=no
1282 # Make sure we have GTK+ 2.x to build the plugin process.
1283 if test "$enable_plugin_process" = "yes"; then
1284 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= $GTK2_REQUIRED_VERSION gail >= $GAIL2_REQUIRED_VERSION)
1286 AC_SUBST(GTK2_CFLAGS)
1289 GTK_DOC_CHECK([1.10])
1292 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
1293 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
1294 AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
1295 AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
1296 AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
1298 # target conditionals
1299 AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
1300 AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
1301 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
1302 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
1304 # Unicode backend conditionals
1305 AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
1306 AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
1308 # Font backend conditionals
1309 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
1310 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
1312 # GStreamer feature conditional
1313 AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"])
1314 AM_CONDITIONAL([USE_WEBAUDIO_GSTREAMER], [test "$enable_web_audio" = "yes"])
1316 # ATSPI2 conditional
1317 AM_CONDITIONAL([HAVE_ATSPI2], [test "$have_atspi2" = "yes"])
1319 # Accelerated compositing conditional
1320 AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$with_accelerated_compositing" = "cairo" || test "$with_accelerated_compositing" = "opengl" || test "$with_accelerated_compositing" = "clutter"])
1321 AM_CONDITIONAL([USE_TEXTURE_MAPPER_CAIRO], [test "$with_accelerated_compositing" = "cairo"])
1322 AM_CONDITIONAL([USE_TEXTURE_MAPPER_GL], [test "$with_accelerated_compositing" = "opengl"])
1323 AM_CONDITIONAL([USE_CLUTTER], [test "$with_accelerated_compositing" = "clutter"])
1325 # These are the same now, but they will soon be separate.
1326 AM_CONDITIONAL([USE_GLX], [test "$with_accelerated_compositing" = "opengl" || test "$enable_webgl" = "yes"])
1327 AM_CONDITIONAL([USE_OPENGL], [test "$with_accelerated_compositing" = "opengl" || test "$enable_webgl" = "yes"])
1329 # WebKit feature conditionals
1330 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug_features" = "yes"])
1331 AM_CONDITIONAL([ENABLE_WEBGL],[test "$enable_webgl" = "yes"])
1332 AM_CONDITIONAL([ENABLE_BLOB],[test "$enable_blob" = "yes"])
1333 AM_CONDITIONAL([ENABLE_LEGACY_WEBKIT_BLOB_BUILDER],[test "$enable_legacy_webkit_blob_builder" = "yes"])
1334 AM_CONDITIONAL([ENABLE_METER_TAG],[test "$enable_meter_tag" = "yes"])
1335 AM_CONDITIONAL([ENABLE_MICRODATA],[test "$enable_microdata" = "yes"])
1336 AM_CONDITIONAL([ENABLE_PAGE_VISIBILITY_API],[test "$enable_page_visibility_api" = "yes"])
1337 AM_CONDITIONAL([ENABLE_PROGRESS_TAG],[test "$enable_progress_tag" = "yes"])
1338 AM_CONDITIONAL([ENABLE_CHANNEL_MESSAGING],[test "$enable_channel_messaging" = "yes"])
1339 AM_CONDITIONAL([ENABLE_JAVASCRIPT_DEBUGGER],[test "$enable_javascript_debugger" = "yes"])
1340 AM_CONDITIONAL([ENABLE_GAMEPAD],[test "$enable_gamepad" = "yes"])
1341 AM_CONDITIONAL([ENABLE_DIRECTORY_UPLOAD],[test "$enable_directory_upload" = "yes"])
1342 AM_CONDITIONAL([ENABLE_DATAGRID],[test "$enable_datagrid" = "yes"])
1343 AM_CONDITIONAL([ENABLE_DATA_TRANSFER_ITEMS],[test "$enable_data_transfer_items" = "yes"])
1344 AM_CONDITIONAL([ENABLE_SQL_DATABASE],[test "$enable_sql_database" = "yes"])
1345 AM_CONDITIONAL([ENABLE_DATALIST],[test "$enable_datalist" = "yes"])
1346 AM_CONDITIONAL([ENABLE_DETAILS],[test "$enable_details" = "yes"])
1347 AM_CONDITIONAL([ENABLE_FAST_MOBILE_SCROLLING],[test "$enable_fast_mobile_scrolling" = "yes"])
1348 AM_CONDITIONAL([ENABLE_FILE_SYSTEM],[test "$enable_file_system" = "yes"])
1349 AM_CONDITIONAL([ENABLE_STYLE_SCOPED],[test "$enable_style_scoped" = "yes"])
1350 AM_CONDITIONAL([ENABLE_QUOTA],[test "$enable_quota" = "yes"])
1351 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
1352 AM_CONDITIONAL([ENABLE_IMAGE_RESIZER],[test "$enable_image_resizer" = "yes"])
1353 AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
1354 AM_CONDITIONAL([ENABLE_INPUT_TYPE_COLOR],[test "$enable_input_type_color" = "yes"])
1355 AM_CONDITIONAL([ENABLE_INPUT_SPEECH],[test "$enable_input_speech" = "yes"])
1356 AM_CONDITIONAL([ENABLE_SCRIPTED_SPEECH],[test "$enable_scripted_speech" = "yes"])
1357 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
1358 AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
1359 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
1360 AM_CONDITIONAL([ENABLE_MATHML], [test "$enable_mathml" = "yes"])
1361 AM_CONDITIONAL([ENABLE_MHTML], [test "$enable_mhtml" = "yes"])
1362 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
1363 AM_CONDITIONAL([ENABLE_MEDIA_SOURCE],[test "$enable_media_source" = "yes"])
1364 AM_CONDITIONAL([ENABLE_MEDIA_STATISTICS],[test "$enable_media_statistics" = "yes"])
1365 AM_CONDITIONAL([ENABLE_VIDEO_TRACK],[test "$enable_video_track" = "yes"])
1366 AM_CONDITIONAL([ENABLE_FULLSCREEN_API],[test "$enable_fullscreen_api" = "yes"])
1367 AM_CONDITIONAL([ENABLE_MEDIA_STREAM],[test "$enable_media_stream" = "yes"])
1368 AM_CONDITIONAL([ENABLE_LEGACY_NOTIFICATIONS],[test "$enable_legacy_notifications" = "yes"])
1369 AM_CONDITIONAL([ENABLE_NOTIFICATIONS],[test "$enable_notifications" = "yes"])
1370 AM_CONDITIONAL([ENABLE_ORIENTATION_EVENTS],[test "$enable_orientation_events" = "yes"])
1371 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
1372 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
1373 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
1374 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
1375 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_workers" = "yes"])
1376 AM_CONDITIONAL([ENABLE_SHADOW_DOM],[test "$enable_shadow_dom" = "yes"])
1377 AM_CONDITIONAL([ENABLE_SHARED_WORKERS],[test "$enable_shared_workers" = "yes"])
1378 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
1379 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
1380 AM_CONDITIONAL([ENABLE_WEB_SOCKETS],[test "$enable_web_sockets" = "yes"])
1381 AM_CONDITIONAL([ENABLE_WEB_AUDIO],[test "$enable_web_audio" = "yes"])
1382 AM_CONDITIONAL([ENABLE_WEB_TIMING],[test "$enable_web_timing" = "yes"])
1383 AM_CONDITIONAL([ENABLE_OPCODE_STATS],[test "$enable_opcode_stats" = "yes"])
1384 AM_CONDITIONAL([ENABLE_WEBKIT2],[test "$enable_webkit2" = "yes"])
1385 AM_CONDITIONAL([ENABLE_PLUGIN_PROCESS],[test "$enable_plugin_process" = "yes"])
1386 AM_CONDITIONAL([ENABLE_SPELLCHECK],[test "$enable_spellcheck" = "yes"])
1387 AM_CONDITIONAL([ENABLE_ANIMATION_API],[test "$enable_animation_api" = "yes"])
1388 AM_CONDITIONAL([ENABLE_REQUEST_ANIMATION_FRAME],[test "$enable_request_animation_frame" = "yes"])
1389 AM_CONDITIONAL([ENABLE_TOUCH_ICON_LOADING],[test "$enable_touch_icon_loading" = "yes"])
1390 AM_CONDITIONAL([ENABLE_REGISTER_PROTOCOL_HANDLER],[test "$enable_register_protocol_handler" = "yes"])
1391 AM_CONDITIONAL([ENABLE_DEVICE_ORIENTATION],[test "$enable_device_orientation" = "yes"])
1392 AM_CONDITIONAL([ENABLE_MUTATION_OBSERVERS],[test "$enable_mutation_observers" = "yes"])
1395 AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
1403 Source/WebKit/gtk/webkit/webkitversion.h
1407 Source/WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/webkit.pc.in
1408 Source/WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:Source/WebKit/gtk/JSCore.gir.in
1409 Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/JavaScriptCore/javascriptcoregtk.pc.in
1411 ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1415 if test "$enable_webkit2" = "yes"; then
1417 Source/WebKit2/webkit2gtk-${WEBKITGTK_API_VERSION}.pc:Source/WebKit2/webkit2gtk.pc.in
1419 ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1426 WebKit was configured with the following options:
1428 Build configuration:
1429 Enable debugging (slow) : $enable_debug
1430 Compile with debug symbols (slow) : $enable_debug_symbols
1431 Enable debug features (slow) : $enable_debug_features
1432 Enable GCC build optimization : $enable_optimizations
1433 Code coverage support : $enable_coverage
1434 Unicode backend : $with_unicode_backend
1435 Font backend : $with_font_backend
1436 Optimized memory allocator : $enable_fast_malloc
1437 Accelerated Compositing : $with_accelerated_compositing
1440 WebGL : $enable_webgl
1441 Blob support : $enable_blob
1442 Legacy WebKitBlobBuilder support : $enable_legacy_webkit_blob_builder
1443 DOM mutation observer support : $enable_mutation_observers
1444 DeviceOrientation support : $enable_device_orientation
1445 Directory upload : $enable_directory_upload
1446 Fast Mobile Scrolling : $enable_fast_mobile_scrolling
1447 JIT compilation : $enable_jit
1448 Filters support : $enable_filters
1449 Geolocation support : $enable_geolocation
1450 JavaScript debugger/profiler support : $enable_javascript_debugger
1451 Gamepad support : $enable_gamepad
1452 MathML support : $enable_mathml
1453 Media source : $enable_media_source
1454 Media statistics : $enable_media_statistics
1455 MHTML support : $enable_mhtml
1456 HTML5 channel messaging support : $enable_channel_messaging
1457 HTML5 meter element support : $enable_meter_tag
1458 HTML5 microdata support : $enable_microdata
1459 Page Visibility API support : $enable_page_visibility_api
1460 HTML5 progress element support : $enable_progress_tag
1461 HTML5 client-side session and persistent storage support : $enable_dom_storage
1462 SQL client-side database storage support : $enable_sql_database
1463 HTML5 datagrid support : $enable_datagrid
1464 HTML5 data transfer items support : $enable_data_transfer_items
1465 HTML5 FileSystem API support : $enable_file_system
1466 Quota API support : $enable_quota
1467 HTML5 sandboxed iframe support : $enable_sandbox
1468 HTML5 video element support : $enable_video
1469 HTML5 track element support : $enable_video_track
1470 Fullscreen API support : $enable_fullscreen_api
1471 Media stream support : $enable_media_stream
1472 Icon database support : $enable_icon_database
1473 Image resizer support : $enable_image_resizer
1474 Link prefetch support : $enable_link_prefetch
1475 Opcode stats : $enable_opcode_stats
1476 Shadow DOM support : $enable_shadow_dom
1477 SharedWorkers support : $enable_shared_workers
1478 Color input support : $enable_input_type_color
1479 Speech input support : $enable_input_speech
1480 Scripted speech support : $enable_scripted_speech
1481 SVG support : $enable_svg
1482 SVG fonts support : $enable_svg_fonts
1483 Web Audio support : $enable_web_audio
1484 Web Sockets support : $enable_web_sockets
1485 Web Timing support : $enable_web_timing
1486 Web Workers support : $enable_workers
1487 XSLT support : $enable_xslt
1488 Spellcheck support : $enable_spellcheck
1489 Animation API : $enable_animation_api
1490 RequestAnimationFrame support : $enable_request_animation_frame
1491 Touch Icon Loading support : $enable_touch_icon_loading
1492 Register Protocol Handler support : $enable_register_protocol_handler
1493 WebKit2 support : $enable_webkit2
1494 WebKit2 plugin process : $enable_plugin_process
1497 GTK+ version : $with_gtk
1498 GDK target : $with_target
1499 GStreamer version : $with_gstreamer
1500 Introspection support : $enable_introspection
1501 Generate documentation : $enable_gtk_doc
1503 if test "$with_unicode_backend" = "glib"; then
1504 echo " >> WARNING: the glib-based unicode backend is slow and incomplete <<"