2009-04-16 Eric Roman <eroman@chromium.org>
[WebKit-https.git] / configure.ac
1 AC_PREREQ(2.59)
2
3 m4_define([webkit_major_version], [1])
4 m4_define([webkit_minor_version], [1])
5 m4_define([webkit_micro_version], [5])
6
7 AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
8
9 AC_CONFIG_MACRO_DIR([autotools])
10 AC_CONFIG_AUX_DIR([autotools])
11 AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools")
12
13 AC_CONFIG_HEADERS([autotoolsconfig.h])
14 AC_CANONICAL_SYSTEM
15
16 WEBKIT_MAJOR_VERSION=webkit_major_version
17 WEBKIT_MINOR_VERSION=webkit_minor_version
18 WEBKIT_MICRO_VERSION=webkit_micro_version
19 AC_SUBST(WEBKIT_MAJOR_VERSION)
20 AC_SUBST(WEBKIT_MINOR_VERSION)
21 AC_SUBST(WEBKIT_MICRO_VERSION)
22
23 AC_CONFIG_SRCDIR([WebCore/config.h])
24
25 dnl # Libtool library version, not to confuse with API version
26 dnl # see http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html#Libtool-versioning
27 LIBWEBKITGTK_VERSION=5:0:3
28 AC_SUBST([LIBWEBKITGTK_VERSION])
29
30 AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar])
31
32 # host checking - inspired by the GTK+ configure.in
33 # TODO: move these to webkit.m4?
34 AC_MSG_CHECKING([for native Win32])
35 case "$host" in
36      *-*-mingw*)
37        os_win32=yes
38        ;;
39      *)
40        os_win32=no
41        ;;
42 esac
43 AC_MSG_RESULT([$os_win32])
44
45 case "$host" in
46      *-*-linux*)
47        os_linux=yes
48        ;;
49      *-*-freebsd*)
50        os_freebsd=yes
51        ;;
52      *-*-darwin*)
53        os_darwin=yes
54        ;;
55 esac
56
57 case "$host_os" in
58      gnu* | linux* | k*bsd*-gnu)
59        os_gnu=yes
60        ;;
61      *)
62        os_gnu=no
63        ;;
64 esac
65
66 # initialize webkit options
67 WEBKIT_INIT
68 AC_DISABLE_STATIC
69 AC_LIBTOOL_WIN32_DLL
70 AC_PROG_LIBTOOL
71 # use dolt to speedup the build
72 DOLT
73
74 AC_PATH_PROG(FLEX, flex)
75 if test -z "$FLEX"; then
76    AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit])
77 else
78    FLEX_VERSION=`$FLEX --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'`
79    AX_COMPARE_VERSION([2.5.33],[gt],[$FLEX_VERSION],
80       AC_MSG_WARN([You need at least version 2.5.33 of the 'flex' lexer generator to compile WebKit correctly]))
81 fi
82
83 AC_PATH_PROG(GPERF, gperf)
84 if test -z "$GPERF"; then
85    AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
86 fi
87
88 # pthread (not needed on Windows)
89 if test "$os_win32" = "no"; then
90 AC_CHECK_HEADERS([pthread.h],
91                  AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exists]),
92                  AC_MSG_ERROR([pthread support is required to build WebKit]))
93 fi
94
95 # check for libjpeg the way Gtk does it.
96 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
97                    jpeg_ok=yes, jpeg_ok=no
98                    AC_MSG_ERROR([JPEG library (libjpeg) not found]))
99 if test "$jpeg_ok" = yes; then
100    AC_MSG_CHECKING([for jpeglib])
101    AC_TRY_CPP(
102 [#include <stdio.h>
103 #undef PACKAGE
104 #undef VERSION
105 #undef HAVE_STDLIB_H
106 #include <jpeglib.h>],
107          jpeg_ok=yes,
108          jpeg_ok=no)
109    AC_MSG_RESULT($jpeg_ok)
110    if test "$jpeg_ok" = yes; then
111       JPEG_LIBS="-ljpeg"
112       # should we check for progressive JPEG like GTK+ as well?
113    else
114       AC_MSG_ERROR([JPEG library (libjpeg) not found])
115    fi
116 fi
117 AC_SUBST([JPEG_LIBS])
118
119 # Check for libpng the way Gtk+ does it
120 AC_MSG_CHECKING(for libpng12)
121 if $PKG_CONFIG --exists libpng12 ; then
122     AC_MSG_RESULT(yes)
123     PNG_LIBS=`$PKG_CONFIG --libs libpng12`
124 else
125   AC_MSG_RESULT(no)
126   AC_CHECK_LIB(png, png_read_info,
127     [AC_CHECK_HEADER(png.h,
128       png_ok=yes,
129       png_ok=no)],
130     AC_MSG_ERROR([PNG library (libpng) not found]), -lz -lm)
131   if test "$png_ok" = yes; then
132     AC_MSG_CHECKING([for png_structp in png.h])
133     AC_TRY_COMPILE([#include <png.h>],
134       [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
135       png_ok=yes,
136       png_ok=no)
137     AC_MSG_RESULT($png_ok)
138     if test "$png_ok" = yes; then
139       PNG_LIBS='-lpng -lz'
140     else
141       AC_MSG_ERROR([PNG library (libpng) not found])
142     fi
143   else
144    AC_MSG_ERROR([PNG library (libpng) not found])
145   fi
146 fi
147 AC_SUBST([PNG_LIBS])
148
149 # determine the GDK/GTK+ target
150 AC_MSG_CHECKING([the target windowing system])
151 AC_ARG_WITH(target,
152             AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
153                            [Select webkit target [default=x11]]),
154             [],[with_target="x11"])
155
156 case "$with_target" in
157      x11|win32|quartz|directfb) ;;
158      *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
159 esac
160
161 AC_MSG_RESULT([$with_target])
162
163 AC_MSG_CHECKING([for Hildon UI extensions])
164 AC_ARG_WITH(hildon,
165             AC_HELP_STRING([--with-hildon],
166                            [Use Hildon UI extensions [default=no]]),
167             [],[with_hildon="no"])
168 AC_MSG_RESULT([$with_hildon])
169
170 if test "$with_hildon" = "yes"; then
171     HILDON_CPPFLAGS="-DMAEMO_CHANGES"
172     PKG_CHECK_MODULES([HILDON], [hildon-1])
173     AC_SUBST([HILDON_CPPFLAGS])
174     AC_SUBST([HILDON_CFLAGS])
175     AC_SUBST([HILDON_LIBS])
176 fi
177
178 # minimum base dependencies
179 CAIRO_REQUIRED_VERSION=1.2
180 FONTCONFIG_REQUIRED_VERSION=2.4
181 FREETYPE2_REQUIRED_VERSION=9.0
182 LIBXML_REQUIRED_VERSION=2.6
183
184 # minimum GTK+ base dependencies
185 PANGO_REQUIRED_VERSION=1.0
186 GTK_REQUIRED_VERSION=2.10
187
188 # optional modules
189 LIBSOUP_REQUIRED_VERSION=2.25.91
190 LIBXSLT_REQUIRED_VERSION=1.1.7
191 SQLITE_REQUIRED_VERSION=3.0
192 GSTREAMER_REQUIRED_VERSION=0.10
193 GNOME_KEYRING_REQUIRED_VERSION=2.26.0
194
195 # Available modules
196 #
197 # glib - glib and includes gthread
198 # unicode - check and identify which unicode backend to use
199 #
200 # todo: webcore gtk
201 WEBKIT_CHECK_DEPENDENCIES([glib unicode])
202
203 GETTEXT_PACKAGE=$PACKAGE
204 AC_SUBST(GETTEXT_PACKAGE)
205 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
206                    [The gettext catalog name])
207
208 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
209 AC_SUBST(LIBXML_CFLAGS)
210 AC_SUBST(LIBXML_LIBS)
211
212 PKG_CHECK_MODULES(PANGO, 
213                   [pango >= $PANGO_REQUIRED_VERSION
214                    pangoft2])
215 AC_SUBST(PANGO_CFLAGS)
216 AC_SUBST(PANGO_LIBS)
217
218 # check for target-specific dependencies
219 if test "$with_target" = "directfb"; then
220    PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION)
221    PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION)
222    AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB])
223 else
224    PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
225    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION)
226
227    if test "$with_target" = "x11" && test "$os_win32" = "no"; then
228       # check for XT
229       PKG_CHECK_MODULES([XT],
230                         [xt],
231                         [xt_has_pkg_config=yes],
232                         [xt_has_pkg_config=no])
233       # some old versions of Xt do not provide xt.pc, so try to link against Xt
234       # and if it's installed fall back to just adding -lXt
235       if test "$xt_has_pkg_config" = "no"; then
236          # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
237          # we don't care about the XtOpenDisplay symbol but only about the
238          # existence of libXt
239          AC_CHECK_LIB([Xt], [XtOpenDisplay],
240                       [XT_CFLAGS=""; XT_LIBS="-lXt"],
241                       [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
242       fi
243       AC_SUBST([XT_CFLAGS])
244       AC_SUBST([XT_LIBS])
245       AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
246    fi
247 fi
248 AC_SUBST(GTK_CFLAGS)
249 AC_SUBST(GTK_LIBS)
250 AC_SUBST(CAIRO_CFLAGS)
251 AC_SUBST(CAIRO_LIBS)
252
253 # check whether to build with debugging enabled
254 AC_MSG_CHECKING([whether to do a debug build])
255 AC_ARG_ENABLE(debug,
256               AC_HELP_STRING([--enable-debug],
257                              [turn on debugging [default=no]]),
258               [],[enable_debug="no"])
259 AC_MSG_RESULT([$enable_debug])
260
261 # check whether to enable optimized builds
262 AC_MSG_CHECKING([whether to enable optimized builds])
263 AC_ARG_ENABLE(optimizations,
264               AC_HELP_STRING([--enable-optimizations],
265                              [turn on optimize builds (GCC only)
266                              [default=yes]]),
267               [enable_optimizations=$enableval],
268               [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
269 AC_MSG_RESULT([$enable_optimizations])
270
271 # check whether to enable dashboard support
272 AC_MSG_CHECKING([whether to enable Dashboard support])
273 AC_ARG_ENABLE(dashboard_support,
274               AC_HELP_STRING([--enable-dashboard-support],
275                              [enable Dashboard support [default=yes]]),
276               [],[enable_dashboard_support="yes"])
277 AC_MSG_RESULT([$enable_dashboard_support])
278
279 # check whether to enable 3D transforms support
280 AC_MSG_CHECKING([whether to enable support for 3D Transforms])
281 AC_ARG_ENABLE(3D_transforms,
282               AC_HELP_STRING([--enable-3D-transforms],
283                              [enable support for 3D transforms [default=no]]),
284               [],[enable_3D_transforms="no"])
285 AC_MSG_RESULT([$enable_3D_transforms])
286
287 # check whether to enable channel messaging support
288 AC_MSG_CHECKING([whether to enable HTML5 Channel Messaging support])
289 AC_ARG_ENABLE(channel_messaging,
290               AC_HELP_STRING([--enable-channel-messaging],
291                              [enable HTML5 channel messaging support [default=no]]),
292               [],[enable_channel_messaging="no"])
293 AC_MSG_RESULT([$enable_channel_messaging])
294
295 # check whether to enable HTML5 Offline Web Applications support
296 AC_MSG_CHECKING([whether to enable HTML5 offline web applications support])
297 AC_ARG_ENABLE(offline_web_applications,
298               AC_HELP_STRING([--enable-offline-web-applications],
299                              [enable HTML5 offline web applications support [default=yes]]),
300               [],[enable_offline_web_applications="yes"])
301 AC_MSG_RESULT([$enable_offline_web_applications])
302
303 # check whether to enable HTML5 client-side session and persitent storage support
304 AC_MSG_CHECKING([whether to enable HTML5 client-side session and persistent storage support])
305 AC_ARG_ENABLE(dom_storage,
306               AC_HELP_STRING([--enable-dom-storage],
307                              [enable HTML5 client-side session and persistent storage support [default=yes]]),
308               [],[enable_dom_storage="yes"])
309 AC_MSG_RESULT([$enable_dom_storage])
310
311 # check whether to build with database support
312 AC_MSG_CHECKING([whether to enable HTML5 client-side database storage support])
313 AC_ARG_ENABLE(database,
314               AC_HELP_STRING([--enable-database],
315                              [enable HTML5 client-side database storage support [default=yes]]),
316               [],[enable_database="yes"])
317 AC_MSG_RESULT([$enable_database])
318
319 # check whether to build with icon database support
320 AC_MSG_CHECKING([whether to enable icon database support])
321 AC_ARG_ENABLE(icon_database,
322               AC_HELP_STRING([--enable-icon-database],
323                              [enable icon database [default=yes]]),
324               [],[enable_icon_database="yes"])
325 AC_MSG_RESULT([$enable_icon_database])
326
327 # check whether to enable HTML5 audio/video support
328 AC_MSG_CHECKING([whether to enable HTML5 video support])
329 AC_ARG_ENABLE(video,
330               AC_HELP_STRING([--enable-video],
331                              [enable HTML5 video support [default=yes]]),
332               [],[enable_video="yes"])
333 AC_MSG_RESULT([$enable_video])
334
335 # check whether to enable XPath support
336 AC_MSG_CHECKING([whether to enable XPath support])
337 AC_ARG_ENABLE(xpath,
338               AC_HELP_STRING([--enable-xpath],
339                              [enable support for XPath [default=yes]]),
340               [],[enable_xpath="yes"])
341 AC_MSG_RESULT([$enable_xpath])
342
343 # check whether to enable XSLT support
344 AC_MSG_CHECKING([whether to enable XSLT support])
345 AC_ARG_ENABLE(xslt,
346               AC_HELP_STRING([--enable-xslt],
347                              [enable support for XSLT [default=yes]]),
348               [],[enable_xslt="yes"])
349 AC_MSG_RESULT([$enable_xslt])
350
351 # check whether to enable geolocation support
352 AC_MSG_CHECKING([whether to enable geolocation support])
353 AC_ARG_ENABLE(geolocation,
354               AC_HELP_STRING([--enable-geolocation],
355                              [enable support for geolocation [default=no]]),
356               [],[enable_geolocation="no"])
357 AC_MSG_RESULT([$enable_geolocation])
358
359 # check whether to enable gnomekeyring support
360 AC_MSG_CHECKING([whether to enable gnomekeyring support])
361 AC_ARG_ENABLE(gnomekeyring,
362               AC_HELP_STRING([--enable-gnomekeyring],
363                              [enable support for gnomekeyring [default=no]]),
364               [],[enable_gnomekeyring="no"])
365 AC_MSG_RESULT([$enable_gnomekeyring])
366
367 # check whether to enable SVG support
368 AC_MSG_CHECKING([whether to enable SVG support])
369 AC_ARG_ENABLE(svg,
370               AC_HELP_STRING([--enable-svg],
371                              [enable support for SVG [default=yes]]),
372               [],[enable_svg="yes"])
373 AC_MSG_RESULT([$enable_svg])
374
375 # check whether to enable WML support
376 AC_MSG_CHECKING([whether to enable WML support])
377 AC_ARG_ENABLE(wml,
378               AC_HELP_STRING([--enable-wml],
379                              [enable support for WML [default=no]]),
380               [],[enable_wml="no"])
381 AC_MSG_RESULT([$enable_wml])
382
383 # check whether to enable Web Workers support
384 AC_MSG_CHECKING([whether to enable Web Workers support])
385 AC_ARG_ENABLE(web_workers,
386               AC_HELP_STRING([--enable-web-workers],
387                              [enable support for Web Workers [default=yes]]),
388               [],[enable_web_workers="yes"])
389 AC_MSG_RESULT([$enable_web_workers])
390
391 # turn off svg features if --disable-svg is requested
392 if test "$enable_svg" = "no"; then
393    enable_svg_animation=no
394    enable_svg_filters=no
395    enable_svg_fonts=no
396    enable_svg_foreign_object=no
397    enable_svg_as_image=no
398    enable_svg_use_element=no
399 fi
400
401 # check whether to enable support for SVG animation
402 AC_MSG_CHECKING([whether to enable support for SVG animation])
403 AC_ARG_ENABLE(svg_animation,
404               AC_HELP_STRING([--enable-svg-animation],
405                              [enable support for SVG animation (experimental) [default=yes]]),
406               [],[enable_svg_animation="yes"])
407 AC_MSG_RESULT([$enable_svg_animation])
408
409 # check whether to enable support for SVG filters
410 AC_MSG_CHECKING([whether to enable support for SVG filters])
411 AC_ARG_ENABLE(svg_filters,
412               AC_HELP_STRING([--enable-svg-filters],
413                              [enable support for SVG filters (experimental) [default=no]]),
414               [],[enable_svg_filters="no"])
415 AC_MSG_RESULT([$enable_svg_filters])
416
417 # check whether to enable support for SVG fonts
418 AC_MSG_CHECKING([whether to enable support for SVG fonts])
419 AC_ARG_ENABLE(svg_fonts,
420               AC_HELP_STRING([--enable-svg-fonts],
421                              [enable support for SVG fonts (experimental) [default=yes]]),
422               [],[enable_svg_fonts="yes"])
423 AC_MSG_RESULT([$enable_svg_fonts])
424
425 # check whether to enable foreign objects support for SVG
426 AC_MSG_CHECKING([whether to enable support for SVG foreign objects])
427 AC_ARG_ENABLE(svg_foreign_object,
428               AC_HELP_STRING([--enable-svg-foreign-object],
429                              [enable support for SVG foreign objects (experimental) [default=yes]]),
430               [],[enable_svg_foreign_object="yes"])
431 AC_MSG_RESULT([$enable_svg_foreign_object])
432
433 # check whether to enable SVG As Image support
434 AC_MSG_CHECKING([whether to enable SVG as Image support])
435 AC_ARG_ENABLE(svg_as_image,
436               AC_HELP_STRING([--enable-svg-as-image],
437                              [enable SVG as Image support (experimental) [default=yes]]),
438               [],[enable_svg_as_image="yes"])
439 AC_MSG_RESULT([$enable_svg_as_image])
440
441 # check whether to enable SVG USE element support
442 AC_MSG_CHECKING([whether to enable support for SVG use element])
443 AC_ARG_ENABLE(svg_use_element,
444               AC_HELP_STRING([--enable-svg-use-element],
445                              [enable SVG use element support (experimental) [default=yes]]),
446               [],[enable_svg_use_element="yes"])
447 AC_MSG_RESULT([$enable_svg_use_element])
448
449 # check for SVG features, enabling SVG if necessary
450 if test "$enable_svg_animation" = "yes" || \
451    test "$enable_svg_filters" = "yes" || \
452    test "$enable_svg_fonts" = "yes" || \
453    test "$enable_svg_foreign_object" = "yes" || \
454    test "$enable_svg_as_image" = "yes" || \
455    test "$enable_svg_use_element" = "yes"; then
456    svg_flags=yes
457    if test "$enable_svg" = "no"; then
458        AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
459        enable_svg=yes
460    fi
461 fi
462
463 # check whether to enable code coverage
464 AC_MSG_CHECKING([whether to enable code coverage support])
465 AC_ARG_ENABLE(coverage,
466               AC_HELP_STRING([--enable-coverage],
467                              [enable code coverage support [default=no]]),
468               [],[enable_coverage="no"])
469 AC_MSG_RESULT([$enable_coverage])
470
471 # check whether to enable FastMalloc
472 AC_MSG_CHECKING([whether to enable optimized memory allocator])
473 AC_ARG_ENABLE(fast_malloc,
474               AC_HELP_STRING([--enable-fast-malloc],
475                              [enable optimized memory allocator default=yes, default=no for debug builds]),
476               [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
477 AC_MSG_RESULT([$enable_fast_malloc])
478
479 AC_MSG_CHECKING([whether to enable JIT compilation])
480 AC_ARG_ENABLE([jit],
481               AC_HELP_STRING([--enable-jit],
482                              [Enable JIT compilation default=yes]),
483               [],[enable_jit="yes"])
484 if test "$enable_jit" = "yes"; then
485     case "$target_cpu" in
486         i*86)
487             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
488             AC_DEFINE([ENABLE_WREC], [1], [Define to enable WREC])
489             AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
490             AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
491             AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
492             AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
493         ;;
494         *)
495             enable_jit="no (CPU '$target_cpu' not supported)"
496         ;;
497     esac
498 fi
499 AC_MSG_RESULT([$enable_jit])
500
501 # determine the font backend
502 AC_MSG_CHECKING([the font backend to use])
503 AC_ARG_WITH(font_backend,
504             AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
505                            [Select font backend [default=freetype]]),
506             [],[with_font_backend="freetype"])
507
508 case "$with_font_backend" in
509      freetype|pango) ;;
510      *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
511 esac
512 AC_MSG_RESULT([$with_font_backend])
513
514 # Add '-g' flag to gcc if it's debug build
515 if test "$enable_debug" = "yes"; then
516    CXXFLAGS="$CXXFLAGS -g"
517    CFLAGS="$CFLAGS -g"
518 else
519    AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
520 fi
521
522 # Add the appropriate 'O' level for optimized builds
523 if test "$enable_optimizations" = "yes"; then
524    CXXFLAGS="$CXXFLAGS -O2"
525    CFLAGS="$CFLAGS -O2"
526 else
527    CXXFLAGS="$CXXFLAGS -O0"
528    CFLAGS="$CFLAGS -O0"
529 fi
530
531 PKG_CHECK_MODULES([LIBSOUP],
532                   [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
533 AC_SUBST([LIBSOUP_CFLAGS])
534 AC_SUBST([LIBSOUP_LIBS])
535
536 if test "$enable_gnomekeyring" = "yes"; then
537    PKG_CHECK_MODULES([GNOMEKEYRING],
538                      [gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED_VERSION])
539    AC_SUBST([GNOMEKEYRING_CFLAGS])
540    AC_SUBST([GNOMEKEYRING_LIBS])
541 fi
542
543 # check if FreeType/FontConfig are available
544 if test "$with_font_backend" = "freetype"; then
545    if test "$with_target" = "directfb"; then
546    PKG_CHECK_MODULES([FREETYPE],
547                      [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
548                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
549    else
550    PKG_CHECK_MODULES([FREETYPE],
551                      [cairo-ft
552                      fontconfig >= $FONTCONFIG_REQUIRED_VERSION
553                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
554    fi
555    AC_SUBST([FREETYPE_CFLAGS])
556    AC_SUBST([FREETYPE_LIBS])
557 fi
558
559 # check if sqlite 3 is available
560 if test "$enable_icon_database" = "yes" || \
561    test "$enable_database" = "yes" || \
562    test "$enable_offline_web_applications" = "yes" || \
563    test "$enable_dom_storage" = "yes"; then
564    PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE_REQUIRED_VERSION])
565    AC_SUBST([SQLITE3_CFLAGS])
566    AC_SUBST([SQLITE3_LIBS])
567 fi
568
569 # check if libxslt is available
570 if test "$enable_xslt" = "yes"; then
571    PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
572    AC_SUBST([LIBXSLT_CFLAGS])
573    AC_SUBST([LIBXSLT_LIBS])
574 fi
575
576 # check if geoclue is available
577 if test "$enable_geolocation" = "yes"; then
578     PKG_CHECK_MODULES([GEOCLUE], [geoclue])
579     AC_SUBST([GEOCLUE_CFLAGS])
580     AC_SUBST([GEOCLUE_LIBS])
581 fi
582
583 # check if gstreamer is available
584 if test "$enable_video" = "yes"; then
585    PKG_CHECK_MODULES([GSTREAMER],
586                      [gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
587                      gstreamer-base-0.10,
588                      gstreamer-plugins-base-0.10])
589    AC_SUBST([GSTREAMER_CFLAGS])
590    AC_SUBST([GSTREAMER_LIBS])
591 fi
592
593 # check for code coverage support
594 if test "$enable_coverage" = "yes"; then
595    COVERAGE_CFLAGS="-MD"
596    COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
597    AC_SUBST([COVERAGE_CFLAGS])
598    AC_SUBST([COVERAGE_LDFLAGS])
599 fi
600
601 # check for HTML features
602 if test "$enable_video" = "yes"; then
603     html_flags=yes
604 fi
605
606 GTK_DOC_CHECK([1.10])
607
608 # OS conditionals
609 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
610 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
611 AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
612 AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
613 AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
614
615 # target conditionals
616 AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
617 AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
618 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
619 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
620
621 # Auth backend conditionals
622 AM_CONDITIONAL([USE_GNOMEKEYRING], [test "$enable_gnomekeyring" = "yes"])
623
624 # Font backend conditionals
625 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
626 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
627
628 # WebKit feature conditionals
629 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
630 AM_CONDITIONAL([ENABLE_DASHBOARD_SUPPORT],[test "$enable_dashboard_support" = "yes"])
631 AM_CONDITIONAL([ENABLE_3D_TRANSFORMS],[test "$enable_3D_transforms" = "yes"])
632 AM_CONDITIONAL([ENABLE_CHANNEL_MESSAGING],[test "$enable_channel_messaging" = "yes"])
633 AM_CONDITIONAL([ENABLE_OFFLINE_WEB_APPLICATIONS],[test "$enable_offline_web_applications" = "yes"])
634 AM_CONDITIONAL([ENABLE_DOM_STORAGE],[test "$enable_dom_storage" = "yes"])
635 AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
636 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
637 AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
638 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
639 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
640 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
641 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
642 AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
643 AM_CONDITIONAL([ENABLE_SVG_FILTERS],[test "$enable_svg_filters" = "yes"])
644 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
645 AM_CONDITIONAL([ENABLE_SVG_FOREIGN_OBJECT],[test "$enable_svg_foreign_object" = "yes"])
646 AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
647 AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use_element" = "yes"])
648 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
649 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
650 AM_CONDITIONAL([ENABLE_WML],[test "$enable_wml" = "yes"])
651 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_web_workers" = "yes"])
652 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
653 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
654
655 AC_CONFIG_FILES([
656 GNUmakefile
657 WebKit/gtk/webkit-1.0.pc:WebKit/gtk/webkit.pc.in
658 WebKit/gtk/webkit/webkitversion.h
659 WebKit/gtk/docs/GNUmakefile
660 WebKit/gtk/docs/version.xml
661 ]
662 )
663
664 AC_OUTPUT
665
666 echo "
667 WebKit was configured with the following options:
668
669 Build configuration:
670  Enable debugging (slow)                                  : $enable_debug
671  Enable GCC build optimization                            : $enable_optimizations
672  Code coverage support                                    : $enable_coverage
673  Unicode backend                                          : $unicode_backend
674  Font backend                                             : $with_font_backend
675  Optimized memory allocator                               : $enable_fast_malloc
676 Features:
677  3D Transforms                                            : $enable_3D_transforms
678  JIT compilation                                          : $enable_jit
679  Dashboard support                                        : $enable_dashboard_support
680  Geolocation support                                      : $enable_geolocation
681  GNOME Keyring support                                    : $enable_gnomekeyring
682  HTML5 offline web applications support                   : $enable_offline_web_applications
683  HTML5 channel messaging support                          : $enable_channel_messaging
684  HTML5 client-side session and persistent storage support : $enable_dom_storage
685  HTML5 client-side database storage support               : $enable_database
686  HTML5 video element support                              : $enable_video
687  Icon database support                                    : $enable_icon_database
688  SVG support                                              : $enable_svg
689  SVG animation support                                    : $enable_svg_animation
690  SVG filters support                                      : $enable_svg_filters
691  SVG fonts support                                        : $enable_svg_fonts
692  SVG foreign object support                               : $enable_svg_foreign_object
693  SVG as image support                                     : $enable_svg_as_image
694  SVG use element support                                  : $enable_svg_use_element
695  WML support                                              : $enable_wml
696  Web Workers support                                      : $enable_web_workers
697  XPATH support                                            : $enable_xpath
698  XSLT support                                             : $enable_xslt
699 GTK+ configuration:
700  GDK target                                               : $with_target
701  Hildon UI extensions                                     : $with_hildon
702 "