https://bugs.webkit.org/show_bug.cgi?id=59846
[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], [0])
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=6:0:6
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([4.6.0],[ge],[$CXX_VERSION],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 case "$with_gtk" in
200      2.0) GTK_REQUIRED_VERSION=2.10
201           GTK_API_VERSION=2.0
202           WEBKITGTK_API_MAJOR_VERSION=1
203           WEBKITGTK_API_MINOR_VERSION=0
204           WEBKITGTK_API_VERSION=1.0
205           WEBKITGTK_PC_NAME=webkit
206           GAIL_PC_NAME=gail
207           GAIL_REQUIRED_VERSION=1.8
208           ;;
209      3.0) GTK_REQUIRED_VERSION=3.0
210           GTK_API_VERSION=3.0
211           WEBKITGTK_API_MAJOR_VERSION=3
212           WEBKITGTK_API_MINOR_VERSION=0
213           WEBKITGTK_API_VERSION=3.0
214           WEBKITGTK_PC_NAME=webkitgtk
215           GAIL_PC_NAME=gail-3.0
216           GAIL_REQUIRED_VERSION=3.0
217           ;;
218 esac
219
220 AC_SUBST([WEBKITGTK_API_MAJOR_VERSION])
221 AC_SUBST([WEBKITGTK_API_MINOR_VERSION])
222 AC_SUBST([WEBKITGTK_API_VERSION])
223 AC_SUBST([WEBKITGTK_PC_NAME])
224 AC_SUBST([GTK_API_VERSION])
225 AM_CONDITIONAL([GTK_API_VERSION_2],[test "$GTK_API_VERSION" = "2.0"])
226
227 # determine the GDK/GTK+ target
228 AC_MSG_CHECKING([the target windowing system])
229 AC_ARG_WITH(target,
230             AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
231                            [Select webkit target [default=x11]]),
232             [],[with_target="x11"])
233
234 case "$with_target" in
235      x11|win32|quartz|directfb) ;;
236      *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
237 esac
238
239 AC_MSG_RESULT([$with_target])
240
241 AC_MSG_CHECKING([for Hildon UI extensions])
242 AC_ARG_WITH(hildon,
243             AC_HELP_STRING([--with-hildon],
244                            [Use Hildon UI extensions [default=no]]),
245             [],[with_hildon="no"])
246 AC_MSG_RESULT([$with_hildon])
247
248 if test "$with_hildon" = "yes"; then
249     HILDON_CPPFLAGS="-DMAEMO_CHANGES"
250     PKG_CHECK_MODULES([HILDON], [hildon-1])
251     AC_SUBST([HILDON_CPPFLAGS])
252     AC_SUBST([HILDON_CFLAGS])
253     AC_SUBST([HILDON_LIBS])
254 fi
255
256 # minimum base dependencies
257 LIBSOUP_REQUIRED_VERSION=2.33.6
258 CAIRO_REQUIRED_VERSION=1.6
259 FONTCONFIG_REQUIRED_VERSION=2.4
260 FREETYPE2_REQUIRED_VERSION=9.0
261 LIBXML_REQUIRED_VERSION=2.6
262
263 # minimum GTK+ base dependencies
264 PANGO_REQUIRED_VERSION=1.12
265
266 # optional modules
267 LIBXSLT_REQUIRED_VERSION=1.1.7
268 SQLITE_REQUIRED_VERSION=3.0
269 GSTREAMER_REQUIRED_VERSION=0.10
270 GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=0.10.25
271 ENCHANT_REQUIRED_VERSION=0.22
272
273 # Available modules
274 #
275 # glib - glib and includes gthread
276 # unicode - check and identify which unicode backend to use
277 #
278 # todo: webcore gtk
279 WEBKIT_CHECK_DEPENDENCIES([glib unicode])
280
281 GETTEXT_PACKAGE=$PACKAGE-$GTK_API_VERSION
282 AC_SUBST(GETTEXT_PACKAGE)
283 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
284                    [The gettext catalog name])
285
286 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
287 AC_SUBST(LIBXML_CFLAGS)
288 AC_SUBST(LIBXML_LIBS)
289
290 PKG_CHECK_MODULES(PANGO, 
291                   [pango >= $PANGO_REQUIRED_VERSION
292                    pangoft2])
293 AC_SUBST(PANGO_CFLAGS)
294 AC_SUBST(PANGO_LIBS)
295
296 AC_MSG_CHECKING([whether to enable spellcheck support])
297 AC_ARG_ENABLE([spellcheck],
298   [AS_HELP_STRING([--enable-spellcheck],[enable support for spellcheck])],
299   [],[enable_spellcheck="yes"])
300 AC_MSG_RESULT([$enable_spellcheck])
301
302 if test "$enable_spellcheck" = "yes"; then
303 PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED_VERSION, [], [enable_spellcheck="no"])
304 AC_SUBST(ENCHANT_CFLAGS)
305 AC_SUBST(ENCHANT_LIBS)
306 fi
307
308 PKG_CHECK_MODULES(GAIL, $GAIL_PC_NAME >= $GAIL_REQUIRED_VERSION)
309 AC_SUBST(GAIL_CFLAGS)
310 AC_SUBST(GAIL_LIBS)
311
312 # check for target-specific dependencies
313 if test "$with_target" = "directfb"; then
314    PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION)
315    PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION)
316    AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB])
317 else
318    PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
319    PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
320
321    if test "$with_target" = "x11" && test "$os_win32" = "no"; then
322       # check for XT
323       PKG_CHECK_MODULES([XT],
324                         [xt],
325                         [xt_has_pkg_config=yes],
326                         [xt_has_pkg_config=no])
327       # some old versions of Xt do not provide xt.pc, so try to link against Xt
328       # and if it's installed fall back to just adding -lXt
329       if test "$xt_has_pkg_config" = "no"; then
330          # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
331          # we don't care about the XtOpenDisplay symbol but only about the
332          # existence of libXt
333          AC_CHECK_LIB([Xt], [XtOpenDisplay],
334                       [XT_CFLAGS=""; XT_LIBS="-lXt"],
335                       [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
336       fi
337       AC_SUBST([XT_CFLAGS])
338       AC_SUBST([XT_LIBS])
339       AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
340    fi
341 fi
342 AC_SUBST(GTK_CFLAGS)
343 AC_SUBST(GTK_LIBS)
344 AC_SUBST(CAIRO_CFLAGS)
345 AC_SUBST(CAIRO_LIBS)
346
347 # check whether to build with debugging enabled
348 AC_MSG_CHECKING([whether to do a debug build])
349 AC_ARG_ENABLE(debug,
350               AC_HELP_STRING([--enable-debug],
351                              [turn on debugging [default=no]]),
352               [],[enable_debug="no"])
353 AC_MSG_RESULT([$enable_debug])
354
355 # check whether to enable optimized builds
356 AC_MSG_CHECKING([whether to enable optimized builds])
357 AC_ARG_ENABLE(optimizations,
358               AC_HELP_STRING([--enable-optimizations],
359                              [turn on optimize builds (GCC only)
360                              [default=yes]]),
361               [enable_optimizations=$enableval],
362               [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
363 AC_MSG_RESULT([$enable_optimizations])
364
365 # check whether to enable 3D transforms support
366 AC_MSG_CHECKING([whether to enable support for 3D Transforms])
367 AC_ARG_ENABLE(3d_transforms,
368               AC_HELP_STRING([--enable-3d-transforms],
369                              [enable support for 3D transforms [default=no]]),
370               [],[enable_3d_transforms="no"])
371 AC_MSG_RESULT([$enable_3d_transforms])
372
373 # check whether to enable WebGL support
374 AC_MSG_CHECKING([whether to enable WebGL support])
375 AC_ARG_ENABLE(webgl,
376               AC_HELP_STRING([--enable-webgl],
377                              [enable support for WebGL (experimental) [default=no]]),
378               [], [enable_webgl="no"])
379 AC_MSG_RESULT([$enable_webgl])
380
381 if test "$enable_webgl" = "yes"; then
382     AC_CHECK_HEADERS([GL/gl.h], [], AC_MSG_ERROR([OpenGL header not found]))
383     AC_CHECK_HEADERS([GL/glx.h], [], AC_MSG_ERROR([GLX header not found]))
384     OPENGL_LIBS=-lGL
385 fi
386 AC_SUBST([OPENGL_LIBS])
387
388 # check whether to enable channel messaging support
389 AC_MSG_CHECKING([whether to enable HTML5 Channel Messaging support])
390 AC_ARG_ENABLE(channel_messaging,
391               AC_HELP_STRING([--enable-channel-messaging],
392                              [enable HTML5 channel messaging support [default=yes]]),
393               [],[enable_channel_messaging="yes"])
394 AC_MSG_RESULT([$enable_channel_messaging])
395
396 # check whether to enable notifications
397 AC_MSG_CHECKING([whether to enable notifications])
398 AC_ARG_ENABLE(notifications,
399               AC_HELP_STRING([--enable-notifications],
400                              [enable notifications [default=no]]),
401               [],[enable_notifications="no"])
402 AC_MSG_RESULT([$enable_notifications])
403
404 # check whether to enable the meter tag
405 AC_MSG_CHECKING([whether to enable HTML5 meter tag])
406 AC_ARG_ENABLE(meter_tag,
407               AC_HELP_STRING([--enable-meter-tag],
408                              [enable HTML5 meter [default=yes]]),
409               [],[enable_meter_tag="yes"])
410 AC_MSG_RESULT([$enable_meter_tag])
411
412 # check whether to enable page visibility API.
413 AC_MSG_CHECKING([whether to enable Page Visibility API support])
414 AC_ARG_ENABLE(page_visibility_api,
415               AC_HELP_STRING([--enable-page-visibility-api],
416                              [enable page visibility api[default=no]]),
417               [],[enable_page_visibility_api="no"])
418 AC_MSG_RESULT([$enable_page_visibility_api])
419
420 # check whether to enable the progress tag
421 AC_MSG_CHECKING([whether to enable HTML5 progress tag])
422 AC_ARG_ENABLE(progress_tag,
423               AC_HELP_STRING([--enable-progress-tag],
424                              [enable HTML5 progress [default=yes]]),
425               [],[enable_progress_tag="yes"])
426 AC_MSG_RESULT([$enable_progress_tag])
427
428 # check whether to enable JavaScript debugger/profiler support
429 AC_MSG_CHECKING([whether to enable JavaScript debugger/profiler support])
430 AC_ARG_ENABLE(javascript_debugger,
431               AC_HELP_STRING([--enable-javascript-debugger],
432                              [enable JavaScript debugger/profiler support [default=yes]]),
433               [],[enable_javascript_debugger="yes"])
434 AC_MSG_RESULT([$enable_javascript_debugger])
435
436 # check whether to build with datagrid support
437 AC_MSG_CHECKING([whether to enable HTML5 datagrid support])
438 AC_ARG_ENABLE(datagrid,
439               AC_HELP_STRING([--enable-datagrid],
440                              [enable HTML5 datagrid support [default=no]]),
441               [],[enable_datagrid="no"])
442 AC_MSG_RESULT([$enable_datagrid])
443
444 # check whether to build with data transfer items support
445 AC_MSG_CHECKING([whether to enable HTML5 data transfer items support])
446 AC_ARG_ENABLE(data_transfer_items,
447               AC_HELP_STRING([--enable-data-transfer-items],
448                              [enable HTML5 data transfer items support [default=no]]),
449               [],[enable_data_transfer_items="no"])
450 AC_MSG_RESULT([$enable_data_transfer_items])
451
452 # check whether to enable HTML5 Offline Web Applications support
453 AC_MSG_CHECKING([whether to enable HTML5 offline web applications support])
454 AC_ARG_ENABLE(offline_web_applications,
455               AC_HELP_STRING([--enable-offline-web-applications],
456                              [enable HTML5 offline web applications support [default=yes]]),
457               [],[enable_offline_web_applications="yes"])
458 AC_MSG_RESULT([$enable_offline_web_applications])
459
460 # check whether to enable HTML5 client-side session and persitent storage support
461 AC_MSG_CHECKING([whether to enable HTML5 client-side session and persistent storage support])
462 AC_ARG_ENABLE(dom_storage,
463               AC_HELP_STRING([--enable-dom-storage],
464                              [enable HTML5 client-side session and persistent storage support [default=yes]]),
465               [],[enable_dom_storage="yes"])
466 AC_MSG_RESULT([$enable_dom_storage])
467
468 # check whether to enable the indexed database API
469 AC_MSG_CHECKING([whether to enable the indexed database API])
470 AC_ARG_ENABLE(indexed_database,
471               AC_HELP_STRING([--enable-indexed-database],
472                              [enable the indexed database API [default=no]]),
473               [],[enable_indexed_database="no"])
474 AC_MSG_RESULT([$enable_indexed_database])
475
476 # check whether to enable the speech input API
477 AC_MSG_CHECKING([whether to enable the speech input API])
478 AC_ARG_ENABLE(input_speech,
479               AC_HELP_STRING([--enable-input-speech],
480                              [enable the speech input API [default=no]]),
481               [],[enable_input_speech="no"])
482 AC_MSG_RESULT([$enable_input_speech])
483
484 # check whether to build with database support
485 AC_MSG_CHECKING([whether to enable HTML5 client-side database storage support])
486 AC_ARG_ENABLE(database,
487               AC_HELP_STRING([--enable-database],
488                              [enable HTML5 client-side database storage support [default=yes]]),
489               [],[enable_database="yes"])
490 AC_MSG_RESULT([$enable_database])
491
492 # check whether to build with server-sent events support
493 AC_MSG_CHECKING([whether to enable HTML5 server-sent events support])
494 AC_ARG_ENABLE(eventsource,
495               AC_HELP_STRING([--enable-eventsource],
496                              [enable HTML5 server-sent events support [default=yes]]),
497               [],[enable_eventsource="yes"])
498 AC_MSG_RESULT([$enable_eventsource])
499
500 # check whether to build with icon database support
501 AC_MSG_CHECKING([whether to enable icon database support])
502 AC_ARG_ENABLE(icon_database,
503               AC_HELP_STRING([--enable-icon-database],
504                              [enable icon database [default=yes]]),
505               [],[enable_icon_database="yes"])
506 AC_MSG_RESULT([$enable_icon_database])
507
508 # check whether to build with image resizer API support
509 AC_MSG_CHECKING([whether to enable image resizer API support])
510 AC_ARG_ENABLE(image_resizer,
511               AC_HELP_STRING([--enable-image-resizer],
512                              [enable image resizer [default=no]]),
513               [],[enable_image_resizer="no"])
514 AC_MSG_RESULT([$enable_image_resizer])
515
516 # check whether to enable HTML5 datalist support
517 AC_MSG_CHECKING([whether to enable HTML5 datalist support])
518 AC_ARG_ENABLE(datalist,
519               AC_HELP_STRING([--enable-datalist],
520                              [enable HTML5 datalist support [default=yes]]),
521               [],[enable_datalist="yes"])
522 AC_MSG_RESULT([$enable_datalist])
523
524 # check whether to enable HTML5 sandbox iframe support
525 AC_MSG_CHECKING([whether to enable HTML5 sandboxed iframe support])
526 AC_ARG_ENABLE(sandbox,
527               AC_HELP_STRING([--enable-sandbox],
528                              [enable HTML5 sandboxed iframe support [default=yes]]),
529               [],[enable_sandbox="yes"])
530 AC_MSG_RESULT([$enable_sandbox])
531
532 # check whether to enable HTML5 audio/video support
533 AC_MSG_CHECKING([whether to enable HTML5 video support])
534 AC_ARG_ENABLE(video,
535               AC_HELP_STRING([--enable-video],
536                              [enable HTML5 video support [default=yes]]),
537               [],[enable_video="yes"])
538 AC_MSG_RESULT([$enable_video])
539
540 # check whether to enable HTML5 video track support
541 AC_MSG_CHECKING([whether to enable HTML5 video track support])
542 AC_ARG_ENABLE(video_track,
543               AC_HELP_STRING([--enable-video-track],
544                              [enable HTML5 video track support [default=yes]]),
545               [],[enable_video_track="yes"])
546 AC_MSG_RESULT([$enable_video_track])
547
548 # check whether to enable media statistics support
549 AC_MSG_CHECKING([whether to enable media statistics support])
550 AC_ARG_ENABLE(media_statistics,
551               AC_HELP_STRING([--enable-media-statistics],
552                              [enable support for media statistics [default=no]]),
553               [], [enable_media_statistics="no"])
554 AC_MSG_RESULT([$enable_media_statistics])
555
556 # check whether to enable Javascript Fullscreen API support
557 AC_MSG_CHECKING([whether to enable Fullscreen API support])
558 AC_ARG_ENABLE(fullscreen_api,
559               AC_HELP_STRING([--enable-fullscreen-api],
560                              [enable the Fullscreen API support [default=yes]]),
561               [],[enable_fullscreen_api="yes"])
562 AC_MSG_RESULT([$enable_fullscreen_api])
563
564 # check whether to enable XHTML-MP support
565 AC_MSG_CHECKING([whether to enable XHTML-MP support])
566 AC_ARG_ENABLE(xhtmlmp,
567               AC_HELP_STRING([--enable-xhtmlmp],
568                              [enable support for XHTML-MP [default=no]]),
569               [],[enable_xhtmlmp="no"])
570 AC_MSG_RESULT([$enable_xhtmlmp])
571
572 # check whether to enable XPath support
573 AC_MSG_CHECKING([whether to enable XPath support])
574 AC_ARG_ENABLE(xpath,
575               AC_HELP_STRING([--enable-xpath],
576                              [enable support for XPath [default=yes]]),
577               [],[enable_xpath="yes"])
578 AC_MSG_RESULT([$enable_xpath])
579
580 # check whether to enable XSLT support
581 AC_MSG_CHECKING([whether to enable XSLT support])
582 AC_ARG_ENABLE(xslt,
583               AC_HELP_STRING([--enable-xslt],
584                              [enable support for XSLT [default=yes]]),
585               [],[enable_xslt="yes"])
586 AC_MSG_RESULT([$enable_xslt])
587
588 # check whether to enable geolocation support
589 AC_MSG_CHECKING([whether to enable geolocation support])
590 AC_ARG_ENABLE(geolocation,
591               AC_HELP_STRING([--enable-geolocation],
592                              [enable support for geolocation [default=no]]),
593               [],[enable_geolocation="no"])
594 AC_MSG_RESULT([$enable_geolocation])
595
596 # check whether to enable client-based geolocation support
597 AC_MSG_CHECKING([whether to enable client-based geolocation support])
598 AC_ARG_ENABLE(client_based_geolocation,
599               AC_HELP_STRING([--enable-client-based-geolocation],
600                              [enable support for client-based geolocation [default=no]]),
601               [],[enable_client_based_geolocation="no"])
602 AC_MSG_RESULT([$enable_client_based_geolocation])
603
604 # check whether to enable MathML support
605 AC_MSG_CHECKING([whether to enable MathML support])
606 AC_ARG_ENABLE(mathml,
607               AC_HELP_STRING([--enable-mathml],
608                              [enable support for MathML [default=no]]),
609               [],[enable_mathml="no"])
610 AC_MSG_RESULT([$enable_mathml])
611
612 # check whether to enable SVG support
613 AC_MSG_CHECKING([whether to enable SVG support])
614 AC_ARG_ENABLE(svg,
615               AC_HELP_STRING([--enable-svg],
616                              [enable support for SVG [default=yes]]),
617               [],[enable_svg="yes"])
618 AC_MSG_RESULT([$enable_svg])
619
620 # check whether to enable WML support
621 AC_MSG_CHECKING([whether to enable WML support])
622 AC_ARG_ENABLE(wml,
623               AC_HELP_STRING([--enable-wml],
624                              [enable support for WML [default=no]]),
625               [],[enable_wml="no"])
626 AC_MSG_RESULT([$enable_wml])
627
628 # check whether to enable WCSS support
629 AC_MSG_CHECKING([whether to enable WCSS support])
630 AC_ARG_ENABLE(wcss,
631               AC_HELP_STRING([--enable-wcss],
632                              [enable support for WCSS [default=no]]),
633               [],[enable_wcss="no"])
634 AC_MSG_RESULT([$enable_wcss])
635
636 # check whether to enable SharedWorkers support
637 AC_MSG_CHECKING([whether to enable SharedWorkers support])
638 AC_ARG_ENABLE(shared_workers,
639               AC_HELP_STRING([--enable-shared-workers],
640                              [enable support for SharedWorkers [default=yes]]),
641               [],[enable_shared_workers="yes"])
642 AC_MSG_RESULT([$enable_shared_workers])
643
644 # check whether to enable Web Workers support
645 AC_MSG_CHECKING([whether to enable Web Workers support])
646 AC_ARG_ENABLE(workers,
647               AC_HELP_STRING([--enable-workers],
648                              [enable support for Web Workers [default=yes]]),
649               [],[enable_workers="yes"])
650 AC_MSG_RESULT([$enable_workers])
651
652 # check whether to enable directory upload support
653 AC_MSG_CHECKING([whether to enable directory upload support])
654 AC_ARG_ENABLE(directory_upload,
655               AC_HELP_STRING([--enable-directory-upload],
656                              [enable support for directory upload [default=no]]),
657               [], [enable_directory_upload="no"])
658 AC_MSG_RESULT([$enable_directory_upload])
659
660 # check whether to enable HTML5 FileSystem API support
661 AC_MSG_CHECKING([whether to enable HTML5 FileSystem API support])
662 AC_ARG_ENABLE(file_system,
663               AC_HELP_STRING([--enable-file-system],
664                              [enable support for HTML5 FileSystem API [default=no]]),
665               [], [enable_file_system="no"])
666 AC_MSG_RESULT([$enable_file_system])
667
668 # check whether to enable Quota API support
669 AC_MSG_CHECKING([whether to enable Quota API support])
670 AC_ARG_ENABLE(quota,
671               AC_HELP_STRING([--enable-quota],
672                              [enable support for Quota API [default=no]]),
673               [], [enable_quota="no"])
674 AC_MSG_RESULT([$enable_quota])
675
676 # turn off svg features if --disable-svg is requested
677 if test "$enable_svg" = "no"; then
678    enable_svg_animation=no
679    enable_svg_fonts=no
680    enable_svg_foreign_object=no
681    enable_svg_as_image=no
682    enable_svg_use=no
683 fi
684
685 # check whether to enable support for SVG animation
686 AC_MSG_CHECKING([whether to enable support for SVG animation])
687 AC_ARG_ENABLE(svg_animation,
688               AC_HELP_STRING([--enable-svg-animation],
689                              [enable support for SVG animation (experimental) [default=yes]]),
690               [],[enable_svg_animation="yes"])
691 AC_MSG_RESULT([$enable_svg_animation])
692
693 # check whether to enable support for filters
694 AC_MSG_CHECKING([whether to enable support for filters])
695 AC_ARG_ENABLE(filters,
696               AC_HELP_STRING([--enable-filters],
697                              [enable support for filters (experimental) [default=yes]]),
698               [],[enable_filters="yes"])
699 AC_MSG_RESULT([$enable_filters])
700
701 # check whether to enable support for SVG fonts
702 AC_MSG_CHECKING([whether to enable support for SVG fonts])
703 AC_ARG_ENABLE(svg_fonts,
704               AC_HELP_STRING([--enable-svg-fonts],
705                              [enable support for SVG fonts (experimental) [default=yes]]),
706               [],[enable_svg_fonts="yes"])
707 AC_MSG_RESULT([$enable_svg_fonts])
708
709 # check whether to enable foreign objects support for SVG
710 AC_MSG_CHECKING([whether to enable support for SVG foreign objects])
711 AC_ARG_ENABLE(svg_foreign_object,
712               AC_HELP_STRING([--enable-svg-foreign-object],
713                              [enable support for SVG foreign objects (experimental) [default=yes]]),
714               [],[enable_svg_foreign_object="yes"])
715 AC_MSG_RESULT([$enable_svg_foreign_object])
716
717 # check whether to enable SVG As Image support
718 AC_MSG_CHECKING([whether to enable SVG as Image support])
719 AC_ARG_ENABLE(svg_as_image,
720               AC_HELP_STRING([--enable-svg-as-image],
721                              [enable SVG as Image support (experimental) [default=yes]]),
722               [],[enable_svg_as_image="yes"])
723 AC_MSG_RESULT([$enable_svg_as_image])
724
725 # check whether to enable SVG USE element support
726 AC_MSG_CHECKING([whether to enable support for SVG use element])
727 AC_ARG_ENABLE(svg_use,
728               AC_HELP_STRING([--enable-svg-use],
729                              [enable SVG use element support (experimental) [default=yes]]),
730               [],[enable_svg_use="yes"])
731 AC_MSG_RESULT([$enable_svg_use])
732
733 # check for SVG features, enabling SVG if necessary
734 if test "$enable_svg_animation" = "yes" || \
735    test "$enable_svg_fonts" = "yes" || \
736    test "$enable_svg_foreign_object" = "yes" || \
737    test "$enable_svg_as_image" = "yes" || \
738    test "$enable_svg_use" = "yes"; then
739    svg_flags=yes
740    if test "$enable_svg" = "no"; then
741        AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
742        enable_svg=yes
743    fi
744 fi
745
746 # check whether to enable Web Socket support
747 AC_MSG_CHECKING([whether to enable Web Sockets support])
748 AC_ARG_ENABLE(web_sockets,
749               AC_HELP_STRING([--enable-web-sockets],
750                              [enable support for Web Sockets [default=yes]]),
751               [],[enable_web_sockets="yes"])
752 AC_MSG_RESULT([$enable_web_sockets])
753
754 # check whether to enable Web Audio support
755 AC_MSG_CHECKING([whether to enable Web Audio support])
756 AC_ARG_ENABLE(web_audio,
757               AC_HELP_STRING([--enable-web-audio],
758                              [enable support for Web Audio [default=no]]),
759               [],[enable_web_audio="no"])
760 AC_MSG_RESULT([$enable_web_audio])
761
762 # check whether to enable Web Timing support
763 AC_MSG_CHECKING([whether to enable Web Timing support])
764 AC_ARG_ENABLE(web_timing,
765               AC_HELP_STRING([--enable-web-timing],
766                              [enable support for Web Timing [default=no]]),
767               [],[enable_web_timing="no"])
768 AC_MSG_RESULT([$enable_web_timing])
769
770 # check whether to enable Blob support
771 AC_MSG_CHECKING([whether to enable Blob support])
772 AC_ARG_ENABLE(blob,
773               AC_HELP_STRING([--enable-blob],
774                              [enable support for Blob [default=yes]]),
775               [],[enable_blob="yes"])
776 AC_MSG_RESULT([$enable_blob])
777
778 # check whether to enable Fast Mobile Scrolling support
779 AC_MSG_CHECKING([whether to enable Fast Mobile Scrolling])
780 AC_ARG_ENABLE(fast_mobile_scrolling,
781               AC_HELP_STRING([--enable-fast-mobile-scrolling],
782                              [enable support for Fast Mobile Scrolling [default=no]]),
783               [],[enable_fast_mobile_scrolling="no"])
784 AC_MSG_RESULT([$enable_fast_mobile_scrolling])
785
786 # check whether to enable code coverage
787 AC_MSG_CHECKING([whether to enable code coverage support])
788 AC_ARG_ENABLE(coverage,
789               AC_HELP_STRING([--enable-coverage],
790                              [enable code coverage support [default=no]]),
791               [],[enable_coverage="no"])
792 AC_MSG_RESULT([$enable_coverage])
793
794 # check whether to enable FastMalloc
795 AC_MSG_CHECKING([whether to enable optimized memory allocator])
796 AC_ARG_ENABLE(fast_malloc,
797               AC_HELP_STRING([--enable-fast-malloc],
798                              [enable optimized memory allocator default=yes, default=no for debug builds]),
799               [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
800 AC_MSG_RESULT([$enable_fast_malloc])
801
802 AC_MSG_CHECKING([whether to enable JIT compilation])
803 AC_ARG_ENABLE([jit],
804               AC_HELP_STRING([--enable-jit],
805                              [Enable JIT compilation default=yes]),
806               [],[enable_jit="yes"])
807 if test "$enable_jit" = "yes"; then
808     case "$host_cpu" in
809         arm*)
810             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
811             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
812             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
813         ;;
814         i*86|x86_64)
815             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
816             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
817             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
818             AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
819             AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
820             AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
821             case "$host_cpu" in
822                 i*86)
823                     AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
824                 ;;
825                 x86_64)
826                     AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
827                     AC_DEFINE([WTF_USE_ALTERNATE_JSIMMEDIATE], [1], [Use alternate JSImmediate])
828                 ;;
829             esac
830         ;;
831         sh4)
832             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
833             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
834             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
835             AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
836         ;;
837         *)
838             enable_jit="no (CPU '$host_cpu' not supported)"
839         ;;
840     esac
841 else
842         AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
843 fi
844 AC_MSG_RESULT([$enable_jit])
845
846 # Opcode stats
847 AC_MSG_CHECKING([whether to enable opcode stats])
848 AC_ARG_ENABLE([opcode-stats],
849   [AS_HELP_STRING([--enable-opcode-stats], [Enable Opcode statistics (default: disabled)])],
850   [], [enable_opcode_stats=no])
851 AC_MSG_RESULT([$enable_opcode_stats])
852
853 if test "$enable_opcode_stats" = "yes"; then
854   if test "$enable_jit" = "yes"; then
855     AC_MSG_ERROR([JIT must be disabled for Opcode stats to work.])
856   fi
857   AC_DEFINE([ENABLE_OPCODE_STATS], [1], [Define to enable Opcode statistics])
858 fi
859
860 # Link prefetch
861 AC_MSG_CHECKING([whether to enable link prefetch support])
862 AC_ARG_ENABLE([link-prefetch],
863   [AS_HELP_STRING([--enable-link-prefetch], [Enable Link prefetch support (default: disabled)])],
864   [],[enable_link_prefetch=no])
865 AC_MSG_RESULT([$enable_link_prefetch])
866
867 if test "$enable_link_prefetch" = "yes"; then 
868   AC_DEFINE([ENABLE_LINK_PREFETCH], [1], [Define to enable link prefetch support])
869 fi
870
871 # GObject Introspection
872 AC_MSG_CHECKING([whether to enable GObject introspection support])
873 AC_ARG_ENABLE([introspection],
874   [AS_HELP_STRING([--enable-introspection],[Enable GObject introspection (default: disabled)])],
875   [],[enable_introspection=no])
876 AC_MSG_RESULT([$enable_introspection])
877
878 # check whether to enable animation API
879 AC_MSG_CHECKING([whether to enable Animation API support])
880 AC_ARG_ENABLE(animation_api,
881               AC_HELP_STRING([--enable-animation-api],
882                              [enable support for Animation API (experimental) [default=no]]),
883               [], [enable_animation_api="no"])
884 AC_MSG_RESULT([$enable_animation_api])
885
886 G_IR_SCANNER=
887 G_IR_COMPILER=
888 G_IR_GENERATE=
889 GIRDIR=
890 GIRTYPELIBDIR=
891
892 if test "$enable_introspection" = "yes"; then
893   GOBJECT_INTROSPECTION_REQUIRED=0.9.5
894   PKG_CHECK_MODULES([INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
895   
896   G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
897   G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
898   G_IR_GENERATE="$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)"
899   AC_DEFINE([ENABLE_INTROSPECTION],[1],[Define to enable GObject introspection support])
900 fi
901
902 AC_SUBST([G_IR_SCANNER])
903 AC_SUBST([G_IR_COMPILER])
904 AC_SUBST([G_IR_GENERATE])
905
906 # determine the font backend
907 AC_MSG_CHECKING([the font backend to use])
908 AC_ARG_WITH(font_backend,
909             AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
910                            [Select font backend [default=freetype]]),
911             [],[with_font_backend="freetype"])
912
913 case "$with_font_backend" in
914      freetype|pango) ;;
915      *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
916 esac
917 AC_MSG_RESULT([$with_font_backend])
918
919 if test "$host_cpu" = "sh4"; then
920    CXXFLAGS="$CXXFLAGS -mieee -w"
921    CFLAGS="$CFLAGS -mieee -w"
922 fi
923
924 # Add '-g' flag to gcc if it's debug build
925 if test "$enable_debug" = "yes"; then
926    CXXFLAGS="$CXXFLAGS -g"
927    CFLAGS="$CFLAGS -g"
928 else
929    AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
930 fi
931
932 # Add the appropriate 'O' level for optimized builds
933 if test "$enable_optimizations" = "yes"; then
934    CXXFLAGS="$CXXFLAGS -O2"
935    CFLAGS="$CFLAGS -O2"
936 else
937    CXXFLAGS="$CXXFLAGS -O0"
938    CFLAGS="$CFLAGS -O0"
939 fi
940
941 PKG_CHECK_MODULES([LIBSOUP],
942                   [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
943 AC_SUBST([LIBSOUP_CFLAGS])
944 AC_SUBST([LIBSOUP_LIBS])
945
946 # check if FreeType/FontConfig are available
947 if test "$with_font_backend" = "freetype"; then
948    if test "$with_target" = "directfb"; then
949    PKG_CHECK_MODULES([FREETYPE],
950                      [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
951                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
952    else
953    PKG_CHECK_MODULES([FREETYPE],
954                      [cairo-ft
955                      fontconfig >= $FONTCONFIG_REQUIRED_VERSION
956                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
957    fi
958    AC_SUBST([FREETYPE_CFLAGS])
959    AC_SUBST([FREETYPE_LIBS])
960 fi
961
962 # check if SQLite3 is available. Error out only if one of the
963 # features hard-depending on it is enabled while SQLite3 is
964 # unavailable.
965 PKG_CHECK_MODULES([SQLITE3],
966                   [sqlite3 >= $SQLITE_REQUIRED_VERSION],
967                   [sqlite3_has_pkg_config=yes],
968                   [sqlite3_has_pkg_config=no])
969 if test "$sqlite3_has_pkg_config" = "no"; then
970    AC_SEARCH_LIBS([sqlite3_open16], [sqlite3],
971                   [sqlite3_found=yes;SQLITE3_LIBS="$LIBS";SQLITE3_CFLAGS="-I $srcdir/WebKitLibraries/WebCoreSQLite3"],
972                   [sqlite3_found=no])
973 fi
974 AC_SUBST([SQLITE3_CFLAGS])
975 AC_SUBST([SQLITE3_LIBS])
976
977 if (test "$sqlite3_found" = "no") && (test "$enable_icon_database" = "yes" || \
978    test "$enable_database" = "yes" || \
979    test "$enable_offline_web_applications" = "yes" || \
980    test "$enable_dom_storage" = "yes"); then
981    AC_MSG_ERROR([SQLite3 is required for the Database related features])
982 fi
983
984 # check if libxslt is available
985 if test "$enable_xslt" = "yes"; then
986    PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
987    AC_SUBST([LIBXSLT_CFLAGS])
988    AC_SUBST([LIBXSLT_LIBS])
989 fi
990
991 # check if geoclue is available
992 if test "$enable_geolocation" = "yes"; then
993     PKG_CHECK_MODULES([GEOCLUE], [geoclue])
994     AC_SUBST([GEOCLUE_CFLAGS])
995     AC_SUBST([GEOCLUE_LIBS])
996 fi
997
998 # check for XRender under Linux/Unix. Some linkers require explicit
999 # linkage (like GNU Gold), so we cannot rely on GTK+ pulling XRender
1000 if test "$os_win32" = "no"; then
1001    PKG_CHECK_MODULES([XRENDER], [xrender])
1002    AC_SUBST([XRENDER_CFLAGS])
1003    AC_SUBST([XRENDER_LIBS])
1004 fi
1005
1006 # check if gstreamer is available
1007 if test "$enable_video" = "yes"; then
1008    PKG_CHECK_MODULES([GSTREAMER],
1009                      [gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
1010                      gstreamer-app-0.10
1011                      gstreamer-base-0.10
1012                      gstreamer-interfaces-0.10
1013                      gstreamer-pbutils-0.10
1014                      gstreamer-plugins-base-0.10 >= $GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION
1015                      gstreamer-video-0.10],
1016                      [have_gstreamer=yes])
1017
1018    AC_SUBST([GSTREAMER_CFLAGS])
1019    AC_SUBST([GSTREAMER_LIBS])
1020 fi
1021
1022 # check for code coverage support
1023 if test "$enable_coverage" = "yes"; then
1024    COVERAGE_CFLAGS="-MD"
1025    COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
1026    AC_SUBST([COVERAGE_CFLAGS])
1027    AC_SUBST([COVERAGE_LDFLAGS])
1028 fi
1029
1030 # check for HTML features
1031 if test "$enable_video" = "yes"; then
1032     html_flags=yes
1033 fi
1034
1035 # WebKit2
1036 AC_MSG_CHECKING([whether to build Webkit2])
1037 AC_ARG_ENABLE(webkit2,
1038             AC_HELP_STRING([--enable-webkit2],
1039                 [build webkit2 [default=no]]),
1040                 [], [enable_webkit2="no"])
1041 AC_MSG_RESULT([$enable_webkit2])
1042 if test "$enable_webkit2" = "yes"; then
1043     WEBKITGTK_PC_NAME=${WEBKITGTK_PC_NAME}2
1044     AC_SUBST([WEBKITGTK_PC_NAME])
1045 fi
1046
1047 GTK_DOC_CHECK([1.10])
1048
1049 # OS conditionals
1050 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
1051 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
1052 AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
1053 AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
1054 AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
1055
1056 # target conditionals
1057 AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
1058 AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
1059 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
1060 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
1061
1062 # Unicode backend conditionals
1063 AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
1064 AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
1065
1066 # Font backend conditionals
1067 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
1068 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
1069
1070 # GStreamer feature conditional
1071 AM_CONDITIONAL([USE_GSTREAMER], [test "$have_gstreamer" = "yes"])
1072
1073 # WebKit feature conditionals
1074 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
1075 AM_CONDITIONAL([ENABLE_3D_TRANSFORMS],[test "$enable_3d_transforms" = "yes"])
1076 AM_CONDITIONAL([ENABLE_WEBGL],[test "$enable_webgl" = "yes"])
1077 AM_CONDITIONAL([ENABLE_BLOB],[test "$enable_blob" = "yes"])
1078 AM_CONDITIONAL([ENABLE_METER_TAG],[test "$enable_meter_tag" = "yes"])
1079 AM_CONDITIONAL([ENABLE_PAGE_VISIBILITY_API],[test "$enable_page_visibility_api" = "yes"])
1080 AM_CONDITIONAL([ENABLE_PROGRESS_TAG],[test "$enable_progress_tag" = "yes"])
1081 AM_CONDITIONAL([ENABLE_CHANNEL_MESSAGING],[test "$enable_channel_messaging" = "yes"])
1082 AM_CONDITIONAL([ENABLE_JAVASCRIPT_DEBUGGER],[test "$enable_javascript_debugger" = "yes"])
1083 AM_CONDITIONAL([ENABLE_OFFLINE_WEB_APPLICATIONS],[test "$enable_offline_web_applications" = "yes"])
1084 AM_CONDITIONAL([ENABLE_DIRECTORY_UPLOAD],[test "$enable_directory_upload" = "yes"])
1085 AM_CONDITIONAL([ENABLE_DATAGRID],[test "$enable_datagrid" = "yes"])
1086 AM_CONDITIONAL([ENABLE_DATA_TRANSFER_ITEMS],[test "$enable_data_transfer_items" = "yes"])
1087 AM_CONDITIONAL([ENABLE_DOM_STORAGE],[test "$enable_dom_storage" = "yes"])
1088 AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
1089 AM_CONDITIONAL([ENABLE_DATALIST],[test "$enable_datalist" = "yes"])
1090 AM_CONDITIONAL([ENABLE_DETAILS],[test "$enable_details" = "yes"])
1091 AM_CONDITIONAL([ENABLE_EVENTSOURCE],[test "$enable_eventsource" = "yes"])
1092 AM_CONDITIONAL([ENABLE_FAST_MOBILE_SCROLLING],[test "$enable_fast_mobile_scrolling" = "yes"])
1093 AM_CONDITIONAL([ENABLE_FILE_SYSTEM],[test "$enable_file_system" = "yes"])
1094 AM_CONDITIONAL([ENABLE_QUOTA],[test "$enable_quota" = "yes"])
1095 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
1096 AM_CONDITIONAL([ENABLE_IMAGE_RESIZER],[test "$enable_image_resizer" = "yes"])
1097 AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
1098 AM_CONDITIONAL([ENABLE_INPUT_SPEECH],[test "$enable_input_speech" = "yes"])
1099 AM_CONDITIONAL([ENABLE_XHTMLMP],[test "$enable_xhtmlmp" = "yes"])
1100 AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
1101 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
1102 AM_CONDITIONAL([ENABLE_FILTERS],[test "$enable_filters" = "yes"])
1103 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
1104 AM_CONDITIONAL([ENABLE_CLIENT_BASED_GEOLOCATION], [test "$enable_client_based_geolocation" = "yes"])
1105 AM_CONDITIONAL([ENABLE_MATHML], [test "$enable_mathml" = "yes"])
1106 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
1107 AM_CONDITIONAL([ENABLE_MEDIA_STATISTICS],[test "$enable_media_statistics" = "yes"])
1108 AM_CONDITIONAL([ENABLE_VIDEO_TRACK],[test "$enable_video_track" = "yes"])
1109 AM_CONDITIONAL([ENABLE_FULLSCREEN_API],[test "$enable_fullscreen_api" = "yes"])
1110 AM_CONDITIONAL([ENABLE_NOTIFICATIONS],[test "$enable_notifications" = "yes"])
1111 AM_CONDITIONAL([ENABLE_ORIENTATION_EVENTS],[test "$enable_orientation_events" = "yes"])
1112 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
1113 AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
1114 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
1115 AM_CONDITIONAL([ENABLE_SVG_FOREIGN_OBJECT],[test "$enable_svg_foreign_object" = "yes"])
1116 AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
1117 AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use" = "yes"])
1118 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
1119 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
1120 AM_CONDITIONAL([ENABLE_WML],[test "$enable_wml" = "yes"])
1121 AM_CONDITIONAL([ENABLE_WCSS],[test "$enable_wcss" = "yes"])
1122 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_workers" = "yes"])
1123 AM_CONDITIONAL([ENABLE_SHARED_WORKERS],[test "$enable_shared_workers" = "yes"])
1124 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
1125 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
1126 AM_CONDITIONAL([ENABLE_WEB_SOCKETS],[test "$enable_web_sockets" = "yes"])
1127 AM_CONDITIONAL([ENABLE_WEB_AUDIO],[test "$enable_web_audio" = "yes"])
1128 AM_CONDITIONAL([ENABLE_WEB_TIMING],[test "$enable_web_timing" = "yes"])
1129 AM_CONDITIONAL([ENABLE_OPCODE_STATS],[test "$enable_opcode_stats" = "yes"])
1130 AM_CONDITIONAL([ENABLE_WEBKIT2],[test "$enable_webkit2" = "yes"])
1131 AM_CONDITIONAL([ENABLE_SPELLCHECK],[test "$enable_spellcheck" = "yes"])
1132 AM_CONDITIONAL([ENABLE_ANIMATION_API],[test "$enable_animation_api" = "yes"])
1133
1134 # Gtk conditionals
1135 AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
1136
1137 AC_CONFIG_FILES([
1138 GNUmakefile
1139 ])
1140  
1141 if test "$enable_webkit2" = "no"; then
1142     AC_CONFIG_FILES([
1143     Source/WebKit/gtk/webkit/webkitversion.h
1144     Source/WebKit/gtk/docs/GNUmakefile
1145     Source/WebKit/gtk/docs/version.xml
1146     ]
1147     )
1148
1149     AC_CONFIG_FILES([
1150     Source/WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/webkit.pc.in
1151     Source/WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:Source/WebKit/gtk/JSCore.gir.in
1152     Source/WebKit/gtk/org.webkitgtk-${WEBKITGTK_API_VERSION}.gschema.xml:Source/WebKit/gtk/org.webkitgtk.gschema.xml.in
1153     Source/WebKit/gtk/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/javascriptcoregtk.pc.in
1154     ]
1155     ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1156     )
1157 else
1158     AC_CONFIG_FILES([
1159     Source/WebKit2/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit2/gtk/webkit2.pc.in
1160     ]
1161     ,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
1162     )
1163 fi
1164
1165 AC_OUTPUT
1166
1167 echo "
1168 WebKit was configured with the following options:
1169
1170 Build configuration:
1171  Enable debugging (slow)                                  : $enable_debug
1172  Enable GCC build optimization                            : $enable_optimizations
1173  Code coverage support                                    : $enable_coverage
1174  Unicode backend                                          : $with_unicode_backend
1175  Font backend                                             : $with_font_backend
1176  Optimized memory allocator                               : $enable_fast_malloc
1177 Features:
1178  3D Transforms                                            : $enable_3d_transforms
1179  WebGL                                                    : $enable_webgl
1180  Blob support                                             : $enable_blob
1181  Directory upload                                         : $enable_directory_upload
1182  Fast Mobile Scrolling                                    : $enable_fast_mobile_scrolling
1183  JIT compilation                                          : $enable_jit
1184  Filters support                                          : $enable_filters
1185  Geolocation support                                      : $enable_geolocation
1186  Client-based geolocation support                         : $enable_client_based_geolocation
1187  JavaScript debugger/profiler support                     : $enable_javascript_debugger
1188  MathML support                                           : $enable_mathml
1189  Media statistics                                         : $enable_media_statistics
1190  HTML5 offline web applications support                   : $enable_offline_web_applications
1191  HTML5 channel messaging support                          : $enable_channel_messaging
1192  HTML5 meter element support                              : $enable_meter_tag
1193  Page Visibility API support                              : $enable_page_visibility_api
1194  HTML5 progress element support                           : $enable_progress_tag
1195  HTML5 client-side session and persistent storage support : $enable_dom_storage
1196  HTML5 client-side database storage support               : $enable_database
1197  HTML5 datagrid support                                   : $enable_datagrid
1198  HTML5 data transfer items support                        : $enable_data_transfer_items
1199  HTML5 FileSystem API support                             : $enable_file_system
1200  Quota API support                                        : $enable_quota
1201  HTML5 sandboxed iframe support                           : $enable_sandbox
1202  HTML5 server-sent events support                         : $enable_eventsource
1203  HTML5 video element support                              : $enable_video
1204  HTML5 track element support                              : $enable_video_track
1205  Fullscreen API support                                   : $enable_fullscreen_api
1206  Icon database support                                    : $enable_icon_database
1207  Image resizer support                                    : $enable_image_resizer
1208  Link prefetch support                                    : $enable_link_prefetch
1209  Opcode stats                                             : $enable_opcode_stats
1210  SharedWorkers support                                    : $enable_shared_workers
1211  Speech input support                                     : $enable_input_speech
1212  SVG support                                              : $enable_svg
1213  SVG animation support                                    : $enable_svg_animation
1214  SVG fonts support                                        : $enable_svg_fonts
1215  SVG foreign object support                               : $enable_svg_foreign_object
1216  SVG as image support                                     : $enable_svg_as_image
1217  SVG use element support                                  : $enable_svg_use
1218  WML support                                              : $enable_wml
1219  WCSS support                                             : $enable_wcss
1220  Web Audio support                                        : $enable_web_audio
1221  Web Sockets support                                      : $enable_web_sockets
1222  Web Timing support                                       : $enable_web_timing
1223  Web Workers support                                      : $enable_workers
1224  XHTML-MP support                                         : $enable_xhtmlmp
1225  XPATH support                                            : $enable_xpath
1226  XSLT support                                             : $enable_xslt
1227  Spellcheck support                                       : $enable_spellcheck
1228  Animation API                                            : $enable_animation_api
1229
1230 GTK+ configuration:
1231  GTK+ version                                             : $with_gtk
1232  GDK target                                               : $with_target
1233  Hildon UI extensions                                     : $with_hildon
1234  Introspection support                                    : $enable_introspection
1235  WebKit2 support                                          : $enable_webkit2
1236 "
1237 if test "$with_unicode_backend" = "glib"; then
1238    echo "     >> WARNING: the glib-based unicode backend is slow and incomplete <<"
1239    echo
1240    echo
1241 fi