[Texmap] [Qt] [WK2] Unsync in TextureMapperNode between parent and child lists cause...
[WebKit-https.git] / configure.ac
1 AC_PREREQ(2.59)
2
3 m4_define([webkit_major_version], [1])
4 m4_define([webkit_minor_version], [5])
5 m4_define([webkit_micro_version], [1])
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], [534])
12 m4_define([webkit_user_agent_minor_version], [26])
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=8:0:8
39 AC_SUBST([LIBWEBKITGTK_VERSION])
40
41 AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar])
42
43 # Use AM_SILENT_RULES if present
44 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
45
46 # host checking - inspired by the GTK+ configure.in
47 # TODO: move these to webkit.m4?
48 AC_MSG_CHECKING([for native Win32])
49 case "$host" in
50      *-*-mingw*)
51        os_win32=yes
52        ;;
53      *)
54        os_win32=no
55        ;;
56 esac
57 AC_MSG_RESULT([$os_win32])
58
59 case "$host" in
60      *-*-linux*)
61        os_linux=yes
62        ;;
63      *-*-freebsd*)
64        os_freebsd=yes
65        ;;
66      *-*-darwin*)
67        os_darwin=yes
68        ;;
69 esac
70
71 case "$host_os" in
72      gnu* | linux* | k*bsd*-gnu)
73        os_gnu=yes
74        ;;
75      *)
76        os_gnu=no
77        ;;
78 esac
79
80 # initialize webkit options
81 WEBKIT_INIT
82 AC_DISABLE_STATIC
83 AC_LIBTOOL_WIN32_DLL
84 AC_PROG_LIBTOOL
85 # use dolt to speedup the build
86 DOLT
87
88 AC_PATH_PROG(FLEX, flex)
89 if test -z "$FLEX"; then
90    AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit])
91 else
92    FLEX_VERSION=`$FLEX --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'`
93    AX_COMPARE_VERSION([2.5.33],[gt],[$FLEX_VERSION],
94       AC_MSG_WARN([You need at least version 2.5.33 of the 'flex' lexer generator to compile WebKit correctly]))
95 fi
96
97 AC_PATH_PROG(GPERF, gperf)
98 if test -z "$GPERF"; then
99    AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
100 fi
101
102 # Disable C++0x compat warnings for GCC >= 4.6.0 until we build
103 # cleanly with that.
104 if test "$CXX" = "g++"; then
105    CXX_VERSION=`$CXX -dumpversion`
106    AX_COMPARE_VERSION([$CXX_VERSION],[ge],[4.6.0],CXXFLAGS="$CXXFLAGS -Wno-c++0x-compat")
107 fi
108
109 # pthread (not needed on Windows)
110 if test "$os_win32" = "no"; then
111 AC_CHECK_HEADERS([pthread.h],
112                  AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exists]),
113                  AC_MSG_ERROR([pthread support is required to build WebKit]))
114 fi
115
116 # check for libjpeg the way Gtk does it.
117 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
118                    jpeg_ok=yes, jpeg_ok=no
119                    AC_MSG_ERROR([JPEG library (libjpeg) not found]))
120 if test "$jpeg_ok" = yes; then
121    AC_MSG_CHECKING([for jpeglib])
122    AC_TRY_CPP(
123 [#include <stdio.h>
124 #undef PACKAGE
125 #undef VERSION
126 #undef HAVE_STDLIB_H
127 #include <jpeglib.h>],
128          jpeg_ok=yes,
129          jpeg_ok=no)
130    AC_MSG_RESULT($jpeg_ok)
131    if test "$jpeg_ok" = yes; then
132       JPEG_LIBS="-ljpeg"
133       # should we check for progressive JPEG like GTK+ as well?
134    else
135       AC_MSG_ERROR([JPEG library (libjpeg) not found])
136    fi
137 fi
138 AC_SUBST([JPEG_LIBS])
139
140 # Check for libpng the way Gtk+ does it
141 for l in libpng libpng14 libpng12; do
142   AC_MSG_CHECKING(for $l)
143   if $PKG_CONFIG --exists $l ; then
144     AC_MSG_RESULT(yes)
145     PNG_LIBS=`$PKG_CONFIG --libs $l`
146     png_ok=yes
147     break
148   else
149     AC_MSG_RESULT(no)
150     png_ok=no
151   fi
152 done
153 if test "$png_ok" != yes; then
154   AC_CHECK_LIB(png, png_read_info,
155     [AC_CHECK_HEADER(png.h,
156       png_ok=yes,
157       png_ok=no)],
158     AC_MSG_ERROR([PNG library (libpng) not found]), -lz -lm)
159   if test "$png_ok" = yes; then
160     AC_MSG_CHECKING([for png_structp in png.h])
161     AC_TRY_COMPILE([#include <png.h>],
162       [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
163       png_ok=yes,
164       png_ok=no)
165     AC_MSG_RESULT($png_ok)
166     if test "$png_ok" = yes; then
167       PNG_LIBS='-lpng -lz'
168     else
169       AC_MSG_ERROR([PNG library (libpng) not found])
170     fi
171   else
172     AC_MSG_ERROR([PNG library (libpng) not found])
173   fi
174 fi
175 AC_SUBST([PNG_LIBS])
176
177
178 if test "$os_win32" = "yes"; then
179   WINMM_LIBS=-lwinmm
180   SHLWAPI_LIBS=-lshlwapi
181   OLE32_LIBS=-lole32
182 fi
183 AC_SUBST([WINMM_LIBS])
184 AC_SUBST([SHLWAPI_LIBS])
185 AC_SUBST([OLE32_LIBS])
186
187
188 # determine the GTK+ version to use
189 AC_MSG_CHECKING([the GTK+ version to use])
190 AC_ARG_WITH([gtk],
191         [AS_HELP_STRING([--with-gtk=2.0|3.0], [the GTK+ version to use (default: 2.0)])],
192         [case "$with_gtk" in
193         2.0|3.0) ;;
194         *) AC_MSG_ERROR([invalid GTK+ version specified]) ;;
195         esac],
196         [with_gtk=2.0])
197 AC_MSG_RESULT([$with_gtk])
198
199 GTK2_REQUIRED_VERSION=2.10
200 GAIL2_REQUIRED_VERSION=1.8
201 GTK3_REQUIRED_VERSION=3.0
202 GAIL3_REQUIRED_VERSION=3.0
203
204 case "$with_gtk" in
205      2.0) GTK_REQUIRED_VERSION=$GTK2_REQUIRED_VERSION
206           GTK_API_VERSION=2.0
207           WEBKITGTK_API_MAJOR_VERSION=1
208           WEBKITGTK_API_MINOR_VERSION=0
209           WEBKITGTK_API_VERSION=1.0
210           WEBKITGTK_PC_NAME=webkit
211           GAIL_PC_NAME=gail
212           GAIL_REQUIRED_VERSION=$GAIL2_REQUIRED_VERSION
213           ;;
214      3.0) GTK_REQUIRED_VERSION=$GTK3_REQUIRED_VERSION
215           GTK_API_VERSION=3.0
216           WEBKITGTK_API_MAJOR_VERSION=3
217           WEBKITGTK_API_MINOR_VERSION=0
218           WEBKITGTK_API_VERSION=3.0
219           WEBKITGTK_PC_NAME=webkitgtk
220           GAIL_PC_NAME=gail-3.0
221           GAIL_REQUIRED_VERSION=$GAIL3_REQUIRED_VERSION
222           ;;
223 esac
224
225 AC_SUBST([WEBKITGTK_API_MAJOR_VERSION])
226 AC_SUBST([WEBKITGTK_API_MINOR_VERSION])
227 AC_SUBST([WEBKITGTK_API_VERSION])
228 AC_SUBST([WEBKITGTK_PC_NAME])
229 AC_SUBST([GTK_API_VERSION])
230 AM_CONDITIONAL([GTK_API_VERSION_2],[test "$GTK_API_VERSION" = "2.0"])
231
232 # determine the GDK/GTK+ target
233 AC_MSG_CHECKING([the target windowing system])
234 AC_ARG_WITH(target,
235             AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
236                            [Select webkit target [default=x11]]),
237             [],[with_target="x11"])
238
239 case "$with_target" in
240      x11|win32|quartz|directfb) ;;
241      *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
242 esac
243
244 AC_MSG_RESULT([$with_target])
245
246 AC_MSG_CHECKING([for Hildon UI extensions])
247 AC_ARG_WITH(hildon,
248             AC_HELP_STRING([--with-hildon],
249                            [Use Hildon UI extensions [default=no]]),
250             [],[with_hildon="no"])
251 AC_MSG_RESULT([$with_hildon])
252
253 if test "$with_hildon" = "yes"; then
254     HILDON_CPPFLAGS="-DMAEMO_CHANGES"
255     PKG_CHECK_MODULES([HILDON], [hildon-1])
256     AC_SUBST([HILDON_CPPFLAGS])
257     AC_SUBST([HILDON_CFLAGS])
258     AC_SUBST([HILDON_LIBS])
259 fi
260
261 # minimum base dependencies
262 LIBSOUP_REQUIRED_VERSION=2.33.6
263 CAIRO_REQUIRED_VERSION=1.10
264 FONTCONFIG_REQUIRED_VERSION=2.4
265 FREETYPE2_REQUIRED_VERSION=9.0
266 LIBXML_REQUIRED_VERSION=2.6
267
268 # minimum GTK+ base dependencies
269 PANGO_REQUIRED_VERSION=1.12
270
271 # optional modules
272 LIBXSLT_REQUIRED_VERSION=1.1.7
273 SQLITE_REQUIRED_VERSION=3.0
274 GSTREAMER_REQUIRED_VERSION=0.10
275 GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=0.10.25
276 ENCHANT_REQUIRED_VERSION=0.22
277
278 # Available modules
279 #
280 # glib - glib and includes gthread
281 # unicode - check and identify which unicode backend to use
282 #
283 # todo: webcore gtk
284 WEBKIT_CHECK_DEPENDENCIES([glib unicode])
285
286 GETTEXT_PACKAGE=$PACKAGE-$GTK_API_VERSION
287 AC_SUBST(GETTEXT_PACKAGE)
288 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
289                    [The gettext catalog name])
290
291 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
292 AC_SUBST(LIBXML_CFLAGS)
293 AC_SUBST(LIBXML_LIBS)
294
295 PKG_CHECK_MODULES(PANGO, 
296                   [pango >= $PANGO_REQUIRED_VERSION
297                    pangoft2])
298 AC_SUBST(PANGO_CFLAGS)
299 AC_SUBST(PANGO_LIBS)
300
301 AC_MSG_CHECKING([whether to enable spellcheck support])
302 AC_ARG_ENABLE([spellcheck],
303   [AS_HELP_STRING([--enable-spellcheck],[enable support for spellcheck])],
304   [],[enable_spellcheck="yes"])
305 AC_MSG_RESULT([$enable_spellcheck])
306
307 if test "$enable_spellcheck" = "yes"; then
308 PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED_VERSION, [], [enable_spellcheck="no"])
309 AC_SUBST(ENCHANT_CFLAGS)
310 AC_SUBST(ENCHANT_LIBS)
311 fi
312
313 PKG_CHECK_MODULES(GAIL, $GAIL_PC_NAME >= $GAIL_REQUIRED_VERSION)
314 AC_SUBST(GAIL_CFLAGS)
315 AC_SUBST(GAIL_LIBS)
316
317 # check for target-specific dependencies
318 if test "$with_target" = "directfb"; then
319    PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION)
320    PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION)
321    AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB])
322 else
323    PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
324    PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
325
326    if test "$with_target" = "x11" && test "$os_win32" = "no"; then
327       # check for XT
328       PKG_CHECK_MODULES([XT],
329                         [xt],
330                         [xt_has_pkg_config=yes],
331                         [xt_has_pkg_config=no])
332       # some old versions of Xt do not provide xt.pc, so try to link against Xt
333       # and if it's installed fall back to just adding -lXt
334       if test "$xt_has_pkg_config" = "no"; then
335          # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
336          # we don't care about the XtOpenDisplay symbol but only about the
337          # existence of libXt
338          AC_CHECK_LIB([Xt], [XtOpenDisplay],
339                       [XT_CFLAGS=""; XT_LIBS="-lXt"],
340                       [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
341       fi
342       AC_SUBST([XT_CFLAGS])
343       AC_SUBST([XT_LIBS])
344       AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
345    fi
346 fi
347 AC_SUBST(GTK_CFLAGS)
348 AC_SUBST(GTK_LIBS)
349 AC_SUBST(CAIRO_CFLAGS)
350 AC_SUBST(CAIRO_LIBS)
351
352 # check whether to build with debugging enabled
353 AC_MSG_CHECKING([whether to do a debug build])
354 AC_ARG_ENABLE(debug,
355               AC_HELP_STRING([--enable-debug],
356                              [turn on debugging [default=no]]),
357               [],[enable_debug="no"])
358 AC_MSG_RESULT([$enable_debug])
359
360 # check whether to enable optimized builds
361 AC_MSG_CHECKING([whether to enable optimized builds])
362 AC_ARG_ENABLE(optimizations,
363               AC_HELP_STRING([--enable-optimizations],
364                              [turn on optimize builds (GCC only)
365                              [default=yes]]),
366               [enable_optimizations=$enableval],
367               [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
368 AC_MSG_RESULT([$enable_optimizations])
369
370 # check whether to enable 3D rendering support
371 AC_MSG_CHECKING([whether to enable support for 3D Rendering])
372 AC_ARG_ENABLE(3d_rendering,
373               AC_HELP_STRING([--enable-3d-rendering],
374                              [enable support for 3D Rendering (experimental) [default=no]]),
375               [],[enable_3d_rendering="no"])
376 AC_MSG_RESULT([$enable_3d_rendering])
377
378 # check whether to enable WebGL support
379 AC_MSG_CHECKING([whether to enable WebGL support])
380 AC_ARG_ENABLE(webgl,
381               AC_HELP_STRING([--enable-webgl],
382                              [enable support for WebGL (experimental) [default=no]]),
383               [], [enable_webgl="no"])
384 AC_MSG_RESULT([$enable_webgl])
385
386 if test "$enable_webgl" = "yes"; then
387     AC_CHECK_HEADERS([GL/gl.h], [], AC_MSG_ERROR([OpenGL header not found]))
388     AC_CHECK_HEADERS([GL/glx.h], [], AC_MSG_ERROR([GLX header not found]))
389     OPENGL_LIBS=-lGL
390 fi
391 AC_SUBST([OPENGL_LIBS])
392
393 # check whether to enable channel messaging support
394 AC_MSG_CHECKING([whether to enable HTML5 Channel Messaging support])
395 AC_ARG_ENABLE(channel_messaging,
396               AC_HELP_STRING([--enable-channel-messaging],
397                              [enable HTML5 channel messaging support [default=yes]]),
398               [],[enable_channel_messaging="yes"])
399 AC_MSG_RESULT([$enable_channel_messaging])
400
401 # check whether to enable notifications
402 AC_MSG_CHECKING([whether to enable notifications])
403 AC_ARG_ENABLE(notifications,
404               AC_HELP_STRING([--enable-notifications],
405                              [enable notifications [default=no]]),
406               [],[enable_notifications="no"])
407 AC_MSG_RESULT([$enable_notifications])
408
409 # check whether to enable the meter tag
410 AC_MSG_CHECKING([whether to enable HTML5 meter tag])
411 AC_ARG_ENABLE(meter_tag,
412               AC_HELP_STRING([--enable-meter-tag],
413                              [enable HTML5 meter [default=yes]]),
414               [],[enable_meter_tag="yes"])
415 AC_MSG_RESULT([$enable_meter_tag])
416
417 # check whether to enable page visibility API.
418 AC_MSG_CHECKING([whether to enable Page Visibility API support])
419 AC_ARG_ENABLE(page_visibility_api,
420               AC_HELP_STRING([--enable-page-visibility-api],
421                              [enable page visibility api[default=no]]),
422               [],[enable_page_visibility_api="no"])
423 AC_MSG_RESULT([$enable_page_visibility_api])
424
425 # check whether to enable the progress tag
426 AC_MSG_CHECKING([whether to enable HTML5 progress tag])
427 AC_ARG_ENABLE(progress_tag,
428               AC_HELP_STRING([--enable-progress-tag],
429                              [enable HTML5 progress [default=yes]]),
430               [],[enable_progress_tag="yes"])
431 AC_MSG_RESULT([$enable_progress_tag])
432
433 # check whether to enable JavaScript debugger/profiler support
434 AC_MSG_CHECKING([whether to enable JavaScript debugger/profiler support])
435 AC_ARG_ENABLE(javascript_debugger,
436               AC_HELP_STRING([--enable-javascript-debugger],
437                              [enable JavaScript debugger/profiler support [default=yes]]),
438               [],[enable_javascript_debugger="yes"])
439 AC_MSG_RESULT([$enable_javascript_debugger])
440
441 # check whether to build with datagrid support
442 AC_MSG_CHECKING([whether to enable HTML5 datagrid support])
443 AC_ARG_ENABLE(datagrid,
444               AC_HELP_STRING([--enable-datagrid],
445                              [enable HTML5 datagrid support [default=no]]),
446               [],[enable_datagrid="no"])
447 AC_MSG_RESULT([$enable_datagrid])
448
449 # check whether to build with data transfer items support
450 AC_MSG_CHECKING([whether to enable HTML5 data transfer items support])
451 AC_ARG_ENABLE(data_transfer_items,
452               AC_HELP_STRING([--enable-data-transfer-items],
453                              [enable HTML5 data transfer items support [default=no]]),
454               [],[enable_data_transfer_items="no"])
455 AC_MSG_RESULT([$enable_data_transfer_items])
456
457 # check whether to enable HTML5 Offline Web Applications support
458 AC_MSG_CHECKING([whether to enable HTML5 offline web applications support])
459 AC_ARG_ENABLE(offline_web_applications,
460               AC_HELP_STRING([--enable-offline-web-applications],
461                              [enable HTML5 offline web applications support [default=yes]]),
462               [],[enable_offline_web_applications="yes"])
463 AC_MSG_RESULT([$enable_offline_web_applications])
464
465 # check whether to enable HTML5 client-side session and persitent storage support
466 AC_MSG_CHECKING([whether to enable HTML5 client-side session and persistent storage support])
467 AC_ARG_ENABLE(dom_storage,
468               AC_HELP_STRING([--enable-dom-storage],
469                              [enable HTML5 client-side session and persistent storage support [default=yes]]),
470               [],[enable_dom_storage="yes"])
471 AC_MSG_RESULT([$enable_dom_storage])
472
473 # check whether to enable the indexed database API
474 AC_MSG_CHECKING([whether to enable the indexed database API])
475 AC_ARG_ENABLE(indexed_database,
476               AC_HELP_STRING([--enable-indexed-database],
477                              [enable the indexed database API [default=no]]),
478               [],[enable_indexed_database="no"])
479 AC_MSG_RESULT([$enable_indexed_database])
480
481 # check whether to enable the color input
482 AC_MSG_CHECKING([whether to enable the color input])
483 AC_ARG_ENABLE(input_color,
484               AC_HELP_STRING([--enable-input-color],
485                              [enable the color input [default=no]]),
486               [],[enable_input_color="no"])
487 AC_MSG_RESULT([$enable_input_color])
488
489 # check whether to enable the speech input API
490 AC_MSG_CHECKING([whether to enable the speech input API])
491 AC_ARG_ENABLE(input_speech,
492               AC_HELP_STRING([--enable-input-speech],
493                              [enable the speech input API [default=no]]),
494               [],[enable_input_speech="no"])
495 AC_MSG_RESULT([$enable_input_speech])
496
497 # check whether to build with database support
498 AC_MSG_CHECKING([whether to enable HTML5 client-side database storage support])
499 AC_ARG_ENABLE(database,
500               AC_HELP_STRING([--enable-database],
501                              [enable HTML5 client-side database storage support [default=yes]]),
502               [],[enable_database="yes"])
503 AC_MSG_RESULT([$enable_database])
504
505 # check whether to build with server-sent events support
506 AC_MSG_CHECKING([whether to enable HTML5 server-sent events support])
507 AC_ARG_ENABLE(eventsource,
508               AC_HELP_STRING([--enable-eventsource],
509                              [enable HTML5 server-sent events support [default=yes]]),
510               [],[enable_eventsource="yes"])
511 AC_MSG_RESULT([$enable_eventsource])
512
513 # check whether to build with icon database support
514 AC_MSG_CHECKING([whether to enable icon database support])
515 AC_ARG_ENABLE(icon_database,
516               AC_HELP_STRING([--enable-icon-database],
517                              [enable icon database [default=yes]]),
518               [],[enable_icon_database="yes"])
519 AC_MSG_RESULT([$enable_icon_database])
520
521 # check whether to build with image resizer API support
522 AC_MSG_CHECKING([whether to enable image resizer API support])
523 AC_ARG_ENABLE(image_resizer,
524               AC_HELP_STRING([--enable-image-resizer],
525                              [enable image resizer [default=no]]),
526               [],[enable_image_resizer="no"])
527 AC_MSG_RESULT([$enable_image_resizer])
528
529 # check whether to enable HTML5 datalist support
530 AC_MSG_CHECKING([whether to enable HTML5 datalist support])
531 AC_ARG_ENABLE(datalist,
532               AC_HELP_STRING([--enable-datalist],
533                              [enable HTML5 datalist support [default=yes]]),
534               [],[enable_datalist="yes"])
535 AC_MSG_RESULT([$enable_datalist])
536
537 # check whether to enable HTML5 sandbox iframe support
538 AC_MSG_CHECKING([whether to enable HTML5 sandboxed iframe support])
539 AC_ARG_ENABLE(sandbox,
540               AC_HELP_STRING([--enable-sandbox],
541                              [enable HTML5 sandboxed iframe support [default=yes]]),
542               [],[enable_sandbox="yes"])
543 AC_MSG_RESULT([$enable_sandbox])
544
545 # check whether to enable HTML5 audio/video support
546 AC_MSG_CHECKING([whether to enable HTML5 video support])
547 AC_ARG_ENABLE(video,
548               AC_HELP_STRING([--enable-video],
549                              [enable HTML5 video support [default=yes]]),
550               [],[enable_video="yes"])
551 AC_MSG_RESULT([$enable_video])
552
553 # turn off video features if --disable-video is requested
554 if test "$enable_video" = "no"; then
555    enable_video_track=no
556 fi
557
558 # check whether to enable HTML5 video track support
559 AC_MSG_CHECKING([whether to enable HTML5 video track support])
560 AC_ARG_ENABLE(video_track,
561               AC_HELP_STRING([--enable-video-track],
562                              [enable HTML5 video track support [default=yes]]),
563               [],[enable_video_track="yes"])
564 AC_MSG_RESULT([$enable_video_track])
565
566 # check whether to enable media statistics support
567 AC_MSG_CHECKING([whether to enable media statistics support])
568 AC_ARG_ENABLE(media_statistics,
569               AC_HELP_STRING([--enable-media-statistics],
570                              [enable support for media statistics [default=no]]),
571               [], [enable_media_statistics="no"])
572 AC_MSG_RESULT([$enable_media_statistics])
573
574 # check whether to enable Javascript Fullscreen API support
575 AC_MSG_CHECKING([whether to enable Fullscreen API support])
576 AC_ARG_ENABLE(fullscreen_api,
577               AC_HELP_STRING([--enable-fullscreen-api],
578                              [enable the Fullscreen API support [default=yes]]),
579               [],[enable_fullscreen_api="yes"])
580 AC_MSG_RESULT([$enable_fullscreen_api])
581
582 # check whether to enable media stream support
583 AC_MSG_CHECKING([whether to enable media stream support])
584 AC_ARG_ENABLE(media_stream,
585               AC_HELP_STRING([--enable-media-stream],
586                              [enable media stream support (incomplete) [default=no]]),
587               [],[enable_media_stream="no"])
588 AC_MSG_RESULT([$enable_media_stream])
589
590 # check whether to enable XHTML-MP support
591 AC_MSG_CHECKING([whether to enable XHTML-MP support])
592 AC_ARG_ENABLE(xhtmlmp,
593               AC_HELP_STRING([--enable-xhtmlmp],
594                              [enable support for XHTML-MP [default=no]]),
595               [],[enable_xhtmlmp="no"])
596 AC_MSG_RESULT([$enable_xhtmlmp])
597
598 # check whether to enable XPath support
599 AC_MSG_CHECKING([whether to enable XPath support])
600 AC_ARG_ENABLE(xpath,
601               AC_HELP_STRING([--enable-xpath],
602                              [enable support for XPath [default=yes]]),
603               [],[enable_xpath="yes"])
604 AC_MSG_RESULT([$enable_xpath])
605
606 # check whether to enable XSLT support
607 AC_MSG_CHECKING([whether to enable XSLT support])
608 AC_ARG_ENABLE(xslt,
609               AC_HELP_STRING([--enable-xslt],
610                              [enable support for XSLT [default=yes]]),
611               [],[enable_xslt="yes"])
612 AC_MSG_RESULT([$enable_xslt])
613
614 # check whether to enable geolocation support
615 AC_MSG_CHECKING([whether to enable geolocation support])
616 AC_ARG_ENABLE(geolocation,
617               AC_HELP_STRING([--enable-geolocation],
618                              [enable support for geolocation [default=no]]),
619               [],[enable_geolocation="no"])
620 AC_MSG_RESULT([$enable_geolocation])
621
622 # check whether to enable client-based geolocation support
623 AC_MSG_CHECKING([whether to enable client-based geolocation support])
624 AC_ARG_ENABLE(client_based_geolocation,
625               AC_HELP_STRING([--enable-client-based-geolocation],
626                              [enable support for client-based geolocation [default=no]]),
627               [],[enable_client_based_geolocation="no"])
628 AC_MSG_RESULT([$enable_client_based_geolocation])
629
630 # check whether to enable MathML support
631 AC_MSG_CHECKING([whether to enable MathML support])
632 AC_ARG_ENABLE(mathml,
633               AC_HELP_STRING([--enable-mathml],
634                              [enable support for MathML [default=no]]),
635               [],[enable_mathml="no"])
636 AC_MSG_RESULT([$enable_mathml])
637
638 # check whether to enable SVG support
639 AC_MSG_CHECKING([whether to enable SVG support])
640 AC_ARG_ENABLE(svg,
641               AC_HELP_STRING([--enable-svg],
642                              [enable support for SVG [default=yes]]),
643               [],[enable_svg="yes"])
644 AC_MSG_RESULT([$enable_svg])
645
646 # check whether to enable WCSS support
647 AC_MSG_CHECKING([whether to enable WCSS support])
648 AC_ARG_ENABLE(wcss,
649               AC_HELP_STRING([--enable-wcss],
650                              [enable support for WCSS [default=no]]),
651               [],[enable_wcss="no"])
652 AC_MSG_RESULT([$enable_wcss])
653
654 # check whether to enable SharedWorkers support
655 AC_MSG_CHECKING([whether to enable SharedWorkers support])
656 AC_ARG_ENABLE(shared_workers,
657               AC_HELP_STRING([--enable-shared-workers],
658                              [enable support for SharedWorkers [default=yes]]),
659               [],[enable_shared_workers="yes"])
660 AC_MSG_RESULT([$enable_shared_workers])
661
662 # check whether to enable Web Workers support
663 AC_MSG_CHECKING([whether to enable Web Workers support])
664 AC_ARG_ENABLE(workers,
665               AC_HELP_STRING([--enable-workers],
666                              [enable support for Web Workers [default=yes]]),
667               [],[enable_workers="yes"])
668 AC_MSG_RESULT([$enable_workers])
669
670 # check whether to enable directory upload support
671 AC_MSG_CHECKING([whether to enable directory upload support])
672 AC_ARG_ENABLE(directory_upload,
673               AC_HELP_STRING([--enable-directory-upload],
674                              [enable support for directory upload [default=no]]),
675               [], [enable_directory_upload="no"])
676 AC_MSG_RESULT([$enable_directory_upload])
677
678 # check whether to enable HTML5 FileSystem API support
679 AC_MSG_CHECKING([whether to enable HTML5 FileSystem API support])
680 AC_ARG_ENABLE(file_system,
681               AC_HELP_STRING([--enable-file-system],
682                              [enable support for HTML5 FileSystem API [default=no]]),
683               [], [enable_file_system="no"])
684 AC_MSG_RESULT([$enable_file_system])
685
686 # check whether to enable Quota API support
687 AC_MSG_CHECKING([whether to enable Quota API support])
688 AC_ARG_ENABLE(quota,
689               AC_HELP_STRING([--enable-quota],
690                              [enable support for Quota API [default=no]]),
691               [], [enable_quota="no"])
692 AC_MSG_RESULT([$enable_quota])
693
694 # turn off svg features if --disable-svg is requested
695 if test "$enable_svg" = "no"; then
696    enable_svg_animation=no
697    enable_svg_fonts=no
698    enable_svg_foreign_object=no
699    enable_svg_as_image=no
700    enable_svg_use=no
701 fi
702
703 # check whether to enable support for SVG animation
704 AC_MSG_CHECKING([whether to enable support for SVG animation])
705 AC_ARG_ENABLE(svg_animation,
706               AC_HELP_STRING([--enable-svg-animation],
707                              [enable support for SVG animation (experimental) [default=yes]]),
708               [],[enable_svg_animation="yes"])
709 AC_MSG_RESULT([$enable_svg_animation])
710
711 # check whether to enable support for filters
712 AC_MSG_CHECKING([whether to enable support for filters])
713 AC_ARG_ENABLE(filters,
714               AC_HELP_STRING([--enable-filters],
715                              [enable support for filters (experimental) [default=yes]]),
716               [],[enable_filters="yes"])
717 AC_MSG_RESULT([$enable_filters])
718
719 # check whether to enable support for SVG fonts
720 AC_MSG_CHECKING([whether to enable support for SVG fonts])
721 AC_ARG_ENABLE(svg_fonts,
722               AC_HELP_STRING([--enable-svg-fonts],
723                              [enable support for SVG fonts (experimental) [default=yes]]),
724               [],[enable_svg_fonts="yes"])
725 AC_MSG_RESULT([$enable_svg_fonts])
726
727 # check whether to enable foreign objects support for SVG
728 AC_MSG_CHECKING([whether to enable support for SVG foreign objects])
729 AC_ARG_ENABLE(svg_foreign_object,
730               AC_HELP_STRING([--enable-svg-foreign-object],
731                              [enable support for SVG foreign objects (experimental) [default=yes]]),
732               [],[enable_svg_foreign_object="yes"])
733 AC_MSG_RESULT([$enable_svg_foreign_object])
734
735 # check whether to enable SVG As Image support
736 AC_MSG_CHECKING([whether to enable SVG as Image support])
737 AC_ARG_ENABLE(svg_as_image,
738               AC_HELP_STRING([--enable-svg-as-image],
739                              [enable SVG as Image support (experimental) [default=yes]]),
740               [],[enable_svg_as_image="yes"])
741 AC_MSG_RESULT([$enable_svg_as_image])
742
743 # check whether to enable SVG USE element support
744 AC_MSG_CHECKING([whether to enable support for SVG use element])
745 AC_ARG_ENABLE(svg_use,
746               AC_HELP_STRING([--enable-svg-use],
747                              [enable SVG use element support (experimental) [default=yes]]),
748               [],[enable_svg_use="yes"])
749 AC_MSG_RESULT([$enable_svg_use])
750
751 # check for SVG features, enabling SVG if necessary
752 if test "$enable_svg_animation" = "yes" || \
753    test "$enable_svg_fonts" = "yes" || \
754    test "$enable_svg_foreign_object" = "yes" || \
755    test "$enable_svg_as_image" = "yes" || \
756    test "$enable_svg_use" = "yes"; then
757    svg_flags=yes
758    if test "$enable_svg" = "no"; then
759        AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
760        enable_svg=yes
761    fi
762 fi
763
764 # check whether to enable Web Socket support
765 AC_MSG_CHECKING([whether to enable Web Sockets support])
766 AC_ARG_ENABLE(web_sockets,
767               AC_HELP_STRING([--enable-web-sockets],
768                              [enable support for Web Sockets [default=yes]]),
769               [],[enable_web_sockets="yes"])
770 AC_MSG_RESULT([$enable_web_sockets])
771
772 # check whether to enable Web Audio support
773 AC_MSG_CHECKING([whether to enable Web Audio support])
774 AC_ARG_ENABLE(web_audio,
775               AC_HELP_STRING([--enable-web-audio],
776                              [enable support for Web Audio [default=no]]),
777               [],[enable_web_audio="no"])
778 AC_MSG_RESULT([$enable_web_audio])
779
780 # check whether to enable Web Timing support
781 AC_MSG_CHECKING([whether to enable Web Timing support])
782 AC_ARG_ENABLE(web_timing,
783               AC_HELP_STRING([--enable-web-timing],
784                              [enable support for Web Timing [default=no]]),
785               [],[enable_web_timing="no"])
786 AC_MSG_RESULT([$enable_web_timing])
787
788 # check whether to enable Blob support
789 AC_MSG_CHECKING([whether to enable Blob support])
790 AC_ARG_ENABLE(blob,
791               AC_HELP_STRING([--enable-blob],
792                              [enable support for Blob [default=yes]]),
793               [],[enable_blob="yes"])
794 AC_MSG_RESULT([$enable_blob])
795
796 # check whether to enable Fast Mobile Scrolling support
797 AC_MSG_CHECKING([whether to enable Fast Mobile Scrolling])
798 AC_ARG_ENABLE(fast_mobile_scrolling,
799               AC_HELP_STRING([--enable-fast-mobile-scrolling],
800                              [enable support for Fast Mobile Scrolling [default=no]]),
801               [],[enable_fast_mobile_scrolling="no"])
802 AC_MSG_RESULT([$enable_fast_mobile_scrolling])
803
804 # check whether to enable code coverage
805 AC_MSG_CHECKING([whether to enable code coverage support])
806 AC_ARG_ENABLE(coverage,
807               AC_HELP_STRING([--enable-coverage],
808                              [enable code coverage support [default=no]]),
809               [],[enable_coverage="no"])
810 AC_MSG_RESULT([$enable_coverage])
811
812 # check whether to enable FastMalloc
813 AC_MSG_CHECKING([whether to enable optimized memory allocator])
814 AC_ARG_ENABLE(fast_malloc,
815               AC_HELP_STRING([--enable-fast-malloc],
816                              [enable optimized memory allocator default=yes, default=no for debug builds]),
817               [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
818 AC_MSG_RESULT([$enable_fast_malloc])
819
820 # check whether to enable debug symbols
821 AC_MSG_CHECKING([whether to enable debug symbols])
822 AC_ARG_ENABLE(debug_symbols,
823               AC_HELP_STRING([--enable-debug-symbols],
824                              [enable debug symbols default=no, default=yes for debug builds]),
825               [],[if test "$enable_debug" = "yes"; then enable_debug_symbols="yes"; else enable_debug_symbols="no"; fi])
826 AC_MSG_RESULT([$enable_debug_symbols])
827
828 # check whether to enable debug features
829 AC_MSG_CHECKING([whether to enable debug features])
830 AC_ARG_ENABLE(debug_features,
831               AC_HELP_STRING([--enable-debug-features],
832                              [enable debug features default=no, default=yes for debug builds]),
833               [],[if test "$enable_debug" = "yes"; then enable_debug_features="yes"; else enable_debug_features="no"; fi])
834 AC_MSG_RESULT([$enable_debug_features])
835
836 AC_MSG_CHECKING([whether to enable JIT compilation])
837 AC_ARG_ENABLE([jit],
838               AC_HELP_STRING([--enable-jit],
839                              [Enable JIT compilation default=yes]),
840               [],[enable_jit="yes"])
841 if test "$enable_jit" = "yes"; then
842     case "$host_cpu" in
843         arm*)
844             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
845             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
846             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
847         ;;
848         i*86|x86_64)
849             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
850             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
851             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
852             AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
853             AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
854             AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
855             case "$host_cpu" in
856                 i*86)
857                     AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
858                 ;;
859                 x86_64)
860                     AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
861                     AC_DEFINE([WTF_USE_ALTERNATE_JSIMMEDIATE], [1], [Use alternate JSImmediate])
862                 ;;
863             esac
864         ;;
865         sh4)
866             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
867             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
868             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
869             AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
870         ;;
871         *)
872             enable_jit="no (CPU '$host_cpu' not supported)"
873         ;;
874     esac
875 else
876         AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
877 fi
878 AC_MSG_RESULT([$enable_jit])
879
880 # Opcode stats
881 AC_MSG_CHECKING([whether to enable opcode stats])
882 AC_ARG_ENABLE([opcode-stats],
883   [AS_HELP_STRING([--enable-opcode-stats], [Enable Opcode statistics (default: disabled)])],
884   [], [enable_opcode_stats=no])
885 AC_MSG_RESULT([$enable_opcode_stats])
886
887 if test "$enable_opcode_stats" = "yes"; then
888   if test "$enable_jit" = "yes"; then
889     AC_MSG_ERROR([JIT must be disabled for Opcode stats to work.])
890   fi
891   AC_DEFINE([ENABLE_OPCODE_STATS], [1], [Define to enable Opcode statistics])
892 fi
893
894 # Link prefetch
895 AC_MSG_CHECKING([whether to enable link prefetch support])
896 AC_ARG_ENABLE([link-prefetch],
897   [AS_HELP_STRING([--enable-link-prefetch], [Enable Link prefetch support (default: disabled)])],
898   [],[enable_link_prefetch=no])
899 AC_MSG_RESULT([$enable_link_prefetch])
900
901 if test "$enable_link_prefetch" = "yes"; then 
902   AC_DEFINE([ENABLE_LINK_PREFETCH], [1], [Define to enable link prefetch support])
903 fi
904
905 # GObject Introspection
906 AC_MSG_CHECKING([whether to enable GObject introspection support])
907 AC_ARG_ENABLE([introspection],
908   [AS_HELP_STRING([--enable-introspection],[Enable GObject introspection (default: disabled)])],
909   [],[enable_introspection=no])
910 AC_MSG_RESULT([$enable_introspection])
911
912 # check whether to enable animation API
913 AC_MSG_CHECKING([whether to enable Animation API support])
914 AC_ARG_ENABLE(animation_api,
915               AC_HELP_STRING([--enable-animation-api],
916                              [enable support for Animation API (experimental) [default=no]]),
917               [], [enable_animation_api="no"])
918 AC_MSG_RESULT([$enable_animation_api])
919
920 # check whether to enable touch icon loading 
921 AC_MSG_CHECKING([whether to enable touch icon loading])
922 AC_ARG_ENABLE(touch_icon_loading,
923               AC_HELP_STRING([--enable-touch-icon-loading],
924                              [enable support for loading touch icons [default=no]]),
925               [], [enable_touch_icon_loading="no"])
926 AC_MSG_RESULT([$enable_touch_icon_loading])
927
928 # check whether to enable Register Protocol Handler support
929 AC_MSG_CHECKING([whether to enable Register Protocol Handler])
930 AC_ARG_ENABLE(register_protocol_handler,
931               AC_HELP_STRING([--enable-register-protocol-handler],
932                              [enable support for Register Protocol Handler (experimental) [default=no]]),
933               [],[enable_register_protocol_handler="no"])
934 AC_MSG_RESULT([$enable_register_protocol_handler])
935
936 # check whether to enable DeviceOrientation support
937 AC_MSG_CHECKING([whether to enable DeviceOrientation])
938 AC_ARG_ENABLE(device_orientation,
939               AC_HELP_STRING([--enable-device-orientation],
940                              [enable support for DeviceOrientation (experimental and incomplete) [default=no]]),
941               [],[enable_device_orientation="no"])
942 AC_MSG_RESULT([$enable_device_orientation])
943
944 G_IR_SCANNER=
945 G_IR_COMPILER=
946 G_IR_GENERATE=
947 GIRDIR=
948 GIRTYPELIBDIR=
949
950 if test "$enable_introspection" = "yes"; then
951   GOBJECT_INTROSPECTION_REQUIRED=0.9.5
952   PKG_CHECK_MODULES([INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
953   
954   G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
955   G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
956   G_IR_GENERATE="$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)"
957   AC_DEFINE([ENABLE_INTROSPECTION],[1],[Define to enable GObject introspection support])
958 fi
959
960 AC_SUBST([G_IR_SCANNER])
961 AC_SUBST([G_IR_COMPILER])
962 AC_SUBST([G_IR_GENERATE])
963
964 # determine the font backend
965 AC_MSG_CHECKING([the font backend to use])
966 AC_ARG_WITH(font_backend,
967             AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
968                            [Select font backend [default=freetype]]),
969             [],[with_font_backend="freetype"])
970
971 case "$with_font_backend" in
972      freetype|pango) ;;
973      *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
974 esac
975 AC_MSG_RESULT([$with_font_backend])
976
977 if test "$host_cpu" = "sh4"; then
978    CXXFLAGS="$CXXFLAGS -mieee -w"
979    CFLAGS="$CFLAGS -mieee -w"
980 fi
981
982 # Add '-g' flag to gcc to build with debug symbols
983 if test "$enable_debug_symbols" = "yes"; then
984    CXXFLAGS="$CXXFLAGS -g"
985    CFLAGS="$CFLAGS -g"
986 fi
987
988 if test "$enable_debug_features" = "no"; then
989    AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
990 fi
991
992 # Add the appropriate 'O' level for optimized builds
993 if test "$enable_optimizations" = "yes"; then
994    CXXFLAGS="$CXXFLAGS -O2"
995    CFLAGS="$CFLAGS -O2"
996 else
997    CXXFLAGS="$CXXFLAGS -O0"
998    CFLAGS="$CFLAGS -O0"
999 fi
1000
1001 PKG_CHECK_MODULES([LIBSOUP],
1002                   [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
1003 AC_SUBST([LIBSOUP_CFLAGS])
1004 AC_SUBST([LIBSOUP_LIBS])
1005
1006 # check if FreeType/FontConfig are available
1007 if test "$with_font_backend" = "freetype"; then
1008    if test "$with_target" = "directfb"; then
1009    PKG_CHECK_MODULES([FREETYPE],
1010                      [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
1011                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
1012    else
1013    PKG_CHECK_MODULES([FREETYPE],
1014                      [cairo-ft
1015                      fontconfig >= $FONTCONFIG_REQUIRED_VERSION
1016                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
1017    fi
1018    AC_SUBST([FREETYPE_CFLAGS])
1019    AC_SUBST([FREETYPE_LIBS])
1020 fi
1021
1022 # check if SQLite3 is available. Error out only if one of the
1023 # features hard-depending on it is enabled while SQLite3 is
1024 # unavailable.
1025 PKG_CHECK_MODULES([SQLITE3],
1026                   [sqlite3 >= $SQLITE_REQUIRED_VERSION],
1027                   [sqlite3_has_pkg_config=yes],
1028                   [sqlite3_has_pkg_config=no])
1029 if test "$sqlite3_has_pkg_config" = "no"; then
1030    AC_SEARCH_LIBS([sqlite3_open16], [sqlite3],
1031                   [sqlite3_found=yes;SQLITE3_LIBS="$LIBS";SQLITE3_CFLAGS="-I $srcdir/WebKitLibraries/WebCoreSQLite3"],
1032                   [sqlite3_found=no])
1033 fi
1034 AC_SUBST([SQLITE3_CFLAGS])
1035 AC_SUBST([SQLITE3_LIBS])
1036
1037 if (test "$sqlite3_found" = "no") && (test "$enable_icon_database" = "yes" || \
1038    test "$enable_database" = "yes" || \
1039    test "$enable_offline_web_applications" = "yes" || \
1040    test "$enable_dom_storage" = "yes"); then
1041    AC_MSG_ERROR([SQLite3 is required for the Database related features])
1042 fi
1043
1044 # check if libxslt is available
1045 if test "$enable_xslt" = "yes"; then
1046    PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
1047    AC_SUBST([LIBXSLT_CFLAGS])
1048    AC_SUBST([LIBXSLT_LIBS])
1049 fi
1050
1051 # check if geoclue is available
1052 if test "$enable_geolocation" = "yes"; then
1053     PKG_CHECK_MODULES([GEOCLUE], [geoclue])
1054     AC_SUBST([GEOCLUE_CFLAGS])
1055     AC_SUBST([GEOCLUE_LIBS])
1056 fi
1057
1058 # check for XRender under Linux/Unix. Some linkers require explicit
1059 # linkage (like GNU Gold), so we cannot rely on GTK+ pulling XRender
1060 if test "$os_win32" = "no"; then
1061    PKG_CHECK_MODULES([XRENDER], [xrender])
1062    AC_SUBST([XRENDER_CFLAGS])
1063    AC_SUBST([XRENDER_LIBS])
1064 fi
1065
1066 # check if gstreamer is available
1067 if test "$enable_video" = "yes"; then
1068    PKG_CHECK_MODULES([GSTREAMER],
1069                      [gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
1070                      gstreamer-app-0.10
1071                      gstreamer-base-0.10
1072                      gstreamer-interfaces-0.10
1073                      gstreamer-pbutils-0.10
1074                      gstreamer-plugins-base-0.10 >= $GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION
1075                      gstreamer-video-0.10],
1076                      [have_gstreamer=yes])
1077
1078    AC_SUBST([GSTREAMER_CFLAGS])
1079    AC_SUBST([GSTREAMER_LIBS])
1080 fi
1081
1082 # check for code coverage support
1083 if test "$enable_coverage" = "yes"; then
1084    COVERAGE_CFLAGS="-MD"
1085    COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
1086    AC_SUBST([COVERAGE_CFLAGS])
1087    AC_SUBST([COVERAGE_LDFLAGS])
1088 fi
1089
1090 # check for HTML features
1091 if test "$enable_video" = "yes"; then
1092     html_flags=yes
1093 fi
1094
1095 # WebKit2
1096 AC_MSG_CHECKING([whether to build Webkit2])
1097 AC_ARG_ENABLE(webkit2,
1098             AC_HELP_STRING([--enable-webkit2],
1099                 [build webkit2 [default=no]]),
1100                 [], [enable_webkit2="no"])
1101 AC_MSG_RESULT([$enable_webkit2])
1102 if test "$enable_webkit2" = "yes"; then
1103    if test "$GTK_API_VERSION" = "2.0"; then
1104       AC_MSG_ERROR([WebKit2 requires GTK+ 3.x, use --with-gtk=3.0])
1105    fi
1106 fi
1107
1108 # Plugin Process
1109 AC_MSG_CHECKING([whether to build plugin process for WebKit2])
1110 AC_ARG_ENABLE(plugin_process,
1111             AC_HELP_STRING([--enable-plugin-process],
1112                            [build plugin process for WebKit2 [default=yes]]),
1113                            [], [enable_plugin_process="yes"])
1114 # Build the plugin process only when building webkit2.
1115 if test "$enable_webkit2" = "no"; then
1116     enable_plugin_process=no
1117 fi
1118
1119 # Make sure we have gtk+ 2.x to build the plugin process
1120 if test "$enable_plugin_process" = "yes"; then
1121    PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= $GTK2_REQUIRED_VERSION gail >= $GAIL2_REQUIRED_VERSION)
1122 fi
1123
1124 AC_SUBST(GTK2_CFLAGS)
1125 AC_SUBST(GTK2_LIBS)
1126
1127 AC_MSG_RESULT([$enable_plugin_process])
1128
1129 GTK_DOC_CHECK([1.10])
1130
1131 # OS conditionals
1132 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
1133 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
1134 AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
1135 AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
1136 AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
1137
1138 # target conditionals
1139 AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
1140 AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
1141 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
1142 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
1143
1144 # Unicode backend conditionals
1145 AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
1146 AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
1147
1148 # Font backend conditionals
1149 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
1150 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
1151
1152 # GStreamer feature conditional
1153 AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"])
1154
1155 # WebKit feature conditionals
1156 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug_features" = "yes"])
1157 AM_CONDITIONAL([ENABLE_3D_RENDERING],[test "$enable_3d_rendering" = "yes"])
1158 AM_CONDITIONAL([ENABLE_WEBGL],[test "$enable_webgl" = "yes"])
1159 AM_CONDITIONAL([ENABLE_BLOB],[test "$enable_blob" = "yes"])
1160 AM_CONDITIONAL([ENABLE_METER_TAG],[test "$enable_meter_tag" = "yes"])
1161 AM_CONDITIONAL([ENABLE_PAGE_VISIBILITY_API],[test "$enable_page_visibility_api" = "yes"])
1162 AM_CONDITIONAL([ENABLE_PROGRESS_TAG],[test "$enable_progress_tag" = "yes"])
1163 AM_CONDITIONAL([ENABLE_CHANNEL_MESSAGING],[test "$enable_channel_messaging" = "yes"])
1164 AM_CONDITIONAL([ENABLE_JAVASCRIPT_DEBUGGER],[test "$enable_javascript_debugger" = "yes"])
1165 AM_CONDITIONAL([ENABLE_OFFLINE_WEB_APPLICATIONS],[test "$enable_offline_web_applications" = "yes"])
1166 AM_CONDITIONAL([ENABLE_DIRECTORY_UPLOAD],[test "$enable_directory_upload" = "yes"])
1167 AM_CONDITIONAL([ENABLE_DATAGRID],[test "$enable_datagrid" = "yes"])
1168 AM_CONDITIONAL([ENABLE_DATA_TRANSFER_ITEMS],[test "$enable_data_transfer_items" = "yes"])
1169 AM_CONDITIONAL([ENABLE_DOM_STORAGE],[test "$enable_dom_storage" = "yes"])
1170 AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
1171 AM_CONDITIONAL([ENABLE_DATALIST],[test "$enable_datalist" = "yes"])
1172 AM_CONDITIONAL([ENABLE_DETAILS],[test "$enable_details" = "yes"])
1173 AM_CONDITIONAL([ENABLE_EVENTSOURCE],[test "$enable_eventsource" = "yes"])
1174 AM_CONDITIONAL([ENABLE_FAST_MOBILE_SCROLLING],[test "$enable_fast_mobile_scrolling" = "yes"])
1175 AM_CONDITIONAL([ENABLE_FILE_SYSTEM],[test "$enable_file_system" = "yes"])
1176 AM_CONDITIONAL([ENABLE_QUOTA],[test "$enable_quota" = "yes"])
1177 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
1178 AM_CONDITIONAL([ENABLE_IMAGE_RESIZER],[test "$enable_image_resizer" = "yes"])
1179 AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
1180 AM_CONDITIONAL([ENABLE_INPUT_COLOR],[test "$enable_input_color" = "yes"])
1181 AM_CONDITIONAL([ENABLE_INPUT_SPEECH],[test "$enable_input_speech" = "yes"])
1182 AM_CONDITIONAL([ENABLE_XHTMLMP],[test "$enable_xhtmlmp" = "yes"])
1183 AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
1184 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
1185 AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
1186 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
1187 AM_CONDITIONAL([ENABLE_CLIENT_BASED_GEOLOCATION], [test "$enable_client_based_geolocation" = "yes"])
1188 AM_CONDITIONAL([ENABLE_MATHML], [test "$enable_mathml" = "yes"])
1189 AM_CONDITIONAL([ENABLE_MHTML], [test "$enable_mhtml" = "yes"])
1190 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
1191 AM_CONDITIONAL([ENABLE_MEDIA_STATISTICS],[test "$enable_media_statistics" = "yes"])
1192 AM_CONDITIONAL([ENABLE_VIDEO_TRACK],[test "$enable_video_track" = "yes"])
1193 AM_CONDITIONAL([ENABLE_FULLSCREEN_API],[test "$enable_fullscreen_api" = "yes"])
1194 AM_CONDITIONAL([ENABLE_MEDIA_STREAM],[test "$enable_media_stream" = "yes"])
1195 AM_CONDITIONAL([ENABLE_NOTIFICATIONS],[test "$enable_notifications" = "yes"])
1196 AM_CONDITIONAL([ENABLE_ORIENTATION_EVENTS],[test "$enable_orientation_events" = "yes"])
1197 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
1198 AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
1199 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
1200 AM_CONDITIONAL([ENABLE_SVG_FOREIGN_OBJECT],[test "$enable_svg_foreign_object" = "yes"])
1201 AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
1202 AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use" = "yes"])
1203 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
1204 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
1205 AM_CONDITIONAL([ENABLE_WCSS],[test "$enable_wcss" = "yes"])
1206 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_workers" = "yes"])
1207 AM_CONDITIONAL([ENABLE_SHARED_WORKERS],[test "$enable_shared_workers" = "yes"])
1208 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
1209 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
1210 AM_CONDITIONAL([ENABLE_WEB_SOCKETS],[test "$enable_web_sockets" = "yes"])
1211 AM_CONDITIONAL([ENABLE_WEB_AUDIO],[test "$enable_web_audio" = "yes"])
1212 AM_CONDITIONAL([ENABLE_WEB_TIMING],[test "$enable_web_timing" = "yes"])
1213 AM_CONDITIONAL([ENABLE_OPCODE_STATS],[test "$enable_opcode_stats" = "yes"])
1214 AM_CONDITIONAL([ENABLE_WEBKIT2],[test "$enable_webkit2" = "yes"])
1215 AM_CONDITIONAL([ENABLE_PLUGIN_PROCESS],[test "$enable_plugin_process" = "yes"])
1216 AM_CONDITIONAL([ENABLE_SPELLCHECK],[test "$enable_spellcheck" = "yes"])
1217 AM_CONDITIONAL([ENABLE_ANIMATION_API],[test "$enable_animation_api" = "yes"])
1218 AM_CONDITIONAL([ENABLE_TOUCH_ICON_LOADING],[test "$enable_touch_icon_loading" = "yes"])
1219 AM_CONDITIONAL([ENABLE_REGISTER_PROTOCOL_HANDLER],[test "$enable_register_protocol_handler" = "yes"])
1220 AM_CONDITIONAL([ENABLE_DEVICE_ORIENTATION],[test "$enable_device_orientation" = "yes"])
1221
1222 # Gtk conditionals
1223 AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
1224
1225 AC_CONFIG_FILES([
1226 GNUmakefile
1227 ])
1228  
1229
1230 AC_CONFIG_FILES([
1231 Source/WebKit/gtk/webkit/webkitversion.h
1232 Source/WebKit/gtk/docs/GNUmakefile
1233 Source/WebKit/gtk/docs/version.xml
1234 ])
1235
1236 AC_CONFIG_FILES([
1237 Source/WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/webkit.pc.in
1238 Source/WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:Source/WebKit/gtk/JSCore.gir.in
1239 Source/WebKit/gtk/org.webkitgtk-${WEBKITGTK_API_VERSION}.gschema.xml:Source/WebKit/gtk/org.webkitgtk.gschema.xml.in
1240 Source/WebKit/gtk/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/javascriptcoregtk.pc.in
1241 ]
1242 ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1243 )
1244
1245 if test "$enable_webkit2" = "yes"; then
1246     AC_CONFIG_FILES([
1247     Source/WebKit2/gtk/${WEBKITGTK_PC_NAME}2-${WEBKITGTK_API_VERSION}.pc:Source/WebKit2/gtk/webkit2.pc.in
1248     ]
1249     ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1250     )
1251 fi
1252
1253 AC_OUTPUT
1254
1255 echo "
1256 WebKit was configured with the following options:
1257
1258 Build configuration:
1259  Enable debugging (slow)                                  : $enable_debug
1260  Compile with debug symbols (slow)                        : $enable_debug_symbols
1261  Enable debug features (slow)                             : $enable_debug_features
1262  Enable GCC build optimization                            : $enable_optimizations
1263  Code coverage support                                    : $enable_coverage
1264  Unicode backend                                          : $with_unicode_backend
1265  Font backend                                             : $with_font_backend
1266  Optimized memory allocator                               : $enable_fast_malloc
1267 Features:
1268  3D Rendering                                             : $enable_3d_rendering
1269  WebGL                                                    : $enable_webgl
1270  Blob support                                             : $enable_blob
1271  DeviceOrientation support                                : $enable_device_orientation
1272  Directory upload                                         : $enable_directory_upload
1273  Fast Mobile Scrolling                                    : $enable_fast_mobile_scrolling
1274  JIT compilation                                          : $enable_jit
1275  Filters support                                          : $enable_filters
1276  Geolocation support                                      : $enable_geolocation
1277  Client-based geolocation support                         : $enable_client_based_geolocation
1278  JavaScript debugger/profiler support                     : $enable_javascript_debugger
1279  MathML support                                           : $enable_mathml
1280  Media statistics                                         : $enable_media_statistics
1281  HTML5 offline web applications support                   : $enable_offline_web_applications
1282  HTML5 channel messaging support                          : $enable_channel_messaging
1283  HTML5 meter element support                              : $enable_meter_tag
1284  Page Visibility API support                              : $enable_page_visibility_api
1285  HTML5 progress element support                           : $enable_progress_tag
1286  HTML5 client-side session and persistent storage support : $enable_dom_storage
1287  HTML5 client-side database storage support               : $enable_database
1288  HTML5 datagrid support                                   : $enable_datagrid
1289  HTML5 data transfer items support                        : $enable_data_transfer_items
1290  HTML5 FileSystem API support                             : $enable_file_system
1291  Quota API support                                        : $enable_quota
1292  HTML5 sandboxed iframe support                           : $enable_sandbox
1293  HTML5 server-sent events support                         : $enable_eventsource
1294  HTML5 video element support                              : $enable_video
1295  HTML5 track element support                              : $enable_video_track
1296  Fullscreen API support                                   : $enable_fullscreen_api
1297  Media stream support                                     : $enable_media_stream
1298  Icon database support                                    : $enable_icon_database
1299  Image resizer support                                    : $enable_image_resizer
1300  Link prefetch support                                    : $enable_link_prefetch
1301  Opcode stats                                             : $enable_opcode_stats
1302  SharedWorkers support                                    : $enable_shared_workers
1303  Color input support                                      : $enable_input_color
1304  Speech input support                                     : $enable_input_speech
1305  SVG support                                              : $enable_svg
1306  SVG animation support                                    : $enable_svg_animation
1307  SVG fonts support                                        : $enable_svg_fonts
1308  SVG foreign object support                               : $enable_svg_foreign_object
1309  SVG as image support                                     : $enable_svg_as_image
1310  SVG use element support                                  : $enable_svg_use
1311  WCSS support                                             : $enable_wcss
1312  Web Audio support                                        : $enable_web_audio
1313  Web Sockets support                                      : $enable_web_sockets
1314  Web Timing support                                       : $enable_web_timing
1315  Web Workers support                                      : $enable_workers
1316  XHTML-MP support                                         : $enable_xhtmlmp
1317  XPATH support                                            : $enable_xpath
1318  XSLT support                                             : $enable_xslt
1319  Spellcheck support                                       : $enable_spellcheck
1320  Animation API                                            : $enable_animation_api
1321  Touch Icon Loading support                               : $enable_touch_icon_loading
1322  Register Protocol Handler support                        : $enable_register_protocol_handler
1323
1324 GTK+ configuration:
1325  GTK+ version                                             : $with_gtk
1326  GDK target                                               : $with_target
1327  Hildon UI extensions                                     : $with_hildon
1328  Introspection support                                    : $enable_introspection
1329  WebKit2 support                                          : $enable_webkit2
1330  WebKit2 plugin process                                   : $enable_plugin_process
1331 "
1332 if test "$with_unicode_backend" = "glib"; then
1333    echo "     >> WARNING: the glib-based unicode backend is slow and incomplete <<"
1334    echo
1335    echo
1336 fi