2009-03-17 Darin Adler <darin@apple.com>
[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], [3])
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=3:0:1
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.8
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
194 # Available modules
195 #
196 # glib - glib and includes gthread
197 # unicode - check and identify which unicode backend to use
198 #
199 # todo: webcore gtk
200 WEBKIT_CHECK_DEPENDENCIES([glib unicode])
201                           
202 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
203 AC_SUBST(LIBXML_CFLAGS)
204 AC_SUBST(LIBXML_LIBS)
205
206 PKG_CHECK_MODULES(PANGO, 
207                   [pango >= $PANGO_REQUIRED_VERSION
208                    pangoft2])
209 AC_SUBST(PANGO_CFLAGS)
210 AC_SUBST(PANGO_LIBS)
211
212 # check for target-specific dependencies
213 if test "$with_target" = "directfb"; then
214    PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION)
215    PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION)
216    AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB])
217 else
218    PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
219    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION)
220
221    if test "$with_target" = "x11" && test "$os_win32" = "no"; then
222       # check for XT
223       PKG_CHECK_MODULES([XT],
224                         [xt],
225                         [xt_has_pkg_config=yes],
226                         [xt_has_pkg_config=no])
227       # some old versions of Xt do not provide xt.pc, so try to link against Xt
228       # and if it's installed fall back to just adding -lXt
229       if test "$xt_has_pkg_config" = "no"; then
230          # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
231          # we don't care about the XtOpenDisplay symbol but only about the
232          # existence of libXt
233          AC_CHECK_LIB([Xt], [XtOpenDisplay],
234                       [XT_CFLAGS=""; XT_LIBS="-lXt"],
235                       [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
236       fi
237       AC_SUBST([XT_CFLAGS])
238       AC_SUBST([XT_LIBS])
239       AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
240    fi
241 fi
242 AC_SUBST(GTK_CFLAGS)
243 AC_SUBST(GTK_LIBS)
244 AC_SUBST(CAIRO_CFLAGS)
245 AC_SUBST(CAIRO_LIBS)
246
247 # check whether to build with debugging enabled
248 AC_MSG_CHECKING([whether to do a debug build])
249 AC_ARG_ENABLE(debug,
250               AC_HELP_STRING([--enable-debug],
251                              [turn on debugging [default=no]]),
252               [],[enable_debug="no"])
253 AC_MSG_RESULT([$enable_debug])
254
255 # check whether to enable optimized builds
256 AC_MSG_CHECKING([whether to enable optimized builds])
257 AC_ARG_ENABLE(optimizations,
258               AC_HELP_STRING([--enable-optimizations],
259                              [turn on optimize builds (GCC only)
260                              [default=yes]]),
261               [enable_optimizations=$enableval],
262               [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
263 AC_MSG_RESULT([$enable_optimizations])
264
265 # check whether to enable dashboard support
266 AC_MSG_CHECKING([whether to enable Dashboard support])
267 AC_ARG_ENABLE(dashboard_support,
268               AC_HELP_STRING([--enable-dashboard-support],
269                              [enable Dashboard support [default=yes]]),
270               [],[enable_dashboard_support="yes"])
271 AC_MSG_RESULT([$enable_dashboard_support])
272
273 # check whether to enable 3D transforms support
274 AC_MSG_CHECKING([whether to enable support for 3D Transforms])
275 AC_ARG_ENABLE(3D_transforms,
276               AC_HELP_STRING([--enable-3D-transforms],
277                              [enable support for 3D transforms [default=no]]),
278               [],[enable_3D_transforms="no"])
279 AC_MSG_RESULT([$enable_3D_transforms])
280
281 # check whether to enable channel messaging support
282 AC_MSG_CHECKING([whether to enable HTML5 Channel Messaging support])
283 AC_ARG_ENABLE(channel_messaging,
284               AC_HELP_STRING([--enable-channel-messaging],
285                              [enable HTML5 channel messaging support [default=no]]),
286               [],[enable_channel_messaging="no"])
287 AC_MSG_RESULT([$enable_channel_messaging])
288
289 # check whether to enable HTML5 Offline Web Applications support
290 AC_MSG_CHECKING([whether to enable HTML5 offline web applications support])
291 AC_ARG_ENABLE(offline_web_applications,
292               AC_HELP_STRING([--enable-offline-web-applications],
293                              [enable HTML5 offline web applications support [default=yes]]),
294               [],[enable_offline_web_applications="yes"])
295 AC_MSG_RESULT([$enable_offline_web_applications])
296
297 # check whether to enable HTML5 client-side session and persitent storage support
298 AC_MSG_CHECKING([whether to enable HTML5 client-side session and persistent storage support])
299 AC_ARG_ENABLE(dom_storage,
300               AC_HELP_STRING([--enable-dom-storage],
301                              [enable HTML5 client-side session and persistent storage support [default=yes]]),
302               [],[enable_dom_storage="yes"])
303 AC_MSG_RESULT([$enable_dom_storage])
304
305 # check whether to build with database support
306 AC_MSG_CHECKING([whether to enable HTML5 client-side database storage support])
307 AC_ARG_ENABLE(database,
308               AC_HELP_STRING([--enable-database],
309                              [enable HTML5 client-side database storage support [default=yes]]),
310               [],[enable_database="yes"])
311 AC_MSG_RESULT([$enable_database])
312
313 # check whether to build with icon database support
314 AC_MSG_CHECKING([whether to enable icon database support])
315 AC_ARG_ENABLE(icon_database,
316               AC_HELP_STRING([--enable-icon-database],
317                              [enable icon database [default=yes]]),
318               [],[enable_icon_database="yes"])
319 AC_MSG_RESULT([$enable_icon_database])
320
321 # check whether to enable HTML5 audio/video support
322 AC_MSG_CHECKING([whether to enable HTML5 video support])
323 AC_ARG_ENABLE(video,
324               AC_HELP_STRING([--enable-video],
325                              [enable HTML5 video support [default=no]]),
326               [],[enable_video="no"])
327 AC_MSG_RESULT([$enable_video])
328
329 # check whether to enable XPath support
330 AC_MSG_CHECKING([whether to enable XPath support])
331 AC_ARG_ENABLE(xpath,
332               AC_HELP_STRING([--enable-xpath],
333                              [enable support for XPath [default=yes]]),
334               [],[enable_xpath="yes"])
335 AC_MSG_RESULT([$enable_xpath])
336
337 # check whether to enable XSLT support
338 AC_MSG_CHECKING([whether to enable XSLT support])
339 AC_ARG_ENABLE(xslt,
340               AC_HELP_STRING([--enable-xslt],
341                              [enable support for XSLT [default=yes]]),
342               [],[enable_xslt="yes"])
343 AC_MSG_RESULT([$enable_xslt])
344
345 # check whether to enable geolocation support
346 AC_MSG_CHECKING([whether to enable geolocation support])
347 AC_ARG_ENABLE(geolocation,
348               AC_HELP_STRING([--enable-geolocation],
349                              [enable support for geolocation [default=no]]),
350               [],[enable_geolocation="no"])
351 AC_MSG_RESULT([$enable_geolocation])
352
353 # check whether to enable gnomekeyring support
354 AC_MSG_CHECKING([whether to enable gnomekeyring support])
355 AC_ARG_ENABLE(gnomekeyring,
356               AC_HELP_STRING([--enable-gnomekeyring],
357                              [enable support for gnomekeyring [default=no]]),
358               [],[enable_gnomekeyring="no"])
359 AC_MSG_RESULT([$enable_gnomekeyring])
360
361 # check whether to enable SVG support
362 AC_MSG_CHECKING([whether to enable SVG support])
363 AC_ARG_ENABLE(svg,
364               AC_HELP_STRING([--enable-svg],
365                              [enable support for SVG [default=yes]]),
366               [],[enable_svg="yes"])
367 AC_MSG_RESULT([$enable_svg])
368
369 # check whether to enable WML support
370 AC_MSG_CHECKING([whether to enable WML support])
371 AC_ARG_ENABLE(wml,
372               AC_HELP_STRING([--enable-wml],
373                              [enable support for WML [default=no]]),
374               [],[enable_wml="no"])
375 AC_MSG_RESULT([$enable_wml])
376
377 # check whether to enable Web Workers support
378 AC_MSG_CHECKING([whether to enable Web Workers support])
379 AC_ARG_ENABLE(web_workers,
380               AC_HELP_STRING([--enable-web-workers],
381                              [enable support for Web Workers [default=yes]]),
382               [],[enable_web_workers="yes"])
383 AC_MSG_RESULT([$enable_web_workers])
384
385 # turn off svg features if --disable-svg is requested
386 if test "$enable_svg" = "no"; then
387    enable_svg_animation=no
388    enable_svg_filters=no
389    enable_svg_fonts=no
390    enable_svg_foreign_object=no
391    enable_svg_as_image=no
392    enable_svg_use_element=no
393 fi
394
395 # check whether to enable support for SVG animation
396 AC_MSG_CHECKING([whether to enable support for SVG animation])
397 AC_ARG_ENABLE(svg_animation,
398               AC_HELP_STRING([--enable-svg-animation],
399                              [enable support for SVG animation (experimental) [default=yes]]),
400               [],[enable_svg_animation="yes"])
401 AC_MSG_RESULT([$enable_svg_animation])
402
403 # check whether to enable support for SVG filters
404 AC_MSG_CHECKING([whether to enable support for SVG filters])
405 AC_ARG_ENABLE(svg_filters,
406               AC_HELP_STRING([--enable-svg-filters],
407                              [enable support for SVG filters (experimental) [default=no]]),
408               [],[enable_svg_filters="no"])
409 AC_MSG_RESULT([$enable_svg_filters])
410
411 # check whether to enable support for SVG fonts
412 AC_MSG_CHECKING([whether to enable support for SVG fonts])
413 AC_ARG_ENABLE(svg_fonts,
414               AC_HELP_STRING([--enable-svg-fonts],
415                              [enable support for SVG fonts (experimental) [default=yes]]),
416               [],[enable_svg_fonts="yes"])
417 AC_MSG_RESULT([$enable_svg_fonts])
418
419 # check whether to enable foreign objects support for SVG
420 AC_MSG_CHECKING([whether to enable support for SVG foreign objects])
421 AC_ARG_ENABLE(svg_foreign_object,
422               AC_HELP_STRING([--enable-svg-foreign-object],
423                              [enable support for SVG foreign objects (experimental) [default=yes]]),
424               [],[enable_svg_foreign_object="yes"])
425 AC_MSG_RESULT([$enable_svg_foreign_object])
426
427 # check whether to enable SVG As Image support
428 AC_MSG_CHECKING([whether to enable SVG as Image support])
429 AC_ARG_ENABLE(svg_as_image,
430               AC_HELP_STRING([--enable-svg-as-image],
431                              [enable SVG as Image support (experimental) [default=yes]]),
432               [],[enable_svg_as_image="yes"])
433 AC_MSG_RESULT([$enable_svg_as_image])
434
435 # check whether to enable SVG USE element support
436 AC_MSG_CHECKING([whether to enable support for SVG use element])
437 AC_ARG_ENABLE(svg_use_element,
438               AC_HELP_STRING([--enable-svg-use-element],
439                              [enable SVG use element support (experimental) [default=yes]]),
440               [],[enable_svg_use_element="yes"])
441 AC_MSG_RESULT([$enable_svg_use_element])
442
443 # check for SVG features, enabling SVG if necessary
444 if test "$enable_svg_animation" = "yes" || \
445    test "$enable_svg_filters" = "yes" || \
446    test "$enable_svg_fonts" = "yes" || \
447    test "$enable_svg_foreign_object" = "yes" || \
448    test "$enable_svg_as_image" = "yes" || \
449    test "$enable_svg_use_element" = "yes"; then
450    svg_flags=yes
451    if test "$enable_svg" = "no"; then
452        AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
453        enable_svg=yes
454    fi
455 fi
456
457 # check whether to enable code coverage
458 AC_MSG_CHECKING([whether to enable code coverage support])
459 AC_ARG_ENABLE(coverage,
460               AC_HELP_STRING([--enable-coverage],
461                              [enable code coverage support [default=no]]),
462               [],[enable_coverage="no"])
463 AC_MSG_RESULT([$enable_coverage])
464
465 # check whether to enable FastMalloc
466 AC_MSG_CHECKING([whether to enable optimized memory allocator])
467 AC_ARG_ENABLE(fast_malloc,
468               AC_HELP_STRING([--enable-fast-malloc],
469                              [enable optimized memory allocator default=yes, default=no for debug builds]),
470               [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
471 AC_MSG_RESULT([$enable_fast_malloc])
472
473 AC_MSG_CHECKING([whether to enable JIT compilation])
474 AC_ARG_ENABLE([jit],
475               AC_HELP_STRING([--enable-jit],
476                              [Enable JIT compilation default=yes]),
477               [],[enable_jit="yes"])
478 if test "$enable_jit" = "yes"; then
479     case "$target_cpu" in
480         i*86)
481             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
482             AC_DEFINE([ENABLE_WREC], [1], [Define to enable WREC])
483             AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
484             AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
485             AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
486             AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
487         ;;
488         *)
489             enable_jit="no (CPU '$target_cpu' not supported)"
490         ;;
491     esac
492 fi
493 AC_MSG_RESULT([$enable_jit])
494
495 # determine the font backend
496 AC_MSG_CHECKING([the font backend to use])
497 AC_ARG_WITH(font_backend,
498             AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
499                            [Select font backend [default=freetype]]),
500             [],[with_font_backend="freetype"])
501
502 case "$with_font_backend" in
503      freetype|pango) ;;
504      *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
505 esac
506 AC_MSG_RESULT([$with_font_backend])
507
508 # Add '-g' flag to gcc if it's debug build
509 if test "$enable_debug" = "yes"; then
510    CXXFLAGS="$CXXFLAGS -g"
511    CFLAGS="$CFLAGS -g"
512 else
513    AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
514 fi
515
516 # Add the appropriate 'O' level for optimized builds
517 if test "$enable_optimizations" = "yes"; then
518    CXXFLAGS="$CXXFLAGS -O2"
519    CFLAGS="$CFLAGS -O2"
520 else
521    CXXFLAGS="$CXXFLAGS -O0"
522    CFLAGS="$CFLAGS -O0"
523 fi
524
525 PKG_CHECK_MODULES([LIBSOUP],
526                   [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
527 AC_SUBST([LIBSOUP_CFLAGS])
528 AC_SUBST([LIBSOUP_LIBS])
529
530 if test "$enable_gnomekeyring" = "yes"; then
531    PKG_CHECK_MODULES([GNOMEKEYRING],
532                      [gnome-keyring-1])
533    AC_SUBST([GNOMEKEYRING_CFLAGS])
534    AC_SUBST([GNOMEKEYRING_LIBS])
535 fi
536
537 # check if FreeType/FontConfig are available
538 if test "$with_font_backend" = "freetype"; then
539    if test "$with_target" = "directfb"; then
540    PKG_CHECK_MODULES([FREETYPE],
541                      [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
542                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
543    else
544    PKG_CHECK_MODULES([FREETYPE],
545                      [cairo-ft
546                      fontconfig >= $FONTCONFIG_REQUIRED_VERSION
547                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
548    fi
549    AC_SUBST([FREETYPE_CFLAGS])
550    AC_SUBST([FREETYPE_LIBS])
551 fi
552
553 # check if sqlite 3 is available
554 if test "$enable_icon_database" = "yes" || \
555    test "$enable_database" = "yes" || \
556    test "$enable_offline_web_applications" = "yes" || \
557    test "$enable_dom_storage" = "yes"; then
558    PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE_REQUIRED_VERSION])
559    AC_SUBST([SQLITE3_CFLAGS])
560    AC_SUBST([SQLITE3_LIBS])
561 fi
562
563 # check if libxslt is available
564 if test "$enable_xslt" = "yes"; then
565    PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
566    AC_SUBST([LIBXSLT_CFLAGS])
567    AC_SUBST([LIBXSLT_LIBS])
568 fi
569
570 # check if geoclue is available
571 if test "$enable_geolocation" = "yes"; then
572     PKG_CHECK_MODULES([GEOCLUE], [geoclue])
573     AC_SUBST([GEOCLUE_CFLAGS])
574     AC_SUBST([GEOCLUE_LIBS])
575 fi
576
577 # check if gstreamer is available
578 if test "$enable_video" = "yes"; then
579    PKG_CHECK_MODULES([GSTREAMER],
580                      [gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
581                      gstreamer-base-0.10,
582                      gstreamer-plugins-base-0.10])
583    AC_SUBST([GSTREAMER_CFLAGS])
584    AC_SUBST([GSTREAMER_LIBS])
585 fi
586
587 # check for code coverage support
588 if test "$enable_coverage" = "yes"; then
589    COVERAGE_CFLAGS="-MD"
590    COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
591    AC_SUBST([COVERAGE_CFLAGS])
592    AC_SUBST([COVERAGE_LDFLAGS])
593 fi
594
595 # check for HTML features
596 if test "$enable_video" = "yes"; then
597     html_flags=yes
598 fi
599
600 # OS conditionals
601 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
602 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
603 AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
604 AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
605 AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
606
607 # target conditionals
608 AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
609 AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
610 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
611 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
612
613 # Auth backend conditionals
614 AM_CONDITIONAL([USE_GNOMEKEYRING], [test "$enable_gnomekeyring" = "yes"])
615
616 # Font backend conditionals
617 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
618 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
619
620 # WebKit feature conditionals
621 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
622 AM_CONDITIONAL([ENABLE_DASHBOARD_SUPPORT],[test "$enable_dashboard_support" = "yes"])
623 AM_CONDITIONAL([ENABLE_3D_TRANSFORMS],[test "$enable_3D_transforms" = "yes"])
624 AM_CONDITIONAL([ENABLE_CHANNEL_MESSAGING],[test "$enable_channel_messaging" = "yes"])
625 AM_CONDITIONAL([ENABLE_OFFLINE_WEB_APPLICATIONS],[test "$enable_offline_web_applications" = "yes"])
626 AM_CONDITIONAL([ENABLE_DOM_STORAGE],[test "$enable_dom_storage" = "yes"])
627 AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
628 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
629 AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
630 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
631 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
632 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
633 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
634 AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
635 AM_CONDITIONAL([ENABLE_SVG_FILTERS],[test "$enable_svg_filters" = "yes"])
636 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
637 AM_CONDITIONAL([ENABLE_SVG_FOREIGN_OBJECT],[test "$enable_svg_foreign_object" = "yes"])
638 AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
639 AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use_element" = "yes"])
640 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
641 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
642 AM_CONDITIONAL([ENABLE_WML],[test "$enable_wml" = "yes"])
643 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_web_workers" = "yes"])
644 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
645 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
646
647 AC_CONFIG_FILES([
648 GNUmakefile
649 WebKit/gtk/webkit-1.0.pc:WebKit/gtk/webkit.pc.in
650 WebKit/gtk/webkit/webkitversion.h
651 ]
652 )
653
654 AC_OUTPUT
655
656 echo "
657 WebKit was configured with the following options:
658
659 Build configuration:
660  Enable debugging (slow)                                  : $enable_debug
661  Enable GCC build optimization                            : $enable_optimizations
662  Code coverage support                                    : $enable_coverage
663  Unicode backend                                          : $unicode_backend
664  Font backend                                             : $with_font_backend
665  Optimized memory allocator                               : $enable_fast_malloc
666 Features:
667  3D Transforms                                            : $enable_3D_transforms
668  JIT compilation                                          : $enable_jit
669  Dashboard support                                        : $enable_dashboard_support
670  Geolocation support                                      : $enable_geolocation
671  GNOME Keyring support                                    : $enable_gnomekeyring
672  HTML5 offline web applications support                   : $enable_offline_web_applications
673  HTML5 channel messaging support                          : $enable_channel_messaging
674  HTML5 client-side session and persistent storage support : $enable_dom_storage
675  HTML5 client-side database storage support               : $enable_database
676  HTML5 video element support                              : $enable_video
677  Icon database support                                    : $enable_icon_database
678  SVG support                                              : $enable_svg
679  SVG animation support                                    : $enable_svg_animation
680  SVG filters support                                      : $enable_svg_filters
681  SVG fonts support                                        : $enable_svg_fonts
682  SVG foreign object support                               : $enable_svg_foreign_object
683  SVG as image support                                     : $enable_svg_as_image
684  SVG use element support                                  : $enable_svg_use_element
685  WML support                                              : $enable_wml
686  Web Workers support                                      : $enable_web_workers
687  XPATH support                                            : $enable_xpath
688  XSLT support                                             : $enable_xslt
689 GTK+ configuration:
690  GDK target                                               : $with_target
691  Hildon UI extensions                                     : $with_hildon
692 "