2009-02-12 Geoffrey Garen <ggaren@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], [0])
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#Versioning
27 LIBWEBKITGTK_VERSION=1:0:0
28 AC_SUBST([LIBWEBKITGTK_VERSION])
29
30 # Recent libtool+automake don't assume you want C++, explicitly enable it
31 AC_PROG_CXX
32
33 AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar])
34
35 # host checking - inspired by the GTK+ configure.in
36 # TODO: move these to webkit.m4?
37 AC_MSG_CHECKING([for native Win32])
38 case "$host" in
39      *-*-mingw*)
40        os_win32=yes
41        ;;
42      *)
43        os_win32=no
44        ;;
45 esac
46 AC_MSG_RESULT([$os_win32])
47
48 case "$host" in
49      *-*-linux*)
50        os_linux=yes
51        ;;
52      *-*-freebsd*)
53        os_freebsd=yes
54        ;;
55      *-*-darwin*)
56        os_darwin=yes
57        ;;
58 esac
59
60 case "$host_os" in
61      gnu* | linux* | k*bsd*-gnu)
62        os_gnu=yes
63        ;;
64      *)
65        os_gnu=no
66        ;;
67 esac
68
69 # initialize webkit options
70 WEBKIT_INIT
71 AC_DISABLE_STATIC
72 AC_LIBTOOL_WIN32_DLL
73 AC_PROG_LIBTOOL
74 # use dolt to speedup the build
75 DOLT
76
77 AC_PATH_PROG(FLEX, flex)
78 if test -z "$FLEX"; then
79    AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit])
80 else
81    FLEX_VERSION=`$FLEX --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'`
82    AX_COMPARE_VERSION([2.5.33],[gt],[$FLEX_VERSION],
83       AC_MSG_WARN([You need at least version 2.5.33 of the 'flex' lexer generator to compile WebKit correctly]))
84 fi
85
86 AC_PATH_PROG(GPERF, gperf)
87 if test -z "$GPERF"; then
88    AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
89 fi
90
91 # pthread (not needed on Windows)
92 if test "$os_win32" = "no"; then
93 AC_CHECK_HEADERS([pthread.h],
94                  AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exists]),
95                  AC_MSG_ERROR([pthread support is required to build WebKit]))
96 fi
97
98 # check for libjpeg the way Gtk does it.
99 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
100                    jpeg_ok=yes, jpeg_ok=no
101                    AC_MSG_ERROR([JPEG library (libjpeg) not found]))
102 if test "$jpeg_ok" = yes; then
103    AC_MSG_CHECKING([for jpeglib])
104    AC_TRY_CPP(
105 [#include <stdio.h>
106 #undef PACKAGE
107 #undef VERSION
108 #undef HAVE_STDLIB_H
109 #include <jpeglib.h>],
110          jpeg_ok=yes,
111          jpeg_ok=no)
112    AC_MSG_RESULT($jpeg_ok)
113    if test "$jpeg_ok" = yes; then
114       JPEG_LIBS="-ljpeg"
115       # should we check for progressive JPEG like GTK+ as well?
116    else
117       AC_MSG_ERROR([JPEG library (libjpeg) not found])
118    fi
119 fi
120 AC_SUBST([JPEG_LIBS])
121
122 # Check for libpng the way Gtk+ does it
123 AC_MSG_CHECKING(for libpng12)
124 if $PKG_CONFIG --exists libpng12 ; then
125     AC_MSG_RESULT(yes)
126     PNG_LIBS=`$PKG_CONFIG --libs libpng12`
127 else
128   AC_MSG_RESULT(no)
129   AC_CHECK_LIB(png, png_read_info,
130     [AC_CHECK_HEADER(png.h,
131       png_ok=yes,
132       png_ok=no)],
133     AC_MSG_ERROR([PNG library (libpng) not found]), -lz -lm)
134   if test "$png_ok" = yes; then
135     AC_MSG_CHECKING([for png_structp in png.h])
136     AC_TRY_COMPILE([#include <png.h>],
137       [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
138       png_ok=yes,
139       png_ok=no)
140     AC_MSG_RESULT($png_ok)
141     if test "$png_ok" = yes; then
142       PNG_LIBS='-lpng -lz'
143     else
144       AC_MSG_ERROR([PNG library (libpng) not found])
145     fi
146   else
147    AC_MSG_ERROR([PNG library (libpng) not found])
148   fi
149 fi
150 AC_SUBST([PNG_LIBS])
151
152 # determine the GDK/GTK+ target
153 AC_MSG_CHECKING([the target windowing system])
154 AC_ARG_WITH(target,
155             AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
156                            [Select webkit target [default=x11]]),
157             [],[with_target="x11"])
158
159 case "$with_target" in
160      x11|win32|quartz|directfb) ;;
161      *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
162 esac
163
164 AC_MSG_RESULT([$with_target])
165
166 AC_MSG_CHECKING([for Hildon UI extensions])
167 AC_ARG_WITH(hildon,
168             AC_HELP_STRING([--with-hildon],
169                            [Use Hildon UI extensions [default=no]]),
170             [],[with_hildon="no"])
171 AC_MSG_RESULT([$with_hildon])
172
173 if test "$with_hildon" = "yes"; then
174     HILDON_CPPFLAGS="-DMAEMO_CHANGES"
175     PKG_CHECK_MODULES([HILDON], [hildon-1])
176     AC_SUBST([HILDON_CPPFLAGS])
177     AC_SUBST([HILDON_CFLAGS])
178     AC_SUBST([HILDON_LIBS])
179 fi
180
181 # determine the http backend
182 AC_MSG_CHECKING([the HTTP backend to use])
183 AC_ARG_WITH(http_backend,
184             AC_HELP_STRING([--with-http-backend=@<:@curl/soup@:>@],
185                            [Select HTTP backend [default=soup]]),
186             [],[with_http_backend="soup"])
187
188 case "$with_http_backend" in
189      curl|soup) ;;
190      *) AC_MSG_ERROR([Invalid HTTP backend: must be curl, soup.]) ;;
191 esac
192
193 AC_MSG_RESULT([$with_http_backend])
194
195 # minimum base dependencies
196 CAIRO_REQUIRED_VERSION=1.2
197 FONTCONFIG_REQUIRED_VERSION=2.4
198 FREETYPE2_REQUIRED_VERSION=9.0
199 LIBXML_REQUIRED_VERSION=2.6
200
201 # minimum GTK+ base dependencies
202 PANGO_REQUIRED_VERSION=1.0
203 GTK_REQUIRED_VERSION=2.8
204
205 # optional modules
206 LIBCURL_REQUIRED_VERSION=7.15
207 LIBSOUP_REQUIRED_VERSION=2.23
208 LIBXSLT_REQUIRED_VERSION=1.1.7
209 SQLITE_REQUIRED_VERSION=3.0
210 GSTREAMER_REQUIRED_VERSION=0.10
211
212 # Available modules
213 #
214 # glib - glib and includes gthread
215 # unicode - check and identify which unicode backend to use
216 #
217 # todo: webcore gtk
218 WEBKIT_CHECK_DEPENDENCIES([glib unicode])
219                           
220 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
221 AC_SUBST(LIBXML_CFLAGS)
222 AC_SUBST(LIBXML_LIBS)
223
224 PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION)
225 AC_SUBST(PANGO_CFLAGS)
226 AC_SUBST(PANGO_LIBS)
227
228 # check for target-specific dependencies
229 if test "$with_target" = "directfb"; then
230    PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION)
231    PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION)
232    AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB])
233 else
234    PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
235    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION)
236
237    if test "$with_target" = "x11" && test "$os_win32" = "no"; then
238       # check for XT
239       PKG_CHECK_MODULES([XT],
240                         [xt],
241                         [xt_has_pkg_config=yes],
242                         [xt_has_pkg_config=no])
243       # some old versions of Xt do not provide xt.pc, so try to link against Xt
244       # and if it's installed fall back to just adding -lXt
245       if test "$xt_has_pkg_config" = "no"; then
246          # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
247          # we don't care about the XtOpenDisplay symbol but only about the
248          # existence of libXt
249          AC_CHECK_LIB([Xt], [XtOpenDisplay],
250                       [XT_CFLAGS=""; XT_LIBS="-lXt"],
251                       [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
252       fi
253       AC_SUBST([XT_CFLAGS])
254       AC_SUBST([XT_LIBS])
255       AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11])
256    fi
257 fi
258 AC_SUBST(GTK_CFLAGS)
259 AC_SUBST(GTK_LIBS)
260 AC_SUBST(CAIRO_CFLAGS)
261 AC_SUBST(CAIRO_LIBS)
262
263 # check whether to build with debugging enabled
264 AC_MSG_CHECKING([whether to do a debug build])
265 AC_ARG_ENABLE(debug,
266               AC_HELP_STRING([--enable-debug],
267                              [turn on debugging [default=no]]),
268               [],[enable_debug="no"])
269 AC_MSG_RESULT([$enable_debug])
270
271 # check whether to enable optimized builds
272 AC_MSG_CHECKING([whether to enable optimized builds])
273 AC_ARG_ENABLE(optimizations,
274               AC_HELP_STRING([--enable-optimizations],
275                              [turn on optimize builds (GCC only)
276                              [default=yes]]),
277               [enable_optimizations=$enableval],
278               [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi])
279 AC_MSG_RESULT([$enable_optimizations])
280
281 # check whether to enable dashboard support
282 AC_MSG_CHECKING([whether to enable Dashboard support])
283 AC_ARG_ENABLE(dashboard_support,
284               AC_HELP_STRING([--enable-dashboard-support],
285                              [enable Dashboard support [default=yes]]),
286               [],[enable_dashboard_support="yes"])
287 AC_MSG_RESULT([$enable_dashboard_support])
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 SVG support
354 AC_MSG_CHECKING([whether to enable SVG support])
355 AC_ARG_ENABLE(svg,
356               AC_HELP_STRING([--enable-svg],
357                              [enable support for SVG [default=yes]]),
358               [],[enable_svg="yes"])
359 AC_MSG_RESULT([$enable_svg])
360
361 # check whether to enable WML support
362 AC_MSG_CHECKING([whether to enable WML support])
363 AC_ARG_ENABLE(wml,
364               AC_HELP_STRING([--enable-wml],
365                              [enable support for WML [default=no]]),
366               [],[enable_wml="no"])
367 AC_MSG_RESULT([$enable_wml])
368
369 # check whether to enable Web Workers support
370 AC_MSG_CHECKING([whether to enable Web Workers support])
371 AC_ARG_ENABLE(web_workers,
372               AC_HELP_STRING([--enable-workers],
373                              [enable support for Web Workers [default=yes]]),
374               [],[enable_web_workers="yes"])
375 AC_MSG_RESULT([$enable_web_workers])
376
377 # turn off svg features if --disable-svg is requested
378 if test "$enable_svg" = "no"; then
379    enable_svg_animation=no
380    enable_svg_filters=no
381    enable_svg_fonts=no
382    enable_svg_foreign_object=no
383    enable_svg_as_image=no
384    enable_svg_use_element=no
385 fi
386
387 # check whether to enable support for SVG animation
388 AC_MSG_CHECKING([whether to enable support for SVG animation])
389 AC_ARG_ENABLE(svg_animation,
390               AC_HELP_STRING([--enable-svg-animation],
391                              [enable support for SVG animation (experimental) [default=yes]]),
392               [],[enable_svg_animation="yes"])
393 AC_MSG_RESULT([$enable_svg_animation])
394
395 # check whether to enable support for SVG filters
396 AC_MSG_CHECKING([whether to enable support for SVG filters])
397 AC_ARG_ENABLE(svg_filters,
398               AC_HELP_STRING([--enable-svg-filters],
399                              [enable support for SVG filters (experimental) [default=no]]),
400               [],[enable_svg_filters="no"])
401 AC_MSG_RESULT([$enable_svg_filters])
402
403 # check whether to enable support for SVG fonts
404 AC_MSG_CHECKING([whether to enable support for SVG fonts])
405 AC_ARG_ENABLE(svg_fonts,
406               AC_HELP_STRING([--enable-svg-fonts],
407                              [enable support for SVG fonts (experimental) [default=yes]]),
408               [],[enable_svg_fonts="yes"])
409 AC_MSG_RESULT([$enable_svg_fonts])
410
411 # check whether to enable foreign objects support for SVG
412 AC_MSG_CHECKING([whether to enable support for SVG foreign objects])
413 AC_ARG_ENABLE(svg_foreign_object,
414               AC_HELP_STRING([--enable-svg-foreign-object],
415                              [enable support for SVG foreign objects (experimental) [default=yes]]),
416               [],[enable_svg_foreign_object="yes"])
417 AC_MSG_RESULT([$enable_svg_foreign_object])
418
419 # check whether to enable SVG As Image support
420 AC_MSG_CHECKING([whether to enable SVG as Image support])
421 AC_ARG_ENABLE(svg_as_image,
422               AC_HELP_STRING([--enable-svg-as-image],
423                              [enable SVG as Image support (experimental) [default=yes]]),
424               [],[enable_svg_as_image="yes"])
425 AC_MSG_RESULT([$enable_svg_as_image])
426
427 # check whether to enable SVG USE element support
428 AC_MSG_CHECKING([whether to enable support for SVG use element])
429 AC_ARG_ENABLE(svg_use_element,
430               AC_HELP_STRING([--enable-svg-use-element],
431                              [enable SVG use element support (experimental) [default=yes]]),
432               [],[enable_svg_use_element="yes"])
433 AC_MSG_RESULT([$enable_svg_use_element])
434
435 # check for SVG features, enabling SVG if necessary
436 if test "$enable_svg_animation" = "yes" || \
437    test "$enable_svg_filters" = "yes" || \
438    test "$enable_svg_fonts" = "yes" || \
439    test "$enable_svg_foreign_object" = "yes" || \
440    test "$enable_svg_as_image" = "yes" || \
441    test "$enable_svg_use_element" = "yes"; then
442    svg_flags=yes
443    if test "$enable_svg" = "no"; then
444        AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
445        enable_svg=yes
446    fi
447 fi
448
449 # check whether to enable code coverage
450 AC_MSG_CHECKING([whether to enable code coverage support])
451 AC_ARG_ENABLE(coverage,
452               AC_HELP_STRING([--enable-coverage],
453                              [enable code coverage support [default=no]]),
454               [],[enable_coverage="no"])
455 AC_MSG_RESULT([$enable_coverage])
456
457 # check whether to enable FastMalloc
458 AC_MSG_CHECKING([whether to enable optimized memory allocator])
459 AC_ARG_ENABLE(fast_malloc,
460               AC_HELP_STRING([--enable-fast-malloc],
461                              [enable optimized memory allocator default=yes, default=no for debug builds]),
462               [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
463 AC_MSG_RESULT([$enable_fast_malloc])
464
465 AC_MSG_CHECKING([whether to enable JIT compilation])
466 AC_ARG_ENABLE([jit],
467               AC_HELP_STRING([--enable-jit],
468                              [Enable JIT compilation default=yes]),
469               [],[enable_jit="yes"])
470 if test "$enable_jit" = "yes"; then
471     case "$target_cpu" in
472         i*86)
473             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
474             AC_DEFINE([ENABLE_WREC], [1], [Define to enable WREC])
475             AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
476             AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
477             AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
478             AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
479         ;;
480         *)
481             enable_jit="no (CPU '$target_cpu' not supported)"
482         ;;
483     esac
484 fi
485 AC_MSG_RESULT([$enable_jit])
486
487 # determine the font backend
488 AC_MSG_CHECKING([the font backend to use])
489 AC_ARG_WITH(font_backend,
490             AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
491                            [Select font backend [default=freetype]]),
492             [],[with_font_backend="freetype"])
493
494 case "$with_font_backend" in
495      freetype|pango) ;;
496      *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
497 esac
498 AC_MSG_RESULT([$with_font_backend])
499
500 # Add '-g' flag to gcc if it's debug build
501 if test "$enable_debug" = "yes"; then
502    CXXFLAGS="$CXXFLAGS -g"
503    CFLAGS="$CFLAGS -g"
504 else
505    AC_DEFINE([NDEBUG], [1], [Define to disable debugging features])
506 fi
507
508 # Add the appropriate 'O' level for optimized builds
509 if test "$enable_optimizations" = "yes"; then
510    CXXFLAGS="$CXXFLAGS -O2"
511    CFLAGS="$CFLAGS -O2"
512 else
513    CXXFLAGS="$CXXFLAGS -O0"
514    CFLAGS="$CFLAGS -O0"
515 fi
516
517 # check if curl is available
518 if test "$with_http_backend" = "curl"; then
519    PKG_CHECK_MODULES([LIBCURL],
520                      [libcurl >= $LIBCURL_REQUIRED_VERSION])
521    if test "$os_win32" = "yes"; then
522       LIBCURL_LIBS="$LIBCURL_LIBS -lws2_32"
523    fi
524    AC_SUBST([LIBCURL_CFLAGS])
525    AC_SUBST([LIBCURL_LIBS])
526 fi
527
528 if test "$with_http_backend" = "soup"; then
529    PKG_CHECK_MODULES([LIBSOUP],
530                      [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
531    AC_SUBST([LIBSOUP_CFLAGS])
532    AC_SUBST([LIBSOUP_LIBS])
533 fi
534
535 # check if FreeType/FontConfig are available
536 if test "$with_font_backend" = "freetype"; then
537    if test "$with_target" = "directfb"; then
538    PKG_CHECK_MODULES([FREETYPE],
539                      [fontconfig >= $FONTCONFIG_REQUIRED_VERSION
540                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
541    else
542    PKG_CHECK_MODULES([FREETYPE],
543                      [cairo-ft
544                      pangoft2
545                      fontconfig >= $FONTCONFIG_REQUIRED_VERSION
546                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
547    fi
548    AC_SUBST([FREETYPE_CFLAGS])
549    AC_SUBST([FREETYPE_LIBS])
550 fi
551
552 # check if sqlite 3 is available
553 if test "$enable_icon_database" = "yes" || \
554    test "$enable_database" = "yes" || \
555    test "$enable_offline_web_applications" = "yes" || \
556    test "$enable_dom_storage" = "yes"; then
557    PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE_REQUIRED_VERSION])
558    AC_SUBST([SQLITE3_CFLAGS])
559    AC_SUBST([SQLITE3_LIBS])
560 fi
561
562 # check if libxslt is available
563 if test "$enable_xslt" = "yes"; then
564    PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
565    AC_SUBST([LIBXSLT_CFLAGS])
566    AC_SUBST([LIBXSLT_LIBS])
567 fi
568
569 # check if geoclue is available
570 if test "$enable_geolocation" = "yes"; then
571     PKG_CHECK_MODULES([GEOCLUE], [geoclue])
572     AC_SUBST([GEOCLUE_CFLAGS])
573     AC_SUBST([GEOCLUE_LIBS])
574 fi
575
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 # HTTP backend conditionals
614 AM_CONDITIONAL([USE_CURL], [test "$with_http_backend" = "curl"])
615 AM_CONDITIONAL([USE_SOUP], [test "$with_http_backend" = "soup"])
616
617 # Font backend conditionals
618 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
619 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
620
621 # WebKit feature conditionals
622 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
623 AM_CONDITIONAL([ENABLE_DASHBOARD_SUPPORT],[test "$enable_dashboard_support" = "yes"])
624 AM_CONDITIONAL([ENABLE_OFFLINE_WEB_APPLICATIONS],[test "$enable_offline_web_applications" = "yes"])
625 AM_CONDITIONAL([ENABLE_DOM_STORAGE],[test "$enable_dom_storage" = "yes"])
626 AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
627 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
628 AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
629 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
630 AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"])
631 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
632 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
633 AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
634 AM_CONDITIONAL([ENABLE_SVG_FILTERS],[test "$enable_svg_filters" = "yes"])
635 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
636 AM_CONDITIONAL([ENABLE_SVG_FOREIGN_OBJECT],[test "$enable_svg_foreign_object" = "yes"])
637 AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
638 AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use_element" = "yes"])
639 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
640 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
641 AM_CONDITIONAL([ENABLE_WML],[test "$enable_wml" = "yes"])
642 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_web_workers" = "yes"])
643 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
644 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
645
646 AC_CONFIG_FILES([
647 GNUmakefile
648 WebKit/gtk/webkit-1.0.pc:WebKit/gtk/webkit.pc.in
649 WebKit/gtk/webkit/webkitversion.h
650 ]
651 )
652
653 AC_OUTPUT
654
655 echo "
656 WebKit was configured with the following options:
657
658 Build configuration:
659  Enable debugging (slow)                                  : $enable_debug
660  Enable GCC build optimization                            : $enable_optimizations
661  Code coverage support                                    : $enable_coverage
662  Unicode backend                                          : $unicode_backend
663  HTTP backend                                             : $with_http_backend
664  Font backend                                             : $with_font_backend
665  Optimized memory allocator                               : $enable_fast_malloc
666 Features:
667  JIT compilation                                          : $enable_jit
668  Dashboard support                                        : $enable_dashboard_support
669  HTML5 offline web applications support                   : $enable_offline_web_applications
670  HTML5 client-side session and persistent storage support : $enable_dom_storage
671  HTML5 client-side database storage support               : $enable_database
672  HTML5 video element support                              : $enable_video
673  Icon database support                                    : $enable_icon_database
674  SVG support                                              : $enable_svg
675  SVG animation support                                    : $enable_svg_animation
676  SVG filters support                                      : $enable_svg_filters
677  SVG fonts support                                        : $enable_svg_fonts
678  SVG foreign object support                               : $enable_svg_foreign_object
679  SVG as image support                                     : $enable_svg_as_image
680  SVG use element support                                  : $enable_svg_use_element
681  XPATH support                                            : $enable_xpath
682  XSLT support                                             : $enable_xslt
683  WML support                                              : $enable_wml
684  Web Workers support                                      : $enable_web_workers
685  Geolocation support                                      : $enable_geolocation
686 GTK+ configuration:
687  GDK target                                               : $with_target
688  Hildon UI extensions                                     : $with_hildon
689 "