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