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