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 LIBJAVASCRIPTCOREGTK_VERSION=13:1:13
42 AC_SUBST([LIBJAVASCRIPTCOREGTK_VERSION])
44 LIBWEBKIT2GTK_VERSION=13:1:13
45 AC_SUBST([LIBWEBKIT2GTK_VERSION])
47 AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip tar-ustar])
49 # Use AM_SILENT_RULES if present
50 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
52 # host checking - inspired by the GTK+ configure.in
53 # TODO: move these to webkit.m4?
54 AC_MSG_CHECKING([for native Win32])
63 AC_MSG_RESULT([$os_win32])
78 gnu* | linux* | k*bsd*-gnu)
86 # If CFLAGS and CXXFLAGS are unset, default to empty.
87 # This is to tell automake not to include '-g' if C{XX,}FLAGS is not set
88 # For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler
89 if test -z "$CXXFLAGS"; then
92 if test -z "$CFLAGS"; then
98 AC_PATH_PROG(PERL, perl)
99 if test -z "$PERL"; then
100 AC_MSG_ERROR([You need 'perl' to compile WebKit])
103 AC_PATH_PROG(PYTHON, python)
104 if test -z "$PYTHON"; then
105 AC_MSG_ERROR([You need 'python' to compile WebKit])
108 AC_PATH_PROG(BISON, bison)
109 if test -z "$BISON"; then
110 AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit])
114 if test -z "$MV"; then
115 AC_MSG_ERROR([You need 'mv' to compile WebKit])
124 # Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
127 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
130 # C/C++ Language Features
143 # use dolt to speedup the build
146 AC_PATH_PROG(FLEX, flex)
147 if test -z "$FLEX"; then
148 AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit])
150 FLEX_VERSION=`$FLEX --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'`
151 AX_COMPARE_VERSION([2.5.33],[gt],[$FLEX_VERSION],
152 AC_MSG_WARN([You need at least version 2.5.33 of the 'flex' lexer generator to compile WebKit correctly]))
155 AC_PATH_PROG(GPERF, gperf)
156 if test -z "$GPERF"; then
157 AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
160 # check for -fvisibility=hidden compiler support (GCC >= 4)
161 saved_CFLAGS="$CFLAGS"
162 CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
163 AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
164 AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
165 [ AC_MSG_RESULT([yes])
166 SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
168 CFLAGS="$saved_CFLAGS"
169 AC_SUBST(SYMBOL_VISIBILITY)
170 AC_SUBST(SYMBOL_VISIBILITY_INLINES)
172 # Disable C++0x compat warnings for GCC >= 4.6.0 until we build
175 TMPCXXFLAGS=$CXXFLAGS
176 CXXFLAGS="-Wall -Werror"
177 AC_MSG_CHECKING([if we have to disable C++0x compat warnings for GCC >= 4.6.0])
182 extern std::nullptr_t nullptr;
184 disable_cxx0x_compat=no,
185 disable_cxx0x_compat=yes)
186 AC_MSG_RESULT($disable_cxx0x_compat)
187 if test "$disable_cxx0x_compat" = yes; then
188 CXXFLAGS="$TMPCXXFLAGS -Wno-c++0x-compat"
190 CXXFLAGS="$TMPCXXFLAGS"
194 # pthread (not needed on Windows)
195 if test "$os_win32" = "no"; then
196 AC_CHECK_HEADERS([pthread.h],
197 AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exists]),
198 AC_MSG_ERROR([pthread support is required to build WebKit]))
199 AC_CHECK_LIB(pthread, pthread_rwlock_init,
200 AC_DEFINE([HAVE_PTHREAD_RWLOCK],[1],[Define if pthread rwlock is present]),
201 AC_MSG_WARN([pthread rwlock support is not available]))
204 # check for libjpeg the way Gtk does it.
205 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
206 jpeg_ok=yes, jpeg_ok=no
207 AC_MSG_ERROR([JPEG library (libjpeg) not found]))
208 if test "$jpeg_ok" = yes; then
209 AC_MSG_CHECKING([for jpeglib])
215 #include <jpeglib.h>],
218 AC_MSG_RESULT($jpeg_ok)
219 if test "$jpeg_ok" = yes; then
221 # should we check for progressive JPEG like GTK+ as well?
223 AC_MSG_ERROR([JPEG library (libjpeg) not found])
226 AC_SUBST([JPEG_LIBS])
228 # Check for libpng the way Gtk+ does it
229 for l in libpng libpng14 libpng12; do
230 AC_MSG_CHECKING(for $l)
231 if $PKG_CONFIG --exists $l ; then
233 PNG_LIBS=`$PKG_CONFIG --libs $l`
241 if test "$png_ok" != yes; then
242 AC_CHECK_LIB(png, png_read_info,
243 [AC_CHECK_HEADER(png.h,
246 AC_MSG_ERROR([PNG library (libpng) not found]), -lz -lm)
247 if test "$png_ok" = yes; then
248 AC_MSG_CHECKING([for png_structp in png.h])
249 AC_TRY_COMPILE([#include <png.h>],
250 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
253 AC_MSG_RESULT($png_ok)
254 if test "$png_ok" = yes; then
257 AC_MSG_ERROR([PNG library (libpng) not found])
260 AC_MSG_ERROR([PNG library (libpng) not found])
266 if test "$os_win32" = "yes"; then
268 SHLWAPI_LIBS=-lshlwapi
271 AC_SUBST([WINMM_LIBS])
272 AC_SUBST([SHLWAPI_LIBS])
273 AC_SUBST([OLE32_LIBS])
276 # determine the GTK+ version to use
277 AC_MSG_CHECKING([the GTK+ version to use])
279 [AS_HELP_STRING([--with-gtk=2.0|3.0], [the GTK+ version to use (default: 3.0)])],
282 *) AC_MSG_ERROR([invalid GTK+ version specified]) ;;
285 AC_MSG_RESULT([$with_gtk])
287 GTK2_REQUIRED_VERSION=2.10
288 GAIL2_REQUIRED_VERSION=1.8
289 GTK3_REQUIRED_VERSION=3.4.0
290 GAIL3_REQUIRED_VERSION=3.0
293 2.0) GTK_REQUIRED_VERSION=$GTK2_REQUIRED_VERSION
295 WEBKITGTK_API_MAJOR_VERSION=1
296 WEBKITGTK_API_MINOR_VERSION=0
297 WEBKITGTK_API_VERSION=1.0
298 WEBKITGTK_PC_NAME=webkit
300 GAIL_REQUIRED_VERSION=$GAIL2_REQUIRED_VERSION
302 3.0) GTK_REQUIRED_VERSION=$GTK3_REQUIRED_VERSION
304 WEBKITGTK_API_MAJOR_VERSION=3
305 WEBKITGTK_API_MINOR_VERSION=0
306 WEBKITGTK_API_VERSION=3.0
307 WEBKITGTK_PC_NAME=webkitgtk
308 GAIL_PC_NAME=gail-3.0
309 GAIL_REQUIRED_VERSION=$GAIL3_REQUIRED_VERSION
313 AC_SUBST([WEBKITGTK_API_MAJOR_VERSION])
314 AC_SUBST([WEBKITGTK_API_MINOR_VERSION])
315 AC_SUBST([WEBKITGTK_API_VERSION])
316 AC_SUBST([WEBKITGTK_PC_NAME])
317 AC_SUBST([GTK_API_VERSION])
318 AM_CONDITIONAL([GTK_API_VERSION_2],[test "$GTK_API_VERSION" = "2.0"])
320 # determine the GDK/GTK+ target
321 AC_MSG_CHECKING([the target windowing system])
323 AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
324 [Select webkit target [default=x11]]),
325 [],[with_target="x11"])
327 case "$with_target" in
328 x11|win32|quartz|directfb) ;;
329 *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
332 AC_MSG_RESULT([$with_target])
334 AC_MSG_CHECKING([the GStreamer version to use])
335 AC_ARG_WITH([gstreamer],
336 [AS_HELP_STRING([--with-gstreamer=0.10|1.0], [the GStreamer version to use (default: 0.10)])],
337 [case "$with_gstreamer" in
339 *) AC_MSG_ERROR([invalid GStreamer version specified]) ;;
341 [with_gstreamer=0.10])
342 AC_MSG_RESULT([$with_gstreamer])
344 GSTREAMER_0_10_REQUIRED_VERSION=0.10
345 GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION=0.10.30
346 GSTREAMER_1_0_REQUIRED_VERSION=1.0
347 GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION=0.11.90
349 case "$with_gstreamer" in
350 0.10) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_0_10_REQUIRED_VERSION
351 GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION
354 1.0) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_1_0_REQUIRED_VERSION
355 GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION
360 AC_SUBST([GST_API_VERSION])
361 if test "$GST_API_VERSION" = "1.0"; then
362 AC_DEFINE([GST_USE_UNSTABLE_API], [1], [Using unstable GStreamer API])
363 AC_DEFINE([GST_API_VERSION_1],[1], [Using GStreamer 1.0])
366 # minimum base dependencies
367 CAIRO_REQUIRED_VERSION=1.10
368 FONTCONFIG_REQUIRED_VERSION=2.4
369 FREETYPE2_REQUIRED_VERSION=9.0
370 GLIB_REQUIRED_VERSION=2.32.0
371 LIBSOUP_REQUIRED_VERSION=2.37.92
372 LIBXML_REQUIRED_VERSION=2.6
373 PANGO_REQUIRED_VERSION=1.21.0
376 LIBXSLT_REQUIRED_VERSION=1.1.7
377 SQLITE_REQUIRED_VERSION=3.0
378 ENCHANT_REQUIRED_VERSION=0.22
379 CLUTTER_REQUIRED_VERSION=1.8.2
380 CLUTTER_GTK_REQUIRED_VERSION=1.0.2
381 ATSPI2_REQUIRED_VERSION=2.2.1
383 # Check for glib and required utilities
384 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :, :, gmodule gobject gthread gio)
385 if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then
386 AC_MSG_ERROR([You need the GLib dev tools in your path])
390 # Check and identify which unicode backend to use
391 AC_MSG_CHECKING([which Unicode backend to use])
392 AC_ARG_WITH(unicode_backend,
393 AC_HELP_STRING([--with-unicode-backend=@<:@icu/glib@:>@],
394 [Select Unicode backend (WARNING: the glib-based backend is slow, and incomplete) [default=icu]]),
395 [],[with_unicode_backend="icu"])
397 case "$with_unicode_backend" in
399 *) AC_MSG_ERROR([Invalid Unicode backend: must be icu or glib.]) ;;
402 AC_MSG_RESULT([$with_unicode_backend])
404 if test "$with_unicode_backend" = "icu"; then
405 # TODO: use pkg-config (after CFLAGS in their .pc files are cleaned up)
408 UNICODE_CFLAGS="-I$srcdir/Source/JavaScriptCore/icu -I$srcdir/Source/WebCore/icu"
409 UNICODE_LIBS="-licucore"
413 UNICODE_LIBS="-licui18n -licuuc"
416 AC_PATH_PROG(icu_config, icu-config, no)
417 if test "$icu_config" = "no"; then
418 AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.])
421 # We don't use --cflags as this gives us a lot of things that we don't
422 # necessarily want, like debugging and optimization flags
423 # See man (1) icu-config for more info.
424 UNICODE_CFLAGS=`$icu_config --cppflags`
425 UNICODE_LIBS=`$icu_config --ldflags-libsonly`
430 if test "$with_unicode_backend" = "glib"; then
431 PKG_CHECK_MODULES([UNICODE], [glib-2.0 pango >= $PANGO_REQUIRED_VERSION])
434 AC_SUBST([UNICODE_CFLAGS])
435 AC_SUBST([UNICODE_LIBS])
437 PKG_CHECK_MODULES([ZLIB], [zlib])
438 AC_SUBST([ZLIB_CFLAGS])
439 AC_SUBST([ZLIB_LIBS])
441 GETTEXT_PACKAGE=$PACKAGE-$GTK_API_VERSION
442 AC_SUBST(GETTEXT_PACKAGE)
443 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
444 [The gettext catalog name])
446 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
447 AC_SUBST(LIBXML_CFLAGS)
448 AC_SUBST(LIBXML_LIBS)
450 PKG_CHECK_MODULES(PANGO,
451 [pango >= $PANGO_REQUIRED_VERSION
453 AC_SUBST(PANGO_CFLAGS)
456 AC_MSG_CHECKING([whether to enable spellcheck support])
457 AC_ARG_ENABLE([spellcheck],
458 [AS_HELP_STRING([--enable-spellcheck],[enable support for spellcheck])],
459 [],[enable_spellcheck="yes"])
460 AC_MSG_RESULT([$enable_spellcheck])
462 if test "$enable_spellcheck" = "yes"; then
463 PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED_VERSION, [], [enable_spellcheck="no"])
464 AC_SUBST(ENCHANT_CFLAGS)
465 AC_SUBST(ENCHANT_LIBS)
468 PKG_CHECK_MODULES(GAIL, $GAIL_PC_NAME >= $GAIL_REQUIRED_VERSION)
469 AC_SUBST(GAIL_CFLAGS)
472 # check for target-specific dependencies
473 if test "$with_target" = "directfb"; then
474 PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION)
475 PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION)
476 AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB])
478 PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
479 PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
481 if test "$with_target" = "x11" && test "$os_win32" = "no"; then
483 PKG_CHECK_MODULES([XT],
485 [xt_has_pkg_config=yes],
486 [xt_has_pkg_config=no])
487 # some old versions of Xt do not provide xt.pc, so try to link against Xt
488 # and if it's installed fall back to just adding -lXt
489 if test "$xt_has_pkg_config" = "no"; then
490 # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
491 # we don't care about the XtOpenDisplay symbol but only about the
493 AC_CHECK_LIB([Xt], [XtOpenDisplay],
494 [XT_CFLAGS=""; XT_LIBS="-lXt"],
495 [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
497 AC_SUBST([XT_CFLAGS])
499 AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
504 AC_SUBST(CAIRO_CFLAGS)
507 # check whether to build with debugging enabled
508 AC_MSG_CHECKING([whether to do a debug build])
510 AC_HELP_STRING([--enable-debug],
511 [turn on debugging [default=no]]),
512 [],[enable_debug="no"])
513 AC_MSG_RESULT([$enable_debug])
515 # check whether to enable optimized builds
516 AC_MSG_CHECKING([whether to enable optimized builds])
517 AC_ARG_ENABLE(optimizations,
518 AC_HELP_STRING([--enable-optimizations],
519 [turn on optimize builds (GCC only)
521 [enable_optimizations=$enableval],
522 [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
523 AC_MSG_RESULT([$enable_optimizations])
525 # check whether to enable WebGL support
526 AC_MSG_CHECKING([whether to enable WebGL support])
528 AC_HELP_STRING([--enable-webgl], [enable support for WebGL [default=yes]]),
529 [], [if test "$with_target" = "x11"; then enable_webgl="yes"; else enable_webgl="no"; fi])
530 AC_MSG_RESULT([$enable_webgl])
532 # check whether to enable accelerated compositing support
533 AC_MSG_CHECKING([whether to enable accelerated compositing support])
534 AC_ARG_WITH(accelerated_compositing,
535 AC_HELP_STRING([--with-accelerated-compositing=@<:@no/opengl/cairo/clutter@:>@],
536 [use accelerated compositing (experimental) [default=no]]),
537 [], [with_accelerated_compositing="no"])
538 AC_MSG_RESULT([$with_accelerated_compositing])
540 if test "$enable_webgl" = "yes" || test "$with_accelerated_compositing" = "opengl" ; then
541 if test "$with_target" != "x11"; then
542 AC_MSG_ERROR([OpenGL support is only available on X11 currently.])
544 AC_CHECK_HEADERS([GL/gl.h], [], AC_MSG_ERROR([OpenGL header not found]))
545 AC_CHECK_HEADERS([GL/glx.h], [], AC_MSG_ERROR([GLX header not found]))
546 OPENGL_LIBS="-lGL -ldl"
548 AC_SUBST([OPENGL_LIBS])
550 if test "$with_accelerated_compositing" = "clutter"; then
551 PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
552 PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED_VERSION])
554 AC_SUBST(CLUTTER_CFLAGS)
555 AC_SUBST(CLUTTER_LIBS)
556 AC_SUBST(CLUTTER_GTK_CFLAGS)
557 AC_SUBST(CLUTTER_GTK_LIBS)
560 # check whether to enable channel messaging support
561 AC_MSG_CHECKING([whether to enable HTML5 Channel Messaging support])
562 AC_ARG_ENABLE(channel_messaging,
563 AC_HELP_STRING([--enable-channel-messaging],
564 [enable HTML5 channel messaging support [default=yes]]),
565 [],[enable_channel_messaging="yes"])
566 AC_MSG_RESULT([$enable_channel_messaging])
568 # check whether to enable legacy notifications
569 AC_MSG_CHECKING([whether to enable legacy notifications])
570 AC_ARG_ENABLE(legacy_notifications,
571 AC_HELP_STRING([--enable-legacy-notifications],
572 [enable legacy notifications [default=no]]),
573 [],[enable_legacy_notifications="no"])
574 AC_MSG_RESULT([$enable_legacy_notifications])
576 # check whether to enable notifications
577 AC_MSG_CHECKING([whether to enable notifications])
578 AC_ARG_ENABLE(notifications,
579 AC_HELP_STRING([--enable-notifications],
580 [enable notifications [default=no]]),
581 [],[enable_notifications="no"])
582 AC_MSG_RESULT([$enable_notifications])
584 # check whether to enable the meter tag
585 AC_MSG_CHECKING([whether to enable HTML5 meter tag])
586 AC_ARG_ENABLE(meter_tag,
587 AC_HELP_STRING([--enable-meter-tag],
588 [enable HTML5 meter [default=yes]]),
589 [],[enable_meter_tag="yes"])
590 AC_MSG_RESULT([$enable_meter_tag])
592 # check whether to enable HTML5 Microdata support
593 AC_MSG_CHECKING([whether to enable HTML5 Microdata support])
594 AC_ARG_ENABLE(microdata,
595 AC_HELP_STRING([--enable-microdata],
596 [enable HTML5 microdata support [default=no]]),
597 [],[enable_microdata="no"])
598 AC_MSG_RESULT([$enable_microdata])
600 # check whether to enable page visibility API.
601 AC_MSG_CHECKING([whether to enable Page Visibility API support])
602 AC_ARG_ENABLE(page_visibility_api,
603 AC_HELP_STRING([--enable-page-visibility-api],
604 [enable page visibility api[default=no]]),
605 [],[enable_page_visibility_api="no"])
606 AC_MSG_RESULT([$enable_page_visibility_api])
608 # check whether to enable the progress tag
609 AC_MSG_CHECKING([whether to enable HTML5 progress tag])
610 AC_ARG_ENABLE(progress_tag,
611 AC_HELP_STRING([--enable-progress-tag],
612 [enable HTML5 progress [default=yes]]),
613 [],[enable_progress_tag="yes"])
614 AC_MSG_RESULT([$enable_progress_tag])
616 # check whether to enable JavaScript debugger/profiler support
617 AC_MSG_CHECKING([whether to enable JavaScript debugger/profiler support])
618 AC_ARG_ENABLE(javascript_debugger,
619 AC_HELP_STRING([--enable-javascript-debugger],
620 [enable JavaScript debugger/profiler support [default=yes]]),
621 [],[enable_javascript_debugger="yes"])
622 AC_MSG_RESULT([$enable_javascript_debugger])
624 # check whether to enable Gamepad support
625 AC_MSG_CHECKING([whether to enable Gamepad support])
626 AC_ARG_ENABLE(gamepad,
627 AC_HELP_STRING([--enable-gamepad],
628 [enable Gamepad support [default=no]]),
629 [],[enable_gamepad="no"])
630 AC_MSG_RESULT([$enable_gamepad])
632 # check whether to build with data transfer items support
633 AC_MSG_CHECKING([whether to enable HTML5 data transfer items support])
634 AC_ARG_ENABLE(data_transfer_items,
635 AC_HELP_STRING([--enable-data-transfer-items],
636 [enable HTML5 data transfer items support [default=no]]),
637 [],[enable_data_transfer_items="no"])
638 AC_MSG_RESULT([$enable_data_transfer_items])
640 # check whether to enable DOM mutation observer support
641 AC_MSG_CHECKING([whether to enable DOM mutation observer support])
642 AC_ARG_ENABLE(mutation_observers,
643 AC_HELP_STRING([--enable-mutation-observers],
644 [enable DOM mutation observer support [default=no]]),
645 [],[enable_mutation_observers="no"])
646 AC_MSG_RESULT([$enable_mutation_observers])
648 # check whether to enable the indexed database API
649 AC_MSG_CHECKING([whether to enable the indexed database API])
650 AC_ARG_ENABLE(indexed_database,
651 AC_HELP_STRING([--enable-indexed-database],
652 [enable the indexed database API (incomplete) [default=no]]),
653 [],[enable_indexed_database="no"])
654 AC_MSG_RESULT([$enable_indexed_database])
656 # check whether to enable the color input
657 AC_MSG_CHECKING([whether to enable the color input])
658 AC_ARG_ENABLE(input_type_color,
659 AC_HELP_STRING([--enable-input-type-color],
660 [enable the color input [default=no]]),
661 [],[enable_input_type_color="no"])
662 AC_MSG_RESULT([$enable_input_type_color])
664 # check whether to enable the speech input API
665 AC_MSG_CHECKING([whether to enable the speech input API])
666 AC_ARG_ENABLE(input_speech,
667 AC_HELP_STRING([--enable-input-speech],
668 [enable the speech input API [default=no]]),
669 [],[enable_input_speech="no"])
670 AC_MSG_RESULT([$enable_input_speech])
672 # check whether to enable the scripted speech API
673 AC_MSG_CHECKING([whether to enable the scripted speech API])
674 AC_ARG_ENABLE(scripted_speech,
675 AC_HELP_STRING([--enable-scripted-speech],
676 [enable the scripted speech API [default=no]]),
677 [],[enable_scripted_speech="no"])
678 AC_MSG_RESULT([$enable_scripted_speech])
680 # check whether to build with SQL database support
681 AC_MSG_CHECKING([whether to enable SQL client-side database storage support])
682 AC_ARG_ENABLE(sql_database,
683 AC_HELP_STRING([--enable-sql-database],
684 [enable SQL client-side database storage support [default=yes]]),
685 [],[enable_sql_database="yes"])
686 AC_MSG_RESULT([$enable_sql_database])
688 # check whether to build with icon database support
689 AC_MSG_CHECKING([whether to enable icon database support])
690 AC_ARG_ENABLE(icon_database,
691 AC_HELP_STRING([--enable-icon-database],
692 [enable icon database [default=yes]]),
693 [],[enable_icon_database="yes"])
694 AC_MSG_RESULT([$enable_icon_database])
696 # check whether to enable HTML5 datalist support
697 AC_MSG_CHECKING([whether to enable HTML5 datalist support])
698 AC_ARG_ENABLE(datalist,
699 AC_HELP_STRING([--enable-datalist],
700 [enable HTML5 datalist support [default=yes]]),
701 [],[enable_datalist="yes"])
702 AC_MSG_RESULT([$enable_datalist])
704 # check whether to enable HTML5 iframe seamless attribute support
705 AC_MSG_CHECKING([whether to enable HTML5 iframe seamless attribute support])
706 AC_ARG_ENABLE(iframe-seamless,
707 AC_HELP_STRING([--enable-iframe-seamless],
708 [enable HTML5 iframe seamless attribute support [default=yes]]),
709 [],[enable_iframe_seamless="yes"])
710 AC_MSG_RESULT([$enable_iframe_seamless])
712 # check whether to enable HTML5 audio/video support
713 AC_MSG_CHECKING([whether to enable HTML5 video support])
715 AC_HELP_STRING([--enable-video],
716 [enable HTML5 video support [default=yes]]),
717 [],[enable_video="yes"])
718 AC_MSG_RESULT([$enable_video])
720 # turn off video features if --disable-video is requested
721 if test "$enable_video" = "no"; then
722 enable_video_track=no
725 # check whether to enable HTML5 video track support
726 AC_MSG_CHECKING([whether to enable HTML5 video track support])
727 AC_ARG_ENABLE(video_track,
728 AC_HELP_STRING([--enable-video-track],
729 [enable HTML5 video track support [default=no]]),
730 [],[enable_video_track="no"])
731 AC_MSG_RESULT([$enable_video_track])
733 # check whether to enable media source support
734 AC_MSG_CHECKING([whether to enable media source support])
735 AC_ARG_ENABLE(media_source,
736 AC_HELP_STRING([--enable-media-source],
737 [enable support for media source [default=no]]),
738 [], [enable_media_source="no"])
739 AC_MSG_RESULT([$enable_media_source])
741 # check whether to enable media statistics support
742 AC_MSG_CHECKING([whether to enable media statistics support])
743 AC_ARG_ENABLE(media_statistics,
744 AC_HELP_STRING([--enable-media-statistics],
745 [enable support for media statistics [default=no]]),
746 [], [enable_media_statistics="no"])
747 AC_MSG_RESULT([$enable_media_statistics])
749 # check whether to enable Javascript Fullscreen API support
750 AC_MSG_CHECKING([whether to enable Fullscreen API support])
751 AC_ARG_ENABLE(fullscreen_api,
752 AC_HELP_STRING([--enable-fullscreen-api],
753 [enable the Fullscreen API support [default=yes]]),
754 [],[enable_fullscreen_api="yes"])
755 AC_MSG_RESULT([$enable_fullscreen_api])
757 # check whether to enable media stream support
758 AC_MSG_CHECKING([whether to enable media stream support])
759 AC_ARG_ENABLE(media_stream,
760 AC_HELP_STRING([--enable-media-stream],
761 [enable media stream support (incomplete) [default=no]]),
762 [],[enable_media_stream="no"])
763 AC_MSG_RESULT([$enable_media_stream])
765 # check whether to enable XSLT support
766 AC_MSG_CHECKING([whether to enable XSLT support])
768 AC_HELP_STRING([--enable-xslt],
769 [enable support for XSLT [default=yes]]),
770 [],[enable_xslt="yes"])
771 AC_MSG_RESULT([$enable_xslt])
773 # check whether to enable geolocation support
774 AC_MSG_CHECKING([whether to enable geolocation support])
775 AC_ARG_ENABLE(geolocation,
776 AC_HELP_STRING([--enable-geolocation],
777 [enable support for geolocation [default=yes]]),
778 [],[enable_geolocation="yes"])
779 AC_MSG_RESULT([$enable_geolocation])
781 # check whether to enable MathML support
782 AC_MSG_CHECKING([whether to enable MathML support])
783 AC_ARG_ENABLE(mathml,
784 AC_HELP_STRING([--enable-mathml],
785 [enable support for MathML [default=yes]]),
786 [],[enable_mathml="yes"])
787 AC_MSG_RESULT([$enable_mathml])
789 # check whether to enable MHTML support
790 AC_MSG_CHECKING([whether to enable MHTML support])
792 AC_HELP_STRING([--enable-mhtml],
793 [enable support for MHTML [default=no]]),
794 [],[enable_mhtml="no"])
795 AC_MSG_RESULT([$enable_mhtml])
797 # check whether to enable SVG support
798 AC_MSG_CHECKING([whether to enable SVG support])
800 AC_HELP_STRING([--enable-svg],
801 [enable support for SVG [default=yes]]),
802 [],[enable_svg="yes"])
803 AC_MSG_RESULT([$enable_svg])
805 # check whether to enable Shadow DOM support
806 AC_MSG_CHECKING([whether to enable Shadow DOM support])
807 AC_ARG_ENABLE(shadow_dom,
808 AC_HELP_STRING([--enable-shadow-dom],
809 [enable support for Shadow DOM [default=yes]]),
810 [],[enable_shadow_dom="yes"])
811 AC_MSG_RESULT([$enable_shadow_dom])
813 # check whether to enable SharedWorkers support
814 AC_MSG_CHECKING([whether to enable SharedWorkers support])
815 AC_ARG_ENABLE(shared_workers,
816 AC_HELP_STRING([--enable-shared-workers],
817 [enable support for SharedWorkers [default=yes]]),
818 [],[enable_shared_workers="yes"])
819 AC_MSG_RESULT([$enable_shared_workers])
821 # check whether to enable Web Workers support
822 AC_MSG_CHECKING([whether to enable Web Workers support])
823 AC_ARG_ENABLE(workers,
824 AC_HELP_STRING([--enable-workers],
825 [enable support for Web Workers [default=yes]]),
826 [],[enable_workers="yes"])
827 AC_MSG_RESULT([$enable_workers])
829 # check whether to enable directory upload support
830 AC_MSG_CHECKING([whether to enable directory upload support])
831 AC_ARG_ENABLE(directory_upload,
832 AC_HELP_STRING([--enable-directory-upload],
833 [enable support for directory upload [default=no]]),
834 [], [enable_directory_upload="no"])
835 AC_MSG_RESULT([$enable_directory_upload])
837 # check whether to enable HTML5 FileSystem API support
838 AC_MSG_CHECKING([whether to enable HTML5 FileSystem API support])
839 AC_ARG_ENABLE(file_system,
840 AC_HELP_STRING([--enable-file-system],
841 [enable support for HTML5 FileSystem API [default=no]]),
842 [], [enable_file_system="no"])
843 AC_MSG_RESULT([$enable_file_system])
845 # check whether to enable HTML5 <style scoped> support
846 AC_MSG_CHECKING([whether to enable HTML5 <style scoped> support])
847 AC_ARG_ENABLE(style_scoped,
848 AC_HELP_STRING([--enable-style-scoped],
849 [enable support for HTML5 <style scoped> [default=no]]),
850 [], [enable_style_scoped="no"])
851 AC_MSG_RESULT([$enable_style_scoped])
853 # check whether to enable Quota API support
854 AC_MSG_CHECKING([whether to enable Quota API support])
856 AC_HELP_STRING([--enable-quota],
857 [enable support for Quota API [default=no]]),
858 [], [enable_quota="no"])
859 AC_MSG_RESULT([$enable_quota])
861 # turn off svg features if --disable-svg is requested
862 if test "$enable_svg" = "no"; then
866 # check whether to enable support for filters
867 AC_MSG_CHECKING([whether to enable support for filters])
868 AC_ARG_ENABLE(filters,
869 AC_HELP_STRING([--enable-filters],
870 [enable support for filters (experimental) [default=yes]]),
871 [],[enable_filters="yes"])
872 AC_MSG_RESULT([$enable_filters])
874 # check whether to enable support for SVG fonts
875 AC_MSG_CHECKING([whether to enable support for SVG fonts])
876 AC_ARG_ENABLE(svg_fonts,
877 AC_HELP_STRING([--enable-svg-fonts],
878 [enable support for SVG fonts (experimental) [default=yes]]),
879 [],[enable_svg_fonts="yes"])
880 AC_MSG_RESULT([$enable_svg_fonts])
882 # check for SVG features, enabling SVG if necessary
883 if test "$enable_svg_fonts" = "yes"; then
885 if test "$enable_svg" = "no"; then
886 AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
891 # check whether to enable Web Socket support
892 AC_MSG_CHECKING([whether to enable Web Sockets support])
893 AC_ARG_ENABLE(web_sockets,
894 AC_HELP_STRING([--enable-web-sockets],
895 [enable support for Web Sockets [default=yes]]),
896 [],[enable_web_sockets="yes"])
897 AC_MSG_RESULT([$enable_web_sockets])
899 # check whether to enable Web Audio support
900 AC_MSG_CHECKING([whether to enable Web Audio support])
901 AC_ARG_ENABLE(web_audio,
902 AC_HELP_STRING([--enable-web-audio],
903 [enable support for Web Audio [default=no]]),
904 [],[enable_web_audio="no"])
905 AC_MSG_RESULT([$enable_web_audio])
907 # check whether to enable Web Timing support
908 AC_MSG_CHECKING([whether to enable Web Timing support])
909 AC_ARG_ENABLE(web_timing,
910 AC_HELP_STRING([--enable-web-timing],
911 [enable support for Web Timing [default=no]]),
912 [],[enable_web_timing="no"])
913 AC_MSG_RESULT([$enable_web_timing])
915 # check whether to enable Blob support
916 AC_MSG_CHECKING([whether to enable Blob support])
918 AC_HELP_STRING([--enable-blob],
919 [enable support for Blob [default=yes]]),
920 [],[enable_blob="yes"])
921 AC_MSG_RESULT([$enable_blob])
923 # check whether to enable Legacy WebKitBlobBuilder support
924 AC_MSG_CHECKING([whether to enable Legacy WebKitBlobBuilder support])
925 AC_ARG_ENABLE(legacy_webkit_blob_builder,
926 AC_HELP_STRING([--enable-legacy-webkit-blob-builder],
927 [enable support for Legacy WebKitBlobBuilder [default=yes]]),
928 [],[enable_legacy_webkit_blob_builder="yes"])
929 AC_MSG_RESULT([$legacy_webkit_blob_builder])
931 # check whether to enable Fast Mobile Scrolling support
932 AC_MSG_CHECKING([whether to enable Fast Mobile Scrolling])
933 AC_ARG_ENABLE(fast_mobile_scrolling,
934 AC_HELP_STRING([--enable-fast-mobile-scrolling],
935 [enable support for Fast Mobile Scrolling [default=no]]),
936 [],[enable_fast_mobile_scrolling="no"])
937 AC_MSG_RESULT([$enable_fast_mobile_scrolling])
939 # check whether to enable code coverage
940 AC_MSG_CHECKING([whether to enable code coverage support])
941 AC_ARG_ENABLE(coverage,
942 AC_HELP_STRING([--enable-coverage],
943 [enable code coverage support [default=no]]),
944 [],[enable_coverage="no"])
945 AC_MSG_RESULT([$enable_coverage])
947 # check whether to enable CSS flaxbox support
948 AC_MSG_CHECKING([whether to enable CSS3 flexbox support])
949 AC_ARG_ENABLE(css3_flexbox,
950 AC_HELP_STRING([--enable-css3-flexbox],
951 [enable CSS3 flexbox support [default=no]]),
952 [],[enable_css3_flexbox="no"])
953 AC_MSG_RESULT([$enable_css3_flexbox])
955 # check whether to enable FastMalloc
956 AC_MSG_CHECKING([whether to enable optimized memory allocator])
957 AC_ARG_ENABLE(fast_malloc,
958 AC_HELP_STRING([--enable-fast-malloc],
959 [enable optimized memory allocator default=yes, default=no for debug builds]),
960 [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
961 AC_MSG_RESULT([$enable_fast_malloc])
963 # check whether to enable debug symbols
964 AC_MSG_CHECKING([whether to enable debug symbols])
965 AC_ARG_ENABLE(debug_symbols,
966 AC_HELP_STRING([--enable-debug-symbols],
967 [enable debug symbols default=no, default=yes for debug builds]),
968 [],[if test "$enable_debug" = "yes"; then enable_debug_symbols="yes"; else enable_debug_symbols="no"; fi])
969 AC_MSG_RESULT([$enable_debug_symbols])
971 # check whether to enable debug features
972 AC_MSG_CHECKING([whether to enable debug features])
973 AC_ARG_ENABLE(debug_features,
974 AC_HELP_STRING([--enable-debug-features],
975 [enable debug features default=no, default=yes for debug builds]),
976 [],[if test "$enable_debug" = "yes"; then enable_debug_features="yes"; else enable_debug_features="no"; fi])
977 AC_MSG_RESULT([$enable_debug_features])
979 AC_MSG_CHECKING([whether to enable JIT compilation])
981 AS_HELP_STRING([--enable-jit],
982 [Enable JIT compilation (default: autodetect)]))
983 case "$enable_jit" in
984 yes) JSC_CPPFLAGS="-DENABLE_JIT=1" ;;
985 no) JSC_CPPFLAGS="-DENABLE_JIT=0" ;;
986 *) enable_jit="autodetect" ;;
988 AC_SUBST(JSC_CPPFLAGS)
989 AC_MSG_RESULT([$enable_jit])
992 AC_MSG_CHECKING([whether to enable opcode stats])
993 AC_ARG_ENABLE([opcode-stats],
994 [AS_HELP_STRING([--enable-opcode-stats], [Enable Opcode statistics (default: disabled)])],
995 [], [enable_opcode_stats=no])
996 AC_MSG_RESULT([$enable_opcode_stats])
998 if test "$enable_opcode_stats" = "yes"; then
999 if test "$enable_jit" = "yes"; then
1000 AC_MSG_ERROR([JIT must be disabled for Opcode stats to work.])
1002 AC_DEFINE([ENABLE_OPCODE_STATS], [1], [Define to enable Opcode statistics])
1006 AC_MSG_CHECKING([whether to enable link prefetch support])
1007 AC_ARG_ENABLE([link-prefetch],
1008 [AS_HELP_STRING([--enable-link-prefetch], [Enable Link prefetch support (default: disabled)])],
1009 [],[enable_link_prefetch=no])
1010 AC_MSG_RESULT([$enable_link_prefetch])
1012 if test "$enable_link_prefetch" = "yes"; then
1013 AC_DEFINE([ENABLE_LINK_PREFETCH], [1], [Define to enable link prefetch support])
1016 # GObject Introspection
1017 AC_MSG_CHECKING([whether to enable GObject introspection support])
1018 AC_ARG_ENABLE([introspection],
1019 [AS_HELP_STRING([--enable-introspection],[Enable GObject introspection (default: disabled)])],
1020 [],[enable_introspection=no])
1021 AC_MSG_RESULT([$enable_introspection])
1023 # check whether to enable animation API
1024 AC_MSG_CHECKING([whether to enable Animation API support])
1025 AC_ARG_ENABLE(animation_api,
1026 AC_HELP_STRING([--enable-animation-api],
1027 [enable support for Animation API (experimental) [default=no]]),
1028 [], [enable_animation_api="no"])
1029 AC_MSG_RESULT([$enable_animation_api])
1031 # check whether to enable requestAnimationFrame support
1032 AC_MSG_CHECKING([whether to enable requestAnimationFrame support])
1033 AC_ARG_ENABLE(request_animation_frame,
1034 AC_HELP_STRING([--enable-request-animation-frame],
1035 [enable support for requestAnimationFrame (experimental) [default=yes]]),
1036 [],[enable_request_animation_frame="yes"])
1037 AC_MSG_RESULT([$enable_request_animation_frame])
1039 # check whether to enable touch icon loading
1040 AC_MSG_CHECKING([whether to enable touch icon loading])
1041 AC_ARG_ENABLE(touch_icon_loading,
1042 AC_HELP_STRING([--enable-touch-icon-loading],
1043 [enable support for loading touch icons [default=no]]),
1044 [], [enable_touch_icon_loading="no"])
1045 AC_MSG_RESULT([$enable_touch_icon_loading])
1047 # check whether to enable Register Protocol Handler support
1048 AC_MSG_CHECKING([whether to enable Register Protocol Handler])
1049 AC_ARG_ENABLE(register_protocol_handler,
1050 AC_HELP_STRING([--enable-register-protocol-handler],
1051 [enable support for Register Protocol Handler (experimental) [default=no]]),
1052 [],[enable_register_protocol_handler="no"])
1053 AC_MSG_RESULT([$enable_register_protocol_handler])
1055 # check whether to enable DeviceOrientation support
1056 AC_MSG_CHECKING([whether to enable DeviceOrientation])
1057 AC_ARG_ENABLE(device_orientation,
1058 AC_HELP_STRING([--enable-device-orientation],
1059 [enable support for DeviceOrientation (experimental and incomplete) [default=no]]),
1060 [],[enable_device_orientation="no"])
1061 AC_MSG_RESULT([$enable_device_orientation])
1063 # check whether to enable Font Boosting support
1064 AC_MSG_CHECKING([whether to enable Font Boosting])
1065 AC_ARG_ENABLE(font_boosting,
1066 AC_HELP_STRING([--enable-font-boosting],
1067 [enable support for Font Boosting (incomplete) [default=no]]),
1068 [],[enable_font_boosting="no"])
1069 AC_MSG_RESULT([$enable_font_boosting])
1071 # check whether to enable CSS Exclusions support
1072 AC_MSG_CHECKING([whether to enable CSS Exclusions])
1073 AC_ARG_ENABLE(css_exclusions,
1074 AC_HELP_STRING([--enable-css-exclusions],
1075 [enable support for CSS Exclusions [default=yes]]),
1076 [],[enable_css_exclusions="yes"])
1077 AC_MSG_RESULT([$enable_css_exclusions])
1079 # check whether to enable CSS Regions support
1080 AC_MSG_CHECKING([whether to enable CSS Regions])
1081 AC_ARG_ENABLE(css_regions,
1082 AC_HELP_STRING([--enable-css-regions],
1083 [enable support for CSS Regions [default=yes]]),
1084 [],[enable_css_regions="yes"])
1085 AC_MSG_RESULT([$enable_css_regions])
1093 if test "$enable_introspection" = "yes"; then
1094 GOBJECT_INTROSPECTION_REQUIRED=0.9.5
1095 PKG_CHECK_MODULES([INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
1097 G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
1098 G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
1099 G_IR_GENERATE="$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)"
1100 AC_DEFINE([ENABLE_INTROSPECTION],[1],[Define to enable GObject introspection support])
1103 AC_SUBST([G_IR_SCANNER])
1104 AC_SUBST([G_IR_COMPILER])
1105 AC_SUBST([G_IR_GENERATE])
1107 # determine the font backend
1108 AC_MSG_CHECKING([the font backend to use])
1109 AC_ARG_WITH(font_backend,
1110 AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
1111 [Select font backend [default=freetype]]),
1112 [],[with_font_backend="freetype"])
1114 case "$with_font_backend" in
1116 *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
1118 AC_MSG_RESULT([$with_font_backend])
1120 if test "$host_cpu" = "sh4"; then
1121 CXXFLAGS="$CXXFLAGS -mieee -w"
1122 CFLAGS="$CFLAGS -mieee -w"
1125 # Add '-g' flag to gcc to build with debug symbols
1126 if test "$enable_debug_symbols" = "yes"; then
1127 CXXFLAGS="$CXXFLAGS -g"
1131 if test "$enable_debug_features" = "no"; then
1132 AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
1135 # Add the appropriate 'O' level for optimized builds
1136 if test "$enable_optimizations" = "yes"; then
1137 CXXFLAGS="$CXXFLAGS -O2"
1138 CFLAGS="$CFLAGS -O2"
1140 CXXFLAGS="$CXXFLAGS -O0"
1141 CFLAGS="$CFLAGS -O0"
1144 PKG_CHECK_MODULES([LIBSOUP],
1145 [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
1146 AC_SUBST([LIBSOUP_CFLAGS])
1147 AC_SUBST([LIBSOUP_LIBS])
1149 # check if FreeType/FontConfig are available
1150 if test "$with_font_backend" = "freetype"; then
1151 if test "$with_target" = "directfb"; then
1152 PKG_CHECK_MODULES([FREETYPE],
1153 [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
1154 freetype2 >= $FREETYPE2_REQUIRED_VERSION])
1156 PKG_CHECK_MODULES([FREETYPE],
1158 fontconfig >= $FONTCONFIG_REQUIRED_VERSION
1159 freetype2 >= $FREETYPE2_REQUIRED_VERSION])
1161 AC_SUBST([FREETYPE_CFLAGS])
1162 AC_SUBST([FREETYPE_LIBS])
1165 # check if SQLite3 is available. Error out only if one of the
1166 # features hard-depending on it is enabled while SQLite3 is
1168 PKG_CHECK_MODULES([SQLITE3],
1169 [sqlite3 >= $SQLITE_REQUIRED_VERSION],
1170 [sqlite3_has_pkg_config=yes],
1171 [sqlite3_has_pkg_config=no])
1172 if test "$sqlite3_has_pkg_config" = "no"; then
1173 AC_SEARCH_LIBS([sqlite3_open16], [sqlite3],
1174 [sqlite3_found=yes;SQLITE3_LIBS="$LIBS";SQLITE3_CFLAGS="-I $srcdir/WebKitLibraries/WebCoreSQLite3"],
1177 AC_SUBST([SQLITE3_CFLAGS])
1178 AC_SUBST([SQLITE3_LIBS])
1180 if (test "$sqlite3_found" = "no"); then
1181 AC_MSG_ERROR([SQLite3 is required for the Database related features])
1184 # check if libxslt is available
1185 if test "$enable_xslt" = "yes"; then
1186 PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
1187 AC_SUBST([LIBXSLT_CFLAGS])
1188 AC_SUBST([LIBXSLT_LIBS])
1191 # check if geoclue is available
1192 if test "$enable_geolocation" = "yes"; then
1193 PKG_CHECK_MODULES([GEOCLUE], [geoclue])
1194 AC_SUBST([GEOCLUE_CFLAGS])
1195 AC_SUBST([GEOCLUE_LIBS])
1198 # check for XRender under Linux/Unix. Some linkers require explicit
1199 # linkage (like GNU Gold), so we cannot rely on GTK+ pulling XRender
1200 if test "$os_win32" = "no"; then
1201 PKG_CHECK_MODULES([XRENDER], [xrender])
1202 AC_SUBST([XRENDER_CFLAGS])
1203 AC_SUBST([XRENDER_LIBS])
1206 # check if gstreamer is available
1207 if test "$enable_video" = "yes" || test "$enable_web_audio" = "yes"; then
1208 gstreamer_modules="gstreamer-$GST_API_VERSION >= $GSTREAMER_REQUIRED_VERSION
1209 gstreamer-app-$GST_API_VERSION
1210 gstreamer-audio-$GST_API_VERSION
1211 gstreamer-fft-$GST_API_VERSION
1212 gstreamer-base-$GST_API_VERSION
1213 gstreamer-pbutils-$GST_API_VERSION
1214 gstreamer-plugins-base-$GST_API_VERSION >= $GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION
1215 gstreamer-video-$GST_API_VERSION";
1216 if test "$GST_API_VERSION" != "1.0"; then
1217 gstreamer_modules="$gstreamer_modules gstreamer-interfaces-$GST_API_VERSION";
1219 PKG_CHECK_MODULES([GSTREAMER], [$gstreamer_modules], [have_gstreamer=yes])
1220 AC_SUBST([GSTREAMER_CFLAGS])
1221 AC_SUBST([GSTREAMER_LIBS])
1225 if test "$with_accelerated_compositing" = "clutter"; then
1226 PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
1227 PKG_CHECK_MODULES([CLUTTER_GTK],
1228 [clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED_VERSION])
1230 AC_SUBST(CLUTTER_CFLAGS)
1231 AC_SUBST(CLUTTER_LIBS)
1232 AC_SUBST(CLUTTER_GTK_CFLAGS)
1233 AC_SUBST(CLUTTER_GTK_LIBS)
1236 # check if atspi2 is available (only needed for Webkit2 unit tests)
1237 if test "$enable_webkit2" = "yes"; then
1238 PKG_CHECK_MODULES([ATSPI2],
1239 [atspi-2 >= $ATSPI2_REQUIRED_VERSION],
1240 [have_atspi2=yes], [have_atspi2=no])
1242 AC_SUBST([ATSPI2_CFLAGS])
1243 AC_SUBST([ATSPI2_LIBS])
1246 # check for code coverage support
1247 if test "$enable_coverage" = "yes"; then
1248 COVERAGE_CFLAGS="-MD"
1249 COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
1250 AC_SUBST([COVERAGE_CFLAGS])
1251 AC_SUBST([COVERAGE_LDFLAGS])
1254 # check for HTML features
1255 if test "$enable_video" = "yes"; then
1260 # If you change the default here, please also make sure the assumptions made
1261 # in Tools/Scripts/webkitdirs.pm:buildAutotoolsProject still make sense.
1262 AC_MSG_CHECKING([whether to build Webkit2])
1263 AC_ARG_ENABLE(webkit2,
1264 AC_HELP_STRING([--enable-webkit2], [build webkit2 [default=yes]]),
1265 [], [enable_webkit2="yes"])
1266 AC_MSG_RESULT([$enable_webkit2])
1267 if test "$enable_webkit2" = "yes"; then
1268 if test "$GTK_API_VERSION" = "2.0"; then
1269 AC_MSG_ERROR([WebKit2 requires GTK+ 3.x, use --with-gtk=3.0])
1272 # Check Unix printing
1273 PKG_CHECK_MODULES(GTK_UNIX_PRINTING, gtk+-unix-print-3.0,
1274 [have_gtk_unix_printing=yes],
1275 [have_gtk_unix_printing=no])
1276 AC_SUBST(GTK_UNIX_PRINTING_CFLAGS)
1277 AC_SUBST(GTK_UNIX_PRINTING_LIBS)
1278 if test "$have_gtk_unix_printing" = "yes"; then
1279 AC_DEFINE([HAVE_GTK_UNIX_PRINTING], [1], [Define if GTK+ UNIX Printing is available])
1284 AC_MSG_CHECKING([whether to build plugin process for WebKit2])
1285 AC_ARG_ENABLE(plugin_process,
1286 AC_HELP_STRING([--enable-plugin-process], [build plugin process for WebKit2 [default=yes]]),
1287 [], [enable_plugin_process="yes"])
1288 AC_MSG_RESULT([$enable_plugin_process])
1290 # Build the plugin process only when building Webkit2.
1291 if test "$enable_webkit2" = "no"; then
1292 enable_plugin_process=no
1295 # Make sure we have GTK+ 2.x to build the plugin process.
1296 if test "$enable_plugin_process" = "yes"; then
1297 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= $GTK2_REQUIRED_VERSION gail >= $GAIL2_REQUIRED_VERSION)
1299 AC_SUBST(GTK2_CFLAGS)
1302 GTK_DOC_CHECK([1.10])
1305 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
1306 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
1307 AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
1308 AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
1309 AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
1311 # target conditionals
1312 AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
1313 AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
1314 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
1315 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
1317 # Unicode backend conditionals
1318 AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
1319 AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
1321 # Font backend conditionals
1322 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
1323 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
1325 # GStreamer feature conditional
1326 AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"])
1327 AM_CONDITIONAL([USE_WEBAUDIO_GSTREAMER], [test "$enable_web_audio" = "yes"])
1329 # ATSPI2 conditional
1330 AM_CONDITIONAL([HAVE_ATSPI2], [test "$have_atspi2" = "yes"])
1332 # Accelerated compositing conditional
1333 AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$with_accelerated_compositing" = "cairo" || test "$with_accelerated_compositing" = "opengl" || test "$with_accelerated_compositing" = "clutter"])
1334 AM_CONDITIONAL([USE_TEXTURE_MAPPER_CAIRO], [test "$with_accelerated_compositing" = "cairo"])
1335 AM_CONDITIONAL([USE_TEXTURE_MAPPER_GL], [test "$with_accelerated_compositing" = "opengl"])
1336 AM_CONDITIONAL([USE_CLUTTER], [test "$with_accelerated_compositing" = "clutter"])
1338 # These are the same now, but they will soon be separate.
1339 AM_CONDITIONAL([USE_GLX], [test "$with_accelerated_compositing" = "opengl" || test "$enable_webgl" = "yes"])
1340 AM_CONDITIONAL([USE_OPENGL], [test "$with_accelerated_compositing" = "opengl" || test "$enable_webgl" = "yes"])
1342 # IndexedDB implies LevelDB, but other features may one day require LevelDB.
1343 AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
1344 AM_CONDITIONAL([USE_LEVELDB],[test "$enable_indexed_database" = "yes"])
1346 # WebKit feature conditionals
1347 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug_features" = "yes"])
1348 AM_CONDITIONAL([ENABLE_WEBGL],[test "$enable_webgl" = "yes"])
1349 AM_CONDITIONAL([ENABLE_BLOB],[test "$enable_blob" = "yes"])
1350 AM_CONDITIONAL([ENABLE_LEGACY_WEBKIT_BLOB_BUILDER],[test "$enable_legacy_webkit_blob_builder" = "yes"])
1351 AM_CONDITIONAL([ENABLE_METER_TAG],[test "$enable_meter_tag" = "yes"])
1352 AM_CONDITIONAL([ENABLE_MICRODATA],[test "$enable_microdata" = "yes"])
1353 AM_CONDITIONAL([ENABLE_PAGE_VISIBILITY_API],[test "$enable_page_visibility_api" = "yes"])
1354 AM_CONDITIONAL([ENABLE_PROGRESS_TAG],[test "$enable_progress_tag" = "yes"])
1355 AM_CONDITIONAL([ENABLE_CHANNEL_MESSAGING],[test "$enable_channel_messaging" = "yes"])
1356 AM_CONDITIONAL([ENABLE_JAVASCRIPT_DEBUGGER],[test "$enable_javascript_debugger" = "yes"])
1357 AM_CONDITIONAL([ENABLE_GAMEPAD],[test "$enable_gamepad" = "yes"])
1358 AM_CONDITIONAL([ENABLE_DIRECTORY_UPLOAD],[test "$enable_directory_upload" = "yes"])
1359 AM_CONDITIONAL([ENABLE_DATA_TRANSFER_ITEMS],[test "$enable_data_transfer_items" = "yes"])
1360 AM_CONDITIONAL([ENABLE_SQL_DATABASE],[test "$enable_sql_database" = "yes"])
1361 AM_CONDITIONAL([ENABLE_DATALIST],[test "$enable_datalist" = "yes"])
1362 AM_CONDITIONAL([ENABLE_DETAILS],[test "$enable_details" = "yes"])
1363 AM_CONDITIONAL([ENABLE_FAST_MOBILE_SCROLLING],[test "$enable_fast_mobile_scrolling" = "yes"])
1364 AM_CONDITIONAL([ENABLE_FILE_SYSTEM],[test "$enable_file_system" = "yes"])
1365 AM_CONDITIONAL([ENABLE_STYLE_SCOPED],[test "$enable_style_scoped" = "yes"])
1366 AM_CONDITIONAL([ENABLE_QUOTA],[test "$enable_quota" = "yes"])
1367 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
1368 AM_CONDITIONAL([ENABLE_INPUT_TYPE_COLOR],[test "$enable_input_type_color" = "yes"])
1369 AM_CONDITIONAL([ENABLE_INPUT_SPEECH],[test "$enable_input_speech" = "yes"])
1370 AM_CONDITIONAL([ENABLE_SCRIPTED_SPEECH],[test "$enable_scripted_speech" = "yes"])
1371 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
1372 AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
1373 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
1374 AM_CONDITIONAL([ENABLE_MATHML], [test "$enable_mathml" = "yes"])
1375 AM_CONDITIONAL([ENABLE_MHTML], [test "$enable_mhtml" = "yes"])
1376 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
1377 AM_CONDITIONAL([ENABLE_MEDIA_SOURCE],[test "$enable_media_source" = "yes"])
1378 AM_CONDITIONAL([ENABLE_MEDIA_STATISTICS],[test "$enable_media_statistics" = "yes"])
1379 AM_CONDITIONAL([ENABLE_VIDEO_TRACK],[test "$enable_video_track" = "yes"])
1380 AM_CONDITIONAL([ENABLE_FULLSCREEN_API],[test "$enable_fullscreen_api" = "yes"])
1381 AM_CONDITIONAL([ENABLE_MEDIA_STREAM],[test "$enable_media_stream" = "yes"])
1382 AM_CONDITIONAL([ENABLE_LEGACY_NOTIFICATIONS],[test "$enable_legacy_notifications" = "yes"])
1383 AM_CONDITIONAL([ENABLE_NOTIFICATIONS],[test "$enable_notifications" = "yes"])
1384 AM_CONDITIONAL([ENABLE_ORIENTATION_EVENTS],[test "$enable_orientation_events" = "yes"])
1385 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
1386 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
1387 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
1388 AM_CONDITIONAL([ENABLE_CSS3_FLEXBOX],[test "$enable_css3_flexbox" = "yes"])
1389 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
1390 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_workers" = "yes"])
1391 AM_CONDITIONAL([ENABLE_SHADOW_DOM],[test "$enable_shadow_dom" = "yes"])
1392 AM_CONDITIONAL([ENABLE_SHARED_WORKERS],[test "$enable_shared_workers" = "yes"])
1393 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
1394 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
1395 AM_CONDITIONAL([ENABLE_WEB_SOCKETS],[test "$enable_web_sockets" = "yes"])
1396 AM_CONDITIONAL([ENABLE_WEB_AUDIO],[test "$enable_web_audio" = "yes"])
1397 AM_CONDITIONAL([ENABLE_WEB_TIMING],[test "$enable_web_timing" = "yes"])
1398 AM_CONDITIONAL([ENABLE_OPCODE_STATS],[test "$enable_opcode_stats" = "yes"])
1399 AM_CONDITIONAL([ENABLE_WEBKIT2],[test "$enable_webkit2" = "yes"])
1400 AM_CONDITIONAL([ENABLE_PLUGIN_PROCESS],[test "$enable_plugin_process" = "yes"])
1401 AM_CONDITIONAL([ENABLE_SPELLCHECK],[test "$enable_spellcheck" = "yes"])
1402 AM_CONDITIONAL([ENABLE_ANIMATION_API],[test "$enable_animation_api" = "yes"])
1403 AM_CONDITIONAL([ENABLE_REQUEST_ANIMATION_FRAME],[test "$enable_request_animation_frame" = "yes"])
1404 AM_CONDITIONAL([ENABLE_TOUCH_ICON_LOADING],[test "$enable_touch_icon_loading" = "yes"])
1405 AM_CONDITIONAL([ENABLE_REGISTER_PROTOCOL_HANDLER],[test "$enable_register_protocol_handler" = "yes"])
1406 AM_CONDITIONAL([ENABLE_DEVICE_ORIENTATION],[test "$enable_device_orientation" = "yes"])
1407 AM_CONDITIONAL([ENABLE_MUTATION_OBSERVERS],[test "$enable_mutation_observers" = "yes"])
1408 AM_CONDITIONAL([ENABLE_IFRAME_SEAMLESS],[test "$enable_iframe_seamless" = "yes"])
1409 AM_CONDITIONAL([ENABLE_FONT_BOOSTING],[test "$enable_font_boosting" = "yes"])
1410 AM_CONDITIONAL([ENABLE_CSS_EXCLUSIONS],[test "$enable_css_exclusions" = "yes"])
1411 AM_CONDITIONAL([ENABLE_CSS_REGIONS],[test "$enable_css_regions" = "yes"])
1414 AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
1422 Source/WebKit/gtk/webkit/webkitversion.h
1426 Source/WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/webkit.pc.in
1427 Source/WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:Source/WebKit/gtk/JSCore.gir.in
1428 Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/JavaScriptCore/javascriptcoregtk.pc.in
1430 ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1434 if test "$enable_webkit2" = "yes"; then
1436 Source/WebKit2/webkit2gtk-${WEBKITGTK_API_VERSION}.pc:Source/WebKit2/webkit2gtk.pc.in
1438 ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1445 WebKit was configured with the following options:
1447 Build configuration:
1448 Enable debugging (slow) : $enable_debug
1449 Compile with debug symbols (slow) : $enable_debug_symbols
1450 Enable debug features (slow) : $enable_debug_features
1451 Enable GCC build optimization : $enable_optimizations
1452 Code coverage support : $enable_coverage
1453 Unicode backend : $with_unicode_backend
1454 Font backend : $with_font_backend
1455 Optimized memory allocator : $enable_fast_malloc
1456 Accelerated Compositing : $with_accelerated_compositing
1459 WebGL : $enable_webgl
1460 Blob support : $enable_blob
1461 CSS3 Flexbox support : $enable_css3_flexbox
1462 Legacy WebKitBlobBuilder support : $enable_legacy_webkit_blob_builder
1463 CSS Exclusions support : $enable_css_exclusions
1464 CSS Regions support : $enable_css_regions
1465 DOM mutation observer support : $enable_mutation_observers
1466 DeviceOrientation support : $enable_device_orientation
1467 Directory upload : $enable_directory_upload
1468 Fast Mobile Scrolling : $enable_fast_mobile_scrolling
1469 Font Boosting support : $enable_font_boosting
1470 JIT compilation : $enable_jit
1471 Filters support : $enable_filters
1472 Geolocation support : $enable_geolocation
1473 JavaScript debugger/profiler support : $enable_javascript_debugger
1474 Gamepad support : $enable_gamepad
1475 MathML support : $enable_mathml
1476 Media source : $enable_media_source
1477 Media statistics : $enable_media_statistics
1478 MHTML support : $enable_mhtml
1479 HTML5 channel messaging support : $enable_channel_messaging
1480 HTML5 meter element support : $enable_meter_tag
1481 HTML5 microdata support : $enable_microdata
1482 Page Visibility API support : $enable_page_visibility_api
1483 HTML5 progress element support : $enable_progress_tag
1484 SQL client-side database storage support : $enable_sql_database
1485 HTML5 data transfer items support : $enable_data_transfer_items
1486 HTML5 FileSystem API support : $enable_file_system
1487 Quota API support : $enable_quota
1488 HTML5 iframe seamless attribute support : $enable_iframe_seamless
1489 HTML5 video element support : $enable_video
1490 HTML5 track element support : $enable_video_track
1491 Fullscreen API support : $enable_fullscreen_api
1492 Media stream support : $enable_media_stream
1493 Icon database support : $enable_icon_database
1494 Link prefetch support : $enable_link_prefetch
1495 Opcode stats : $enable_opcode_stats
1496 Shadow DOM support : $enable_shadow_dom
1497 SharedWorkers support : $enable_shared_workers
1498 Color input support : $enable_input_type_color
1499 Speech input support : $enable_input_speech
1500 Scripted speech support : $enable_scripted_speech
1501 SVG support : $enable_svg
1502 SVG fonts support : $enable_svg_fonts
1503 Web Audio support : $enable_web_audio
1504 Web Sockets support : $enable_web_sockets
1505 Web Timing support : $enable_web_timing
1506 Web Workers support : $enable_workers
1507 XSLT support : $enable_xslt
1508 Spellcheck support : $enable_spellcheck
1509 Animation API : $enable_animation_api
1510 RequestAnimationFrame support : $enable_request_animation_frame
1511 Touch Icon Loading support : $enable_touch_icon_loading
1512 Register Protocol Handler support : $enable_register_protocol_handler
1513 WebKit2 support : $enable_webkit2
1514 WebKit2 plugin process : $enable_plugin_process
1517 GTK+ version : $with_gtk
1518 GDK target : $with_target
1519 GStreamer version : $with_gstreamer
1520 Introspection support : $enable_introspection
1521 Generate documentation : $enable_gtk_doc
1523 if test "$with_unicode_backend" = "glib"; then
1524 echo " >> WARNING: the glib-based unicode backend is slow and incomplete <<"