Add feature defines for web-facing parts of CSS Regions and Exclusions
[WebKit-https.git] / configure.ac
1 AC_PREREQ(2.59)
2
3 m4_define([webkit_major_version], [1])
4 m4_define([webkit_minor_version], [9])
5 m4_define([webkit_micro_version], [2])
6
7 # This is the version we'll be using as part of our User-Agent string
8 # e.g., AppleWebKit/$(webkit_user_agent_version) ...
9 #
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])
13
14 AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
15
16 AC_CONFIG_MACRO_DIR([Source/autotools])
17 AC_CONFIG_AUX_DIR([Source/autotools])
18 AC_SUBST(ACLOCAL_AMFLAGS, "-I Source/autotools")
19
20 AC_CONFIG_HEADERS([autotoolsconfig.h])
21 AC_CANONICAL_HOST
22
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)
33
34 AC_CONFIG_SRCDIR([Source/WebCore/config.h])
35
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])
40
41 LIBJAVASCRIPTCOREGTK_VERSION=13:1:13
42 AC_SUBST([LIBJAVASCRIPTCOREGTK_VERSION])
43
44 LIBWEBKIT2GTK_VERSION=13:1:13
45 AC_SUBST([LIBWEBKIT2GTK_VERSION])
46
47 AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip tar-ustar])
48
49 # Use AM_SILENT_RULES if present
50 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
51
52 # host checking - inspired by the GTK+ configure.in
53 # TODO: move these to webkit.m4?
54 AC_MSG_CHECKING([for native Win32])
55 case "$host" in
56      *-*-mingw*)
57        os_win32=yes
58        ;;
59      *)
60        os_win32=no
61        ;;
62 esac
63 AC_MSG_RESULT([$os_win32])
64
65 case "$host" in
66      *-*-linux*)
67        os_linux=yes
68        ;;
69      *-*-freebsd*)
70        os_freebsd=yes
71        ;;
72      *-*-darwin*)
73        os_darwin=yes
74        ;;
75 esac
76
77 case "$host_os" in
78      gnu* | linux* | k*bsd*-gnu)
79        os_gnu=yes
80        ;;
81      *)
82        os_gnu=no
83        ;;
84 esac
85
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
90    CXXFLAGS=""
91 fi
92 if test -z "$CFLAGS"; then
93    CFLAGS=""
94 fi
95
96 PKG_PROG_PKG_CONFIG
97
98 AC_PATH_PROG(PERL, perl)
99 if test -z "$PERL"; then
100    AC_MSG_ERROR([You need 'perl' to compile WebKit])
101 fi
102
103 AC_PATH_PROG(PYTHON, python)
104 if test -z "$PYTHON"; then
105    AC_MSG_ERROR([You need 'python' to compile WebKit])
106 fi
107
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])
111 fi
112
113 AC_PATH_PROG(MV, mv)
114 if test -z "$MV"; then
115    AC_MSG_ERROR([You need 'mv' to compile WebKit])
116 fi
117
118 AC_PROG_CC
119 AC_PROG_CXX
120 AM_PROG_CC_C_O
121 AC_PROG_INSTALL
122 AC_SYS_LARGEFILE
123
124 # Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
125 # doesn't exist)
126 AC_LANG_PUSH([C++])
127 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
128 AC_LANG_POP([C++])
129
130 # C/C++ Language Features
131 AC_C_CONST
132 AC_C_INLINE
133 AC_C_VOLATILE
134
135 # C/C++ Headers
136 AC_HEADER_STDC
137 AC_HEADER_STDBOOL
138
139 # Linker
140 AC_DISABLE_STATIC
141 AC_LIBTOOL_WIN32_DLL
142 AC_PROG_LIBTOOL
143 # use dolt to speedup the build
144 DOLT
145
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])
149 else
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]))
153 fi
154
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])
158 fi
159
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" ],
167         AC_MSG_RESULT([no]))
168 CFLAGS="$saved_CFLAGS"
169 AC_SUBST(SYMBOL_VISIBILITY)
170 AC_SUBST(SYMBOL_VISIBILITY_INLINES)
171
172 # Disable C++0x compat warnings for GCC >= 4.6.0 until we build
173 # cleanly with that.
174 AC_LANG_PUSH(C++)
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])
178 AC_TRY_COMPILE([
179 namespace std {
180     class nullptr_t { };
181 }
182 extern std::nullptr_t nullptr;
183 ], [return 0;],
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"
189 else
190   CXXFLAGS="$TMPCXXFLAGS"
191 fi
192 AC_LANG_POP(C++)
193
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]))
202 fi
203
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])
210    AC_TRY_CPP(
211 [#include <stdio.h>
212 #undef PACKAGE
213 #undef VERSION
214 #undef HAVE_STDLIB_H
215 #include <jpeglib.h>],
216          jpeg_ok=yes,
217          jpeg_ok=no)
218    AC_MSG_RESULT($jpeg_ok)
219    if test "$jpeg_ok" = yes; then
220       JPEG_LIBS="-ljpeg"
221       # should we check for progressive JPEG like GTK+ as well?
222    else
223       AC_MSG_ERROR([JPEG library (libjpeg) not found])
224    fi
225 fi
226 AC_SUBST([JPEG_LIBS])
227
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
232     AC_MSG_RESULT(yes)
233     PNG_LIBS=`$PKG_CONFIG --libs $l`
234     png_ok=yes
235     break
236   else
237     AC_MSG_RESULT(no)
238     png_ok=no
239   fi
240 done
241 if test "$png_ok" != yes; then
242   AC_CHECK_LIB(png, png_read_info,
243     [AC_CHECK_HEADER(png.h,
244       png_ok=yes,
245       png_ok=no)],
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;],
251       png_ok=yes,
252       png_ok=no)
253     AC_MSG_RESULT($png_ok)
254     if test "$png_ok" = yes; then
255       PNG_LIBS='-lpng -lz'
256     else
257       AC_MSG_ERROR([PNG library (libpng) not found])
258     fi
259   else
260     AC_MSG_ERROR([PNG library (libpng) not found])
261   fi
262 fi
263 AC_SUBST([PNG_LIBS])
264
265
266 if test "$os_win32" = "yes"; then
267   WINMM_LIBS=-lwinmm
268   SHLWAPI_LIBS=-lshlwapi
269   OLE32_LIBS=-lole32
270 fi
271 AC_SUBST([WINMM_LIBS])
272 AC_SUBST([SHLWAPI_LIBS])
273 AC_SUBST([OLE32_LIBS])
274
275
276 # determine the GTK+ version to use
277 AC_MSG_CHECKING([the GTK+ version to use])
278 AC_ARG_WITH([gtk],
279         [AS_HELP_STRING([--with-gtk=2.0|3.0], [the GTK+ version to use (default: 3.0)])],
280         [case "$with_gtk" in
281         2.0|3.0) ;;
282         *) AC_MSG_ERROR([invalid GTK+ version specified]) ;;
283         esac],
284         [with_gtk=3.0])
285 AC_MSG_RESULT([$with_gtk])
286
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
291
292 case "$with_gtk" in
293      2.0) GTK_REQUIRED_VERSION=$GTK2_REQUIRED_VERSION
294           GTK_API_VERSION=2.0
295           WEBKITGTK_API_MAJOR_VERSION=1
296           WEBKITGTK_API_MINOR_VERSION=0
297           WEBKITGTK_API_VERSION=1.0
298           WEBKITGTK_PC_NAME=webkit
299           GAIL_PC_NAME=gail
300           GAIL_REQUIRED_VERSION=$GAIL2_REQUIRED_VERSION
301           ;;
302      3.0) GTK_REQUIRED_VERSION=$GTK3_REQUIRED_VERSION
303           GTK_API_VERSION=3.0
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
310           ;;
311 esac
312
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"])
319
320 # determine the GDK/GTK+ target
321 AC_MSG_CHECKING([the target windowing system])
322 AC_ARG_WITH(target,
323             AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
324                            [Select webkit target [default=x11]]),
325             [],[with_target="x11"])
326
327 case "$with_target" in
328      x11|win32|quartz|directfb) ;;
329      *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
330 esac
331
332 AC_MSG_RESULT([$with_target])
333
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
338         0.10|1.0) ;;
339         *) AC_MSG_ERROR([invalid GStreamer version specified]) ;;
340         esac],
341         [with_gstreamer=0.10])
342 AC_MSG_RESULT([$with_gstreamer])
343
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
348
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
352            GST_API_VERSION=0.10
353            ;;
354      1.0) GSTREAMER_REQUIRED_VERSION=$GSTREAMER_1_0_REQUIRED_VERSION
355            GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=$GSTREAMER_1_0_PLUGINS_BASE_REQUIRED_VERSION
356            GST_API_VERSION=1.0
357            ;;
358 esac
359
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])
364 fi
365
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
374
375 # optional modules
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
382
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])
387 fi
388 GLIB_GSETTINGS
389
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"])
396
397 case "$with_unicode_backend" in
398      icu|glib) ;;
399      *) AC_MSG_ERROR([Invalid Unicode backend: must be icu or glib.]) ;;
400 esac
401
402 AC_MSG_RESULT([$with_unicode_backend])
403
404 if test "$with_unicode_backend" = "icu"; then
405     # TODO: use pkg-config (after CFLAGS in their .pc files are cleaned up)
406     case "$host" in
407         *-*-darwin*)
408             UNICODE_CFLAGS="-I$srcdir/Source/JavaScriptCore/icu -I$srcdir/Source/WebCore/icu"
409             UNICODE_LIBS="-licucore"
410             ;;
411         *-*-mingw*)
412             UNICODE_CFLAGS=""
413             UNICODE_LIBS="-licui18n -licuuc"
414             ;;
415         *)
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.])
419             fi
420
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`
426             ;;
427     esac
428 fi
429
430 if test "$with_unicode_backend" = "glib"; then
431     PKG_CHECK_MODULES([UNICODE], [glib-2.0 pango >= $PANGO_REQUIRED_VERSION])
432 fi
433
434 AC_SUBST([UNICODE_CFLAGS])
435 AC_SUBST([UNICODE_LIBS])
436
437 PKG_CHECK_MODULES([ZLIB], [zlib])
438 AC_SUBST([ZLIB_CFLAGS])
439 AC_SUBST([ZLIB_LIBS])
440
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])
445
446 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
447 AC_SUBST(LIBXML_CFLAGS)
448 AC_SUBST(LIBXML_LIBS)
449
450 PKG_CHECK_MODULES(PANGO, 
451                   [pango >= $PANGO_REQUIRED_VERSION
452                    pangoft2])
453 AC_SUBST(PANGO_CFLAGS)
454 AC_SUBST(PANGO_LIBS)
455
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])
461
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)
466 fi
467
468 PKG_CHECK_MODULES(GAIL, $GAIL_PC_NAME >= $GAIL_REQUIRED_VERSION)
469 AC_SUBST(GAIL_CFLAGS)
470 AC_SUBST(GAIL_LIBS)
471
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])
477 else
478    PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
479    PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
480
481    if test "$with_target" = "x11" && test "$os_win32" = "no"; then
482       # check for XT
483       PKG_CHECK_MODULES([XT],
484                         [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
492          # existence of libXt
493          AC_CHECK_LIB([Xt], [XtOpenDisplay],
494                       [XT_CFLAGS=""; XT_LIBS="-lXt"],
495                       [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
496       fi
497       AC_SUBST([XT_CFLAGS])
498       AC_SUBST([XT_LIBS])
499       AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
500    fi
501 fi
502 AC_SUBST(GTK_CFLAGS)
503 AC_SUBST(GTK_LIBS)
504 AC_SUBST(CAIRO_CFLAGS)
505 AC_SUBST(CAIRO_LIBS)
506
507 # check whether to build with debugging enabled
508 AC_MSG_CHECKING([whether to do a debug build])
509 AC_ARG_ENABLE(debug,
510               AC_HELP_STRING([--enable-debug],
511                              [turn on debugging [default=no]]),
512               [],[enable_debug="no"])
513 AC_MSG_RESULT([$enable_debug])
514
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)
520                              [default=yes]]),
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])
524
525 # check whether to enable WebGL support
526 AC_MSG_CHECKING([whether to enable WebGL support])
527 AC_ARG_ENABLE(webgl,
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])
531
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])
539
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.])
543     fi
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"
547 fi
548 AC_SUBST([OPENGL_LIBS])
549
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])
553
554    AC_SUBST(CLUTTER_CFLAGS)
555    AC_SUBST(CLUTTER_LIBS)
556    AC_SUBST(CLUTTER_GTK_CFLAGS)
557    AC_SUBST(CLUTTER_GTK_LIBS)
558 fi
559
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])
567
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])
575
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])
583
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])
591
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])
599
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])
607
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])
615
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])
623
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])
631
632 # check whether to build with datagrid support
633 AC_MSG_CHECKING([whether to enable HTML5 datagrid support])
634 AC_ARG_ENABLE(datagrid,
635               AC_HELP_STRING([--enable-datagrid],
636                              [enable HTML5 datagrid support [default=no]]),
637               [],[enable_datagrid="no"])
638 AC_MSG_RESULT([$enable_datagrid])
639
640 # check whether to build with data transfer items support
641 AC_MSG_CHECKING([whether to enable HTML5 data transfer items support])
642 AC_ARG_ENABLE(data_transfer_items,
643               AC_HELP_STRING([--enable-data-transfer-items],
644                              [enable HTML5 data transfer items support [default=no]]),
645               [],[enable_data_transfer_items="no"])
646 AC_MSG_RESULT([$enable_data_transfer_items])
647
648 # check whether to enable DOM mutation observer support
649 AC_MSG_CHECKING([whether to enable DOM mutation observer support])
650 AC_ARG_ENABLE(mutation_observers,
651               AC_HELP_STRING([--enable-mutation-observers],
652                              [enable DOM mutation observer support [default=no]]),
653               [],[enable_mutation_observers="no"])
654 AC_MSG_RESULT([$enable_mutation_observers])
655
656 # check whether to enable HTML5 client-side session and persitent storage support
657 AC_MSG_CHECKING([whether to enable HTML5 client-side session and persistent storage support])
658 AC_ARG_ENABLE(dom_storage,
659               AC_HELP_STRING([--enable-dom-storage],
660                              [enable HTML5 client-side session and persistent storage support [default=yes]]),
661               [],[enable_dom_storage="yes"])
662 AC_MSG_RESULT([$enable_dom_storage])
663
664 # check whether to enable the indexed database API
665 AC_MSG_CHECKING([whether to enable the indexed database API])
666 AC_ARG_ENABLE(indexed_database,
667               AC_HELP_STRING([--enable-indexed-database],
668                              [enable the indexed database API (incomplete) [default=no]]),
669               [],[enable_indexed_database="no"])
670 AC_MSG_RESULT([$enable_indexed_database])
671
672 # check whether to enable the color input
673 AC_MSG_CHECKING([whether to enable the color input])
674 AC_ARG_ENABLE(input_type_color,
675               AC_HELP_STRING([--enable-input-type-color],
676                              [enable the color input [default=no]]),
677               [],[enable_input_type_color="no"])
678 AC_MSG_RESULT([$enable_input_type_color])
679
680 # check whether to enable the speech input API
681 AC_MSG_CHECKING([whether to enable the speech input API])
682 AC_ARG_ENABLE(input_speech,
683               AC_HELP_STRING([--enable-input-speech],
684                              [enable the speech input API [default=no]]),
685               [],[enable_input_speech="no"])
686 AC_MSG_RESULT([$enable_input_speech])
687
688 # check whether to enable the scripted speech API
689 AC_MSG_CHECKING([whether to enable the scripted speech API])
690 AC_ARG_ENABLE(scripted_speech,
691               AC_HELP_STRING([--enable-scripted-speech],
692                              [enable the scripted speech API [default=no]]),
693               [],[enable_scripted_speech="no"])
694 AC_MSG_RESULT([$enable_scripted_speech])
695
696 # check whether to build with SQL database support
697 AC_MSG_CHECKING([whether to enable SQL client-side database storage support])
698 AC_ARG_ENABLE(sql_database,
699               AC_HELP_STRING([--enable-sql-database],
700                              [enable SQL client-side database storage support [default=yes]]),
701               [],[enable_sql_database="yes"])
702 AC_MSG_RESULT([$enable_sql_database])
703
704 # check whether to build with icon database support
705 AC_MSG_CHECKING([whether to enable icon database support])
706 AC_ARG_ENABLE(icon_database,
707               AC_HELP_STRING([--enable-icon-database],
708                              [enable icon database [default=yes]]),
709               [],[enable_icon_database="yes"])
710 AC_MSG_RESULT([$enable_icon_database])
711
712 # check whether to build with image resizer API support
713 AC_MSG_CHECKING([whether to enable image resizer API support])
714 AC_ARG_ENABLE(image_resizer,
715               AC_HELP_STRING([--enable-image-resizer],
716                              [enable image resizer [default=no]]),
717               [],[enable_image_resizer="no"])
718 AC_MSG_RESULT([$enable_image_resizer])
719
720 # check whether to enable HTML5 datalist support
721 AC_MSG_CHECKING([whether to enable HTML5 datalist support])
722 AC_ARG_ENABLE(datalist,
723               AC_HELP_STRING([--enable-datalist],
724                              [enable HTML5 datalist support [default=yes]]),
725               [],[enable_datalist="yes"])
726 AC_MSG_RESULT([$enable_datalist])
727
728 # check whether to enable HTML5 sandbox iframe support
729 AC_MSG_CHECKING([whether to enable HTML5 sandboxed iframe support])
730 AC_ARG_ENABLE(sandbox,
731               AC_HELP_STRING([--enable-sandbox],
732                              [enable HTML5 sandboxed iframe support [default=yes]]),
733               [],[enable_sandbox="yes"])
734 AC_MSG_RESULT([$enable_sandbox])
735
736 # check whether to enable HTML5 iframe seamless attribute support
737 AC_MSG_CHECKING([whether to enable HTML5 iframe seamless attribute support])
738 AC_ARG_ENABLE(iframe-seamless,
739               AC_HELP_STRING([--enable-iframe-seamless],
740                              [enable HTML5 iframe seamless attribute support [default=yes]]),
741               [],[enable_iframe_seamless="yes"])
742 AC_MSG_RESULT([$enable_sandbox])
743
744 # check whether to enable HTML5 audio/video support
745 AC_MSG_CHECKING([whether to enable HTML5 video support])
746 AC_ARG_ENABLE(video,
747               AC_HELP_STRING([--enable-video],
748                              [enable HTML5 video support [default=yes]]),
749               [],[enable_video="yes"])
750 AC_MSG_RESULT([$enable_video])
751
752 # turn off video features if --disable-video is requested
753 if test "$enable_video" = "no"; then
754    enable_video_track=no
755 fi
756
757 # check whether to enable HTML5 video track support
758 AC_MSG_CHECKING([whether to enable HTML5 video track support])
759 AC_ARG_ENABLE(video_track,
760               AC_HELP_STRING([--enable-video-track],
761                              [enable HTML5 video track support [default=no]]),
762               [],[enable_video_track="no"])
763 AC_MSG_RESULT([$enable_video_track])
764
765 # check whether to enable media source support
766 AC_MSG_CHECKING([whether to enable media source support])
767 AC_ARG_ENABLE(media_source,
768               AC_HELP_STRING([--enable-media-source],
769                              [enable support for media source [default=no]]),
770               [], [enable_media_source="no"])
771 AC_MSG_RESULT([$enable_media_source])
772
773 # check whether to enable media statistics support
774 AC_MSG_CHECKING([whether to enable media statistics support])
775 AC_ARG_ENABLE(media_statistics,
776               AC_HELP_STRING([--enable-media-statistics],
777                              [enable support for media statistics [default=no]]),
778               [], [enable_media_statistics="no"])
779 AC_MSG_RESULT([$enable_media_statistics])
780
781 # check whether to enable Javascript Fullscreen API support
782 AC_MSG_CHECKING([whether to enable Fullscreen API support])
783 AC_ARG_ENABLE(fullscreen_api,
784               AC_HELP_STRING([--enable-fullscreen-api],
785                              [enable the Fullscreen API support [default=yes]]),
786               [],[enable_fullscreen_api="yes"])
787 AC_MSG_RESULT([$enable_fullscreen_api])
788
789 # check whether to enable media stream support
790 AC_MSG_CHECKING([whether to enable media stream support])
791 AC_ARG_ENABLE(media_stream,
792               AC_HELP_STRING([--enable-media-stream],
793                              [enable media stream support (incomplete) [default=no]]),
794               [],[enable_media_stream="no"])
795 AC_MSG_RESULT([$enable_media_stream])
796
797 # check whether to enable XSLT support
798 AC_MSG_CHECKING([whether to enable XSLT support])
799 AC_ARG_ENABLE(xslt,
800               AC_HELP_STRING([--enable-xslt],
801                              [enable support for XSLT [default=yes]]),
802               [],[enable_xslt="yes"])
803 AC_MSG_RESULT([$enable_xslt])
804
805 # check whether to enable geolocation support
806 AC_MSG_CHECKING([whether to enable geolocation support])
807 AC_ARG_ENABLE(geolocation,
808               AC_HELP_STRING([--enable-geolocation],
809                              [enable support for geolocation [default=yes]]),
810               [],[enable_geolocation="yes"])
811 AC_MSG_RESULT([$enable_geolocation])
812
813 # check whether to enable MathML support
814 AC_MSG_CHECKING([whether to enable MathML support])
815 AC_ARG_ENABLE(mathml,
816               AC_HELP_STRING([--enable-mathml],
817                              [enable support for MathML [default=yes]]),
818               [],[enable_mathml="yes"])
819 AC_MSG_RESULT([$enable_mathml])
820
821 # check whether to enable MHTML support
822 AC_MSG_CHECKING([whether to enable MHTML support])
823 AC_ARG_ENABLE(mhtml,
824               AC_HELP_STRING([--enable-mhtml],
825                              [enable support for MHTML [default=no]]),
826               [],[enable_mhtml="no"])
827 AC_MSG_RESULT([$enable_mhtml])
828
829 # check whether to enable SVG support
830 AC_MSG_CHECKING([whether to enable SVG support])
831 AC_ARG_ENABLE(svg,
832               AC_HELP_STRING([--enable-svg],
833                              [enable support for SVG [default=yes]]),
834               [],[enable_svg="yes"])
835 AC_MSG_RESULT([$enable_svg])
836
837 # check whether to enable Shadow DOM support
838 AC_MSG_CHECKING([whether to enable Shadow DOM support])
839 AC_ARG_ENABLE(shadow_dom,
840               AC_HELP_STRING([--enable-shadow-dom],
841                              [enable support for Shadow DOM [default=yes]]),
842               [],[enable_shadow_dom="yes"])
843 AC_MSG_RESULT([$enable_shadow_dom])
844
845 # check whether to enable SharedWorkers support
846 AC_MSG_CHECKING([whether to enable SharedWorkers support])
847 AC_ARG_ENABLE(shared_workers,
848               AC_HELP_STRING([--enable-shared-workers],
849                              [enable support for SharedWorkers [default=yes]]),
850               [],[enable_shared_workers="yes"])
851 AC_MSG_RESULT([$enable_shared_workers])
852
853 # check whether to enable Web Workers support
854 AC_MSG_CHECKING([whether to enable Web Workers support])
855 AC_ARG_ENABLE(workers,
856               AC_HELP_STRING([--enable-workers],
857                              [enable support for Web Workers [default=yes]]),
858               [],[enable_workers="yes"])
859 AC_MSG_RESULT([$enable_workers])
860
861 # check whether to enable directory upload support
862 AC_MSG_CHECKING([whether to enable directory upload support])
863 AC_ARG_ENABLE(directory_upload,
864               AC_HELP_STRING([--enable-directory-upload],
865                              [enable support for directory upload [default=no]]),
866               [], [enable_directory_upload="no"])
867 AC_MSG_RESULT([$enable_directory_upload])
868
869 # check whether to enable HTML5 FileSystem API support
870 AC_MSG_CHECKING([whether to enable HTML5 FileSystem API support])
871 AC_ARG_ENABLE(file_system,
872               AC_HELP_STRING([--enable-file-system],
873                              [enable support for HTML5 FileSystem API [default=no]]),
874               [], [enable_file_system="no"])
875 AC_MSG_RESULT([$enable_file_system])
876
877 # check whether to enable HTML5 <style scoped> support
878 AC_MSG_CHECKING([whether to enable HTML5 <style scoped> support])
879 AC_ARG_ENABLE(style_scoped,
880               AC_HELP_STRING([--enable-style-scoped],
881                              [enable support for HTML5 <style scoped> [default=no]]),
882               [], [enable_style_scoped="no"])
883 AC_MSG_RESULT([$enable_style_scoped])
884
885 # check whether to enable Quota API support
886 AC_MSG_CHECKING([whether to enable Quota API support])
887 AC_ARG_ENABLE(quota,
888               AC_HELP_STRING([--enable-quota],
889                              [enable support for Quota API [default=no]]),
890               [], [enable_quota="no"])
891 AC_MSG_RESULT([$enable_quota])
892
893 # turn off svg features if --disable-svg is requested
894 if test "$enable_svg" = "no"; then
895    enable_svg_fonts=no
896 fi
897
898 # check whether to enable support for filters
899 AC_MSG_CHECKING([whether to enable support for filters])
900 AC_ARG_ENABLE(filters,
901               AC_HELP_STRING([--enable-filters],
902                              [enable support for filters (experimental) [default=yes]]),
903               [],[enable_filters="yes"])
904 AC_MSG_RESULT([$enable_filters])
905
906 # check whether to enable support for SVG fonts
907 AC_MSG_CHECKING([whether to enable support for SVG fonts])
908 AC_ARG_ENABLE(svg_fonts,
909               AC_HELP_STRING([--enable-svg-fonts],
910                              [enable support for SVG fonts (experimental) [default=yes]]),
911               [],[enable_svg_fonts="yes"])
912 AC_MSG_RESULT([$enable_svg_fonts])
913
914 # check for SVG features, enabling SVG if necessary
915 if test "$enable_svg_fonts" = "yes"; then
916    svg_flags=yes
917    if test "$enable_svg" = "no"; then
918        AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
919        enable_svg=yes
920    fi
921 fi
922
923 # check whether to enable Web Socket support
924 AC_MSG_CHECKING([whether to enable Web Sockets support])
925 AC_ARG_ENABLE(web_sockets,
926               AC_HELP_STRING([--enable-web-sockets],
927                              [enable support for Web Sockets [default=yes]]),
928               [],[enable_web_sockets="yes"])
929 AC_MSG_RESULT([$enable_web_sockets])
930
931 # check whether to enable Web Audio support
932 AC_MSG_CHECKING([whether to enable Web Audio support])
933 AC_ARG_ENABLE(web_audio,
934               AC_HELP_STRING([--enable-web-audio],
935                              [enable support for Web Audio [default=no]]),
936               [],[enable_web_audio="no"])
937 AC_MSG_RESULT([$enable_web_audio])
938
939 # check whether to enable Web Timing support
940 AC_MSG_CHECKING([whether to enable Web Timing support])
941 AC_ARG_ENABLE(web_timing,
942               AC_HELP_STRING([--enable-web-timing],
943                              [enable support for Web Timing [default=no]]),
944               [],[enable_web_timing="no"])
945 AC_MSG_RESULT([$enable_web_timing])
946
947 # check whether to enable Blob support
948 AC_MSG_CHECKING([whether to enable Blob support])
949 AC_ARG_ENABLE(blob,
950               AC_HELP_STRING([--enable-blob],
951                              [enable support for Blob [default=yes]]),
952               [],[enable_blob="yes"])
953 AC_MSG_RESULT([$enable_blob])
954
955 # check whether to enable Legacy WebKitBlobBuilder support
956 AC_MSG_CHECKING([whether to enable Legacy WebKitBlobBuilder support])
957 AC_ARG_ENABLE(legacy_webkit_blob_builder,
958               AC_HELP_STRING([--enable-legacy-webkit-blob-builder],
959                              [enable support for Legacy WebKitBlobBuilder [default=yes]]),
960               [],[enable_legacy_webkit_blob_builder="yes"])
961 AC_MSG_RESULT([$legacy_webkit_blob_builder])
962
963 # check whether to enable Fast Mobile Scrolling support
964 AC_MSG_CHECKING([whether to enable Fast Mobile Scrolling])
965 AC_ARG_ENABLE(fast_mobile_scrolling,
966               AC_HELP_STRING([--enable-fast-mobile-scrolling],
967                              [enable support for Fast Mobile Scrolling [default=no]]),
968               [],[enable_fast_mobile_scrolling="no"])
969 AC_MSG_RESULT([$enable_fast_mobile_scrolling])
970
971 # check whether to enable code coverage
972 AC_MSG_CHECKING([whether to enable code coverage support])
973 AC_ARG_ENABLE(coverage,
974               AC_HELP_STRING([--enable-coverage],
975                              [enable code coverage support [default=no]]),
976               [],[enable_coverage="no"])
977 AC_MSG_RESULT([$enable_coverage])
978
979 # check whether to enable CSS flaxbox support
980 AC_MSG_CHECKING([whether to enable CSS3 flexbox support])
981 AC_ARG_ENABLE(css3_flexbox,
982               AC_HELP_STRING([--enable-css3-flexbox],
983                              [enable CSS3 flexbox support [default=no]]),
984               [],[enable_css3_flexbox="no"])
985 AC_MSG_RESULT([$enable_css3_flexbox])
986
987 # check whether to enable FastMalloc
988 AC_MSG_CHECKING([whether to enable optimized memory allocator])
989 AC_ARG_ENABLE(fast_malloc,
990               AC_HELP_STRING([--enable-fast-malloc],
991                              [enable optimized memory allocator default=yes, default=no for debug builds]),
992               [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
993 AC_MSG_RESULT([$enable_fast_malloc])
994
995 # check whether to enable debug symbols
996 AC_MSG_CHECKING([whether to enable debug symbols])
997 AC_ARG_ENABLE(debug_symbols,
998               AC_HELP_STRING([--enable-debug-symbols],
999                              [enable debug symbols default=no, default=yes for debug builds]),
1000               [],[if test "$enable_debug" = "yes"; then enable_debug_symbols="yes"; else enable_debug_symbols="no"; fi])
1001 AC_MSG_RESULT([$enable_debug_symbols])
1002
1003 # check whether to enable debug features
1004 AC_MSG_CHECKING([whether to enable debug features])
1005 AC_ARG_ENABLE(debug_features,
1006               AC_HELP_STRING([--enable-debug-features],
1007                              [enable debug features default=no, default=yes for debug builds]),
1008               [],[if test "$enable_debug" = "yes"; then enable_debug_features="yes"; else enable_debug_features="no"; fi])
1009 AC_MSG_RESULT([$enable_debug_features])
1010
1011 AC_MSG_CHECKING([whether to enable JIT compilation])
1012 AC_ARG_ENABLE(jit,
1013               AS_HELP_STRING([--enable-jit],
1014                              [Enable JIT compilation (default: autodetect)]))
1015 case "$enable_jit" in
1016   yes) JSC_CPPFLAGS="-DENABLE_JIT=1" ;;
1017   no) JSC_CPPFLAGS="-DENABLE_JIT=0" ;;
1018   *) enable_jit="autodetect" ;;
1019 esac
1020 AC_SUBST(JSC_CPPFLAGS)
1021 AC_MSG_RESULT([$enable_jit])
1022
1023 # Opcode stats
1024 AC_MSG_CHECKING([whether to enable opcode stats])
1025 AC_ARG_ENABLE([opcode-stats],
1026   [AS_HELP_STRING([--enable-opcode-stats], [Enable Opcode statistics (default: disabled)])],
1027   [], [enable_opcode_stats=no])
1028 AC_MSG_RESULT([$enable_opcode_stats])
1029
1030 if test "$enable_opcode_stats" = "yes"; then
1031   if test "$enable_jit" = "yes"; then
1032     AC_MSG_ERROR([JIT must be disabled for Opcode stats to work.])
1033   fi
1034   AC_DEFINE([ENABLE_OPCODE_STATS], [1], [Define to enable Opcode statistics])
1035 fi
1036
1037 # Link prefetch
1038 AC_MSG_CHECKING([whether to enable link prefetch support])
1039 AC_ARG_ENABLE([link-prefetch],
1040   [AS_HELP_STRING([--enable-link-prefetch], [Enable Link prefetch support (default: disabled)])],
1041   [],[enable_link_prefetch=no])
1042 AC_MSG_RESULT([$enable_link_prefetch])
1043
1044 if test "$enable_link_prefetch" = "yes"; then 
1045   AC_DEFINE([ENABLE_LINK_PREFETCH], [1], [Define to enable link prefetch support])
1046 fi
1047
1048 # GObject Introspection
1049 AC_MSG_CHECKING([whether to enable GObject introspection support])
1050 AC_ARG_ENABLE([introspection],
1051   [AS_HELP_STRING([--enable-introspection],[Enable GObject introspection (default: disabled)])],
1052   [],[enable_introspection=no])
1053 AC_MSG_RESULT([$enable_introspection])
1054
1055 # check whether to enable animation API
1056 AC_MSG_CHECKING([whether to enable Animation API support])
1057 AC_ARG_ENABLE(animation_api,
1058               AC_HELP_STRING([--enable-animation-api],
1059                              [enable support for Animation API (experimental) [default=no]]),
1060               [], [enable_animation_api="no"])
1061 AC_MSG_RESULT([$enable_animation_api])
1062
1063 # check whether to enable requestAnimationFrame support
1064 AC_MSG_CHECKING([whether to enable requestAnimationFrame support])
1065 AC_ARG_ENABLE(request_animation_frame,
1066               AC_HELP_STRING([--enable-request-animation-frame],
1067                              [enable support for requestAnimationFrame (experimental) [default=yes]]),
1068               [],[enable_request_animation_frame="yes"])
1069 AC_MSG_RESULT([$enable_request_animation_frame])
1070
1071 # check whether to enable touch icon loading 
1072 AC_MSG_CHECKING([whether to enable touch icon loading])
1073 AC_ARG_ENABLE(touch_icon_loading,
1074               AC_HELP_STRING([--enable-touch-icon-loading],
1075                              [enable support for loading touch icons [default=no]]),
1076               [], [enable_touch_icon_loading="no"])
1077 AC_MSG_RESULT([$enable_touch_icon_loading])
1078
1079 # check whether to enable Register Protocol Handler support
1080 AC_MSG_CHECKING([whether to enable Register Protocol Handler])
1081 AC_ARG_ENABLE(register_protocol_handler,
1082               AC_HELP_STRING([--enable-register-protocol-handler],
1083                              [enable support for Register Protocol Handler (experimental) [default=no]]),
1084               [],[enable_register_protocol_handler="no"])
1085 AC_MSG_RESULT([$enable_register_protocol_handler])
1086
1087 # check whether to enable DeviceOrientation support
1088 AC_MSG_CHECKING([whether to enable DeviceOrientation])
1089 AC_ARG_ENABLE(device_orientation,
1090               AC_HELP_STRING([--enable-device-orientation],
1091                              [enable support for DeviceOrientation (experimental and incomplete) [default=no]]),
1092               [],[enable_device_orientation="no"])
1093 AC_MSG_RESULT([$enable_device_orientation])
1094
1095 # check whether to enable Font Boosting support
1096 AC_MSG_CHECKING([whether to enable Font Boosting])
1097 AC_ARG_ENABLE(font_boosting,
1098               AC_HELP_STRING([--enable-font-boosting],
1099                              [enable support for Font Boosting (incomplete) [default=no]]),
1100               [],[enable_font_boosting="no"])
1101 AC_MSG_RESULT([$enable_font_boosting])
1102
1103 # check whether to enable CSS Exclusions support
1104 AC_MSG_CHECKING([whether to enable CSS Exclusions])
1105 AC_ARG_ENABLE(css_exclusions,
1106               AC_HELP_STRING([--enable-css-exclusions],
1107                              [enable support for CSS Exclusions [default=yes]]),
1108               [],[enable_css_exclusions="yes"])
1109 AC_MSG_RESULT([$enable_css_exclusions])
1110
1111 # check whether to enable CSS Regions support
1112 AC_MSG_CHECKING([whether to enable CSS Regions])
1113 AC_ARG_ENABLE(css_regions,
1114               AC_HELP_STRING([--enable-css-regions],
1115                              [enable support for CSS Regions [default=yes]]),
1116               [],[enable_css_regions="yes"])
1117 AC_MSG_RESULT([$enable_css_regions])
1118
1119 G_IR_SCANNER=
1120 G_IR_COMPILER=
1121 G_IR_GENERATE=
1122 GIRDIR=
1123 GIRTYPELIBDIR=
1124
1125 if test "$enable_introspection" = "yes"; then
1126   GOBJECT_INTROSPECTION_REQUIRED=0.9.5
1127   PKG_CHECK_MODULES([INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
1128   
1129   G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
1130   G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
1131   G_IR_GENERATE="$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)"
1132   AC_DEFINE([ENABLE_INTROSPECTION],[1],[Define to enable GObject introspection support])
1133 fi
1134
1135 AC_SUBST([G_IR_SCANNER])
1136 AC_SUBST([G_IR_COMPILER])
1137 AC_SUBST([G_IR_GENERATE])
1138
1139 # determine the font backend
1140 AC_MSG_CHECKING([the font backend to use])
1141 AC_ARG_WITH(font_backend,
1142             AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
1143                            [Select font backend [default=freetype]]),
1144             [],[with_font_backend="freetype"])
1145
1146 case "$with_font_backend" in
1147      freetype|pango) ;;
1148      *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
1149 esac
1150 AC_MSG_RESULT([$with_font_backend])
1151
1152 if test "$host_cpu" = "sh4"; then
1153    CXXFLAGS="$CXXFLAGS -mieee -w"
1154    CFLAGS="$CFLAGS -mieee -w"
1155 fi
1156
1157 # Add '-g' flag to gcc to build with debug symbols
1158 if test "$enable_debug_symbols" = "yes"; then
1159    CXXFLAGS="$CXXFLAGS -g"
1160    CFLAGS="$CFLAGS -g"
1161 fi
1162
1163 if test "$enable_debug_features" = "no"; then
1164    AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
1165 fi
1166
1167 # Add the appropriate 'O' level for optimized builds
1168 if test "$enable_optimizations" = "yes"; then
1169    CXXFLAGS="$CXXFLAGS -O2"
1170    CFLAGS="$CFLAGS -O2"
1171 else
1172    CXXFLAGS="$CXXFLAGS -O0"
1173    CFLAGS="$CFLAGS -O0"
1174 fi
1175
1176 PKG_CHECK_MODULES([LIBSOUP],
1177                   [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
1178 AC_SUBST([LIBSOUP_CFLAGS])
1179 AC_SUBST([LIBSOUP_LIBS])
1180
1181 # check if FreeType/FontConfig are available
1182 if test "$with_font_backend" = "freetype"; then
1183    if test "$with_target" = "directfb"; then
1184    PKG_CHECK_MODULES([FREETYPE],
1185                      [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
1186                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
1187    else
1188    PKG_CHECK_MODULES([FREETYPE],
1189                      [cairo-ft
1190                      fontconfig >= $FONTCONFIG_REQUIRED_VERSION
1191                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
1192    fi
1193    AC_SUBST([FREETYPE_CFLAGS])
1194    AC_SUBST([FREETYPE_LIBS])
1195 fi
1196
1197 # check if SQLite3 is available. Error out only if one of the
1198 # features hard-depending on it is enabled while SQLite3 is
1199 # unavailable.
1200 PKG_CHECK_MODULES([SQLITE3],
1201                   [sqlite3 >= $SQLITE_REQUIRED_VERSION],
1202                   [sqlite3_has_pkg_config=yes],
1203                   [sqlite3_has_pkg_config=no])
1204 if test "$sqlite3_has_pkg_config" = "no"; then
1205    AC_SEARCH_LIBS([sqlite3_open16], [sqlite3],
1206                   [sqlite3_found=yes;SQLITE3_LIBS="$LIBS";SQLITE3_CFLAGS="-I $srcdir/WebKitLibraries/WebCoreSQLite3"],
1207                   [sqlite3_found=no])
1208 fi
1209 AC_SUBST([SQLITE3_CFLAGS])
1210 AC_SUBST([SQLITE3_LIBS])
1211
1212 if (test "$sqlite3_found" = "no"); then
1213    AC_MSG_ERROR([SQLite3 is required for the Database related features])
1214 fi
1215
1216 # check if libxslt is available
1217 if test "$enable_xslt" = "yes"; then
1218    PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
1219    AC_SUBST([LIBXSLT_CFLAGS])
1220    AC_SUBST([LIBXSLT_LIBS])
1221 fi
1222
1223 # check if geoclue is available
1224 if test "$enable_geolocation" = "yes"; then
1225     PKG_CHECK_MODULES([GEOCLUE], [geoclue])
1226     AC_SUBST([GEOCLUE_CFLAGS])
1227     AC_SUBST([GEOCLUE_LIBS])
1228 fi
1229
1230 # check for XRender under Linux/Unix. Some linkers require explicit
1231 # linkage (like GNU Gold), so we cannot rely on GTK+ pulling XRender
1232 if test "$os_win32" = "no"; then
1233    PKG_CHECK_MODULES([XRENDER], [xrender])
1234    AC_SUBST([XRENDER_CFLAGS])
1235    AC_SUBST([XRENDER_LIBS])
1236 fi
1237
1238 # check if gstreamer is available
1239 if test "$enable_video" = "yes" || test "$enable_web_audio" = "yes"; then
1240     gstreamer_modules="gstreamer-$GST_API_VERSION >= $GSTREAMER_REQUIRED_VERSION
1241                        gstreamer-app-$GST_API_VERSION
1242                        gstreamer-audio-$GST_API_VERSION
1243                        gstreamer-fft-$GST_API_VERSION
1244                        gstreamer-base-$GST_API_VERSION
1245                        gstreamer-pbutils-$GST_API_VERSION
1246                        gstreamer-plugins-base-$GST_API_VERSION >= $GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION
1247                        gstreamer-video-$GST_API_VERSION";
1248    if test "$GST_API_VERSION" != "1.0"; then
1249        gstreamer_modules="$gstreamer_modules gstreamer-interfaces-$GST_API_VERSION";
1250    fi
1251    PKG_CHECK_MODULES([GSTREAMER], [$gstreamer_modules], [have_gstreamer=yes])
1252    AC_SUBST([GSTREAMER_CFLAGS])
1253    AC_SUBST([GSTREAMER_LIBS])
1254 fi
1255
1256
1257 if test "$with_accelerated_compositing" = "clutter"; then
1258    PKG_CHECK_MODULES(CLUTTER, clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
1259    PKG_CHECK_MODULES([CLUTTER_GTK],
1260                      [clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED_VERSION])
1261
1262    AC_SUBST(CLUTTER_CFLAGS)
1263    AC_SUBST(CLUTTER_LIBS)
1264    AC_SUBST(CLUTTER_GTK_CFLAGS)
1265    AC_SUBST(CLUTTER_GTK_LIBS)
1266 fi
1267
1268 # check if atspi2 is available (only needed for Webkit2 unit tests)
1269 if test "$enable_webkit2" = "yes"; then
1270    PKG_CHECK_MODULES([ATSPI2],
1271                      [atspi-2 >= $ATSPI2_REQUIRED_VERSION],
1272                      [have_atspi2=yes], [have_atspi2=no])
1273
1274    AC_SUBST([ATSPI2_CFLAGS])
1275    AC_SUBST([ATSPI2_LIBS])
1276 fi
1277
1278 # check for code coverage support
1279 if test "$enable_coverage" = "yes"; then
1280    COVERAGE_CFLAGS="-MD"
1281    COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
1282    AC_SUBST([COVERAGE_CFLAGS])
1283    AC_SUBST([COVERAGE_LDFLAGS])
1284 fi
1285
1286 # check for HTML features
1287 if test "$enable_video" = "yes"; then
1288     html_flags=yes
1289 fi
1290
1291 # WebKit2
1292 # If you change the default here, please also make sure the assumptions made
1293 # in Tools/Scripts/webkitdirs.pm:buildAutotoolsProject still make sense.
1294 AC_MSG_CHECKING([whether to build Webkit2])
1295 AC_ARG_ENABLE(webkit2,
1296     AC_HELP_STRING([--enable-webkit2], [build webkit2 [default=yes]]),
1297     [], [enable_webkit2="yes"])
1298 AC_MSG_RESULT([$enable_webkit2])
1299 if test "$enable_webkit2" = "yes"; then
1300    if test "$GTK_API_VERSION" = "2.0"; then
1301       AC_MSG_ERROR([WebKit2 requires GTK+ 3.x, use --with-gtk=3.0])
1302    fi
1303
1304    # Check Unix printing
1305    PKG_CHECK_MODULES(GTK_UNIX_PRINTING, gtk+-unix-print-3.0,
1306                      [have_gtk_unix_printing=yes],
1307                      [have_gtk_unix_printing=no])
1308    AC_SUBST(GTK_UNIX_PRINTING_CFLAGS)
1309    AC_SUBST(GTK_UNIX_PRINTING_LIBS)
1310    if test "$have_gtk_unix_printing" = "yes"; then
1311        AC_DEFINE([HAVE_GTK_UNIX_PRINTING], [1], [Define if GTK+ UNIX Printing is available])
1312    fi
1313 fi
1314
1315 # Plugin Process
1316 AC_MSG_CHECKING([whether to build plugin process for WebKit2])
1317 AC_ARG_ENABLE(plugin_process,
1318             AC_HELP_STRING([--enable-plugin-process], [build plugin process for WebKit2 [default=yes]]),
1319                            [], [enable_plugin_process="yes"])
1320 AC_MSG_RESULT([$enable_plugin_process])
1321
1322 # Build the plugin process only when building Webkit2.
1323 if test "$enable_webkit2" = "no"; then
1324     enable_plugin_process=no
1325 fi
1326
1327 # Make sure we have GTK+ 2.x to build the plugin process.
1328 if test "$enable_plugin_process" = "yes"; then
1329    PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= $GTK2_REQUIRED_VERSION gail >= $GAIL2_REQUIRED_VERSION)
1330 fi
1331 AC_SUBST(GTK2_CFLAGS)
1332 AC_SUBST(GTK2_LIBS)
1333
1334 GTK_DOC_CHECK([1.10])
1335
1336 # OS conditionals
1337 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
1338 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
1339 AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
1340 AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
1341 AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
1342
1343 # target conditionals
1344 AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
1345 AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
1346 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
1347 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
1348
1349 # Unicode backend conditionals
1350 AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
1351 AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
1352
1353 # Font backend conditionals
1354 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
1355 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
1356
1357 # GStreamer feature conditional
1358 AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"])
1359 AM_CONDITIONAL([USE_WEBAUDIO_GSTREAMER], [test "$enable_web_audio" = "yes"])
1360
1361 # ATSPI2 conditional
1362 AM_CONDITIONAL([HAVE_ATSPI2], [test "$have_atspi2" = "yes"])
1363
1364 # Accelerated compositing conditional
1365 AM_CONDITIONAL([USE_ACCELERATED_COMPOSITING], [test "$with_accelerated_compositing" = "cairo" || test "$with_accelerated_compositing" = "opengl" || test "$with_accelerated_compositing" = "clutter"])
1366 AM_CONDITIONAL([USE_TEXTURE_MAPPER_CAIRO], [test "$with_accelerated_compositing" = "cairo"])
1367 AM_CONDITIONAL([USE_TEXTURE_MAPPER_GL], [test "$with_accelerated_compositing" = "opengl"])
1368 AM_CONDITIONAL([USE_CLUTTER], [test "$with_accelerated_compositing" = "clutter"])
1369
1370 # These are the same now, but they will soon be separate.
1371 AM_CONDITIONAL([USE_GLX], [test "$with_accelerated_compositing" = "opengl" || test "$enable_webgl" = "yes"])
1372 AM_CONDITIONAL([USE_OPENGL], [test "$with_accelerated_compositing" = "opengl" || test "$enable_webgl" = "yes"])
1373
1374 # IndexedDB implies LevelDB, but other features may one day require LevelDB.
1375 AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
1376 AM_CONDITIONAL([USE_LEVELDB],[test "$enable_indexed_database" = "yes"])
1377
1378 # WebKit feature conditionals
1379 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug_features" = "yes"])
1380 AM_CONDITIONAL([ENABLE_WEBGL],[test "$enable_webgl" = "yes"])
1381 AM_CONDITIONAL([ENABLE_BLOB],[test "$enable_blob" = "yes"])
1382 AM_CONDITIONAL([ENABLE_LEGACY_WEBKIT_BLOB_BUILDER],[test "$enable_legacy_webkit_blob_builder" = "yes"])
1383 AM_CONDITIONAL([ENABLE_METER_TAG],[test "$enable_meter_tag" = "yes"])
1384 AM_CONDITIONAL([ENABLE_MICRODATA],[test "$enable_microdata" = "yes"])
1385 AM_CONDITIONAL([ENABLE_PAGE_VISIBILITY_API],[test "$enable_page_visibility_api" = "yes"])
1386 AM_CONDITIONAL([ENABLE_PROGRESS_TAG],[test "$enable_progress_tag" = "yes"])
1387 AM_CONDITIONAL([ENABLE_CHANNEL_MESSAGING],[test "$enable_channel_messaging" = "yes"])
1388 AM_CONDITIONAL([ENABLE_JAVASCRIPT_DEBUGGER],[test "$enable_javascript_debugger" = "yes"])
1389 AM_CONDITIONAL([ENABLE_GAMEPAD],[test "$enable_gamepad" = "yes"])
1390 AM_CONDITIONAL([ENABLE_DIRECTORY_UPLOAD],[test "$enable_directory_upload" = "yes"])
1391 AM_CONDITIONAL([ENABLE_DATAGRID],[test "$enable_datagrid" = "yes"])
1392 AM_CONDITIONAL([ENABLE_DATA_TRANSFER_ITEMS],[test "$enable_data_transfer_items" = "yes"])
1393 AM_CONDITIONAL([ENABLE_SQL_DATABASE],[test "$enable_sql_database" = "yes"])
1394 AM_CONDITIONAL([ENABLE_DATALIST],[test "$enable_datalist" = "yes"])
1395 AM_CONDITIONAL([ENABLE_DETAILS],[test "$enable_details" = "yes"])
1396 AM_CONDITIONAL([ENABLE_FAST_MOBILE_SCROLLING],[test "$enable_fast_mobile_scrolling" = "yes"])
1397 AM_CONDITIONAL([ENABLE_FILE_SYSTEM],[test "$enable_file_system" = "yes"])
1398 AM_CONDITIONAL([ENABLE_STYLE_SCOPED],[test "$enable_style_scoped" = "yes"])
1399 AM_CONDITIONAL([ENABLE_QUOTA],[test "$enable_quota" = "yes"])
1400 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
1401 AM_CONDITIONAL([ENABLE_IMAGE_RESIZER],[test "$enable_image_resizer" = "yes"])
1402 AM_CONDITIONAL([ENABLE_INPUT_TYPE_COLOR],[test "$enable_input_type_color" = "yes"])
1403 AM_CONDITIONAL([ENABLE_INPUT_SPEECH],[test "$enable_input_speech" = "yes"])
1404 AM_CONDITIONAL([ENABLE_SCRIPTED_SPEECH],[test "$enable_scripted_speech" = "yes"])
1405 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
1406 AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
1407 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
1408 AM_CONDITIONAL([ENABLE_MATHML], [test "$enable_mathml" = "yes"])
1409 AM_CONDITIONAL([ENABLE_MHTML], [test "$enable_mhtml" = "yes"])
1410 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
1411 AM_CONDITIONAL([ENABLE_MEDIA_SOURCE],[test "$enable_media_source" = "yes"])
1412 AM_CONDITIONAL([ENABLE_MEDIA_STATISTICS],[test "$enable_media_statistics" = "yes"])
1413 AM_CONDITIONAL([ENABLE_VIDEO_TRACK],[test "$enable_video_track" = "yes"])
1414 AM_CONDITIONAL([ENABLE_FULLSCREEN_API],[test "$enable_fullscreen_api" = "yes"])
1415 AM_CONDITIONAL([ENABLE_MEDIA_STREAM],[test "$enable_media_stream" = "yes"])
1416 AM_CONDITIONAL([ENABLE_LEGACY_NOTIFICATIONS],[test "$enable_legacy_notifications" = "yes"])
1417 AM_CONDITIONAL([ENABLE_NOTIFICATIONS],[test "$enable_notifications" = "yes"])
1418 AM_CONDITIONAL([ENABLE_ORIENTATION_EVENTS],[test "$enable_orientation_events" = "yes"])
1419 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
1420 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
1421 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
1422 AM_CONDITIONAL([ENABLE_CSS3_FLEXBOX],[test "$enable_css3_flexbox" = "yes"])
1423 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
1424 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_workers" = "yes"])
1425 AM_CONDITIONAL([ENABLE_SHADOW_DOM],[test "$enable_shadow_dom" = "yes"])
1426 AM_CONDITIONAL([ENABLE_SHARED_WORKERS],[test "$enable_shared_workers" = "yes"])
1427 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
1428 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
1429 AM_CONDITIONAL([ENABLE_WEB_SOCKETS],[test "$enable_web_sockets" = "yes"])
1430 AM_CONDITIONAL([ENABLE_WEB_AUDIO],[test "$enable_web_audio" = "yes"])
1431 AM_CONDITIONAL([ENABLE_WEB_TIMING],[test "$enable_web_timing" = "yes"])
1432 AM_CONDITIONAL([ENABLE_OPCODE_STATS],[test "$enable_opcode_stats" = "yes"])
1433 AM_CONDITIONAL([ENABLE_WEBKIT2],[test "$enable_webkit2" = "yes"])
1434 AM_CONDITIONAL([ENABLE_PLUGIN_PROCESS],[test "$enable_plugin_process" = "yes"])
1435 AM_CONDITIONAL([ENABLE_SPELLCHECK],[test "$enable_spellcheck" = "yes"])
1436 AM_CONDITIONAL([ENABLE_ANIMATION_API],[test "$enable_animation_api" = "yes"])
1437 AM_CONDITIONAL([ENABLE_REQUEST_ANIMATION_FRAME],[test "$enable_request_animation_frame" = "yes"])
1438 AM_CONDITIONAL([ENABLE_TOUCH_ICON_LOADING],[test "$enable_touch_icon_loading" = "yes"])
1439 AM_CONDITIONAL([ENABLE_REGISTER_PROTOCOL_HANDLER],[test "$enable_register_protocol_handler" = "yes"])
1440 AM_CONDITIONAL([ENABLE_DEVICE_ORIENTATION],[test "$enable_device_orientation" = "yes"])
1441 AM_CONDITIONAL([ENABLE_MUTATION_OBSERVERS],[test "$enable_mutation_observers" = "yes"])
1442 AM_CONDITIONAL([ENABLE_IFRAME_SEAMLESS],[test "$enable_iframe_seamless" = "yes"])
1443 AM_CONDITIONAL([ENABLE_FONT_BOOSTING],[test "$enable_font_boosting" = "yes"])
1444 AM_CONDITIONAL([ENABLE_CSS_EXCLUSIONS],[test "$enable_css_exclusions" = "yes"])
1445 AM_CONDITIONAL([ENABLE_CSS_REGIONS],[test "$enable_css_regions" = "yes"])
1446
1447 # Gtk conditionals
1448 AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
1449
1450 AC_CONFIG_FILES([
1451 GNUmakefile
1452 ])
1453  
1454
1455 AC_CONFIG_FILES([
1456 Source/WebKit/gtk/webkit/webkitversion.h
1457 ])
1458
1459 AC_CONFIG_FILES([
1460 Source/WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/webkit.pc.in
1461 Source/WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:Source/WebKit/gtk/JSCore.gir.in
1462 Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/JavaScriptCore/javascriptcoregtk.pc.in
1463 ]
1464 ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1465 )
1466
1467
1468 if test "$enable_webkit2" = "yes"; then
1469     AC_CONFIG_FILES([
1470     Source/WebKit2/webkit2gtk-${WEBKITGTK_API_VERSION}.pc:Source/WebKit2/webkit2gtk.pc.in
1471     ]
1472     ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1473     )
1474 fi
1475
1476 AC_OUTPUT
1477
1478 echo "
1479 WebKit was configured with the following options:
1480
1481 Build configuration:
1482  Enable debugging (slow)                                  : $enable_debug
1483  Compile with debug symbols (slow)                        : $enable_debug_symbols
1484  Enable debug features (slow)                             : $enable_debug_features
1485  Enable GCC build optimization                            : $enable_optimizations
1486  Code coverage support                                    : $enable_coverage
1487  Unicode backend                                          : $with_unicode_backend
1488  Font backend                                             : $with_font_backend
1489  Optimized memory allocator                               : $enable_fast_malloc
1490  Accelerated Compositing                                  : $with_accelerated_compositing
1491
1492 Features:
1493  WebGL                                                    : $enable_webgl
1494  Blob support                                             : $enable_blob
1495  CSS3 Flexbox support                                     : $enable_css3_flexbox
1496  Legacy WebKitBlobBuilder support                         : $enable_legacy_webkit_blob_builder
1497  CSS Exclusions support                                   : $enable_css_exclusions
1498  CSS Regions support                                      : $enable_css_regions
1499  DOM mutation observer support                            : $enable_mutation_observers
1500  DeviceOrientation support                                : $enable_device_orientation
1501  Directory upload                                         : $enable_directory_upload
1502  Fast Mobile Scrolling                                    : $enable_fast_mobile_scrolling
1503  Font Boosting support                                    : $enable_font_boosting
1504  JIT compilation                                          : $enable_jit
1505  Filters support                                          : $enable_filters
1506  Geolocation support                                      : $enable_geolocation
1507  JavaScript debugger/profiler support                     : $enable_javascript_debugger
1508  Gamepad support                                          : $enable_gamepad
1509  MathML support                                           : $enable_mathml
1510  Media source                                             : $enable_media_source
1511  Media statistics                                         : $enable_media_statistics
1512  MHTML support                                            : $enable_mhtml
1513  HTML5 channel messaging support                          : $enable_channel_messaging
1514  HTML5 meter element support                              : $enable_meter_tag
1515  HTML5 microdata support                                  : $enable_microdata
1516  Page Visibility API support                              : $enable_page_visibility_api
1517  HTML5 progress element support                           : $enable_progress_tag
1518  HTML5 client-side session and persistent storage support : $enable_dom_storage
1519  SQL client-side database storage support                 : $enable_sql_database
1520  HTML5 datagrid support                                   : $enable_datagrid
1521  HTML5 data transfer items support                        : $enable_data_transfer_items
1522  HTML5 FileSystem API support                             : $enable_file_system
1523  Quota API support                                        : $enable_quota
1524  HTML5 sandboxed iframe support                           : $enable_sandbox
1525  HTML5 iframe seamless attribute support                  : $enable_iframe_seamless
1526  HTML5 video element support                              : $enable_video
1527  HTML5 track element support                              : $enable_video_track
1528  Fullscreen API support                                   : $enable_fullscreen_api
1529  Media stream support                                     : $enable_media_stream
1530  Icon database support                                    : $enable_icon_database
1531  Image resizer support                                    : $enable_image_resizer
1532  Link prefetch support                                    : $enable_link_prefetch
1533  Opcode stats                                             : $enable_opcode_stats
1534  Shadow DOM support                                       : $enable_shadow_dom
1535  SharedWorkers support                                    : $enable_shared_workers
1536  Color input support                                      : $enable_input_type_color
1537  Speech input support                                     : $enable_input_speech
1538  Scripted speech support                                  : $enable_scripted_speech
1539  SVG support                                              : $enable_svg
1540  SVG fonts support                                        : $enable_svg_fonts
1541  Web Audio support                                        : $enable_web_audio
1542  Web Sockets support                                      : $enable_web_sockets
1543  Web Timing support                                       : $enable_web_timing
1544  Web Workers support                                      : $enable_workers
1545  XSLT support                                             : $enable_xslt
1546  Spellcheck support                                       : $enable_spellcheck
1547  Animation API                                            : $enable_animation_api
1548  RequestAnimationFrame support                            : $enable_request_animation_frame
1549  Touch Icon Loading support                               : $enable_touch_icon_loading
1550  Register Protocol Handler support                        : $enable_register_protocol_handler
1551  WebKit2 support                                          : $enable_webkit2
1552  WebKit2 plugin process                                   : $enable_plugin_process
1553
1554 GTK+ configuration:
1555  GTK+ version                                             : $with_gtk
1556  GDK target                                               : $with_target
1557  GStreamer version                                        : $with_gstreamer
1558  Introspection support                                    : $enable_introspection
1559  Generate documentation                                   : $enable_gtk_doc
1560 "
1561 if test "$with_unicode_backend" = "glib"; then
1562    echo "     >> WARNING: the glib-based unicode backend is slow and incomplete <<"
1563    echo
1564    echo
1565 fi