2008-09-23 Richard Hult <richard@imendio.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], [0])
5 m4_define([webkit_micro_version], [2])
6
7 AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/])
8
9 AC_CONFIG_HEADERS([autotoolsconfig.h])
10
11 WEBKIT_MAJOR_VERSION=webkit_major_version
12 WEBKIT_MINOR_VERSION=webkit_minor_version
13 WEBKIT_MICRO_VERSION=webkit_micro_version
14 AC_SUBST(WEBKIT_MAJOR_VERSION)
15 AC_SUBST(WEBKIT_MINOR_VERSION)
16 AC_SUBST(WEBKIT_MICRO_VERSION)
17
18 AC_CONFIG_SRCDIR([WebCore/config.h])
19
20 dnl # Libtool library version, not to confuse with API version
21 dnl # see http://www.gnu.org/software/libtool/manual.html#Versioning
22 LIBWEBKITGTK_VERSION=1:0:0
23 AC_SUBST([LIBWEBKITGTK_VERSION])
24
25 AM_INIT_AUTOMAKE([foreign subdir-objects])
26
27 AC_CANONICAL_HOST
28
29 # host checking - inspired by the GTK+ configure.in
30 # TODO: os_mac, os_bsd
31 AC_MSG_CHECKING([for native Win32])
32 case "$host" in
33      *-*-mingw*)
34        os_win32=yes
35        ;;
36      *)
37        os_win32=no
38        ;;
39 esac
40 AC_MSG_RESULT([$os_win32])
41
42 case "$host" in
43      *-*-linux*)
44        os_linux=yes
45        ;;
46      *-*-freebsd*)
47        os_freebsd=yes
48        ;;
49      *-*-darwin*)
50        os_darwin=yes
51        ;;
52 esac
53
54 case "$host_os" in
55      gnu* | linux* | k*bsd*-gnu)
56        os_gnu=yes
57        ;;
58      *)
59        os_gnu=no
60        ;;
61 esac
62
63 # If CXXFLAGS and CFLAGS are unset, default to empty.
64 # This is to tell automake not to include '-g' if CXXFLAGS is not set
65 # For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler
66 if test -z "$CXXFLAGS"; then
67    CXXFLAGS=""
68 fi
69 if test -z "$CFLAGS"; then
70    CFLAGS=""
71 fi
72
73 AM_PROG_CC_STDC
74 AM_PROG_CC_C_O
75 AC_PROG_CXX
76 AC_PROG_INSTALL
77 AC_DISABLE_STATIC
78 AC_LIBTOOL_WIN32_DLL
79 AC_PROG_LIBTOOL
80 DOLT
81
82 # check for -fvisibility=hidden compiler support (GCC >= 4)
83 saved_CFLAGS="$CFLAGS"
84 CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
85 AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
86 AC_COMPILE_IFELSE([char foo;],
87       [ AC_MSG_RESULT([yes])
88         SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
89         AC_MSG_RESULT([no]))
90 CFLAGS="$saved_CFLAGS"
91 AC_SUBST(SYMBOL_VISIBILITY)
92 AC_SUBST(SYMBOL_VISIBILITY_INLINES)
93
94 AC_PATH_PROG(PERL, perl)
95 if test -z "$PERL"; then
96    AC_MSG_ERROR([You need 'perl' to compile WebKit])
97 fi
98
99 AC_PATH_PROG(BISON, bison)
100 if test -z "$BISON"; then
101    AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit])
102 fi
103
104 AC_PATH_PROG(FLEX, flex)
105 if test -z "$FLEX"; then
106    AC_MSG_ERROR([You need the 'flex' lexer generator to compile WebKit])
107 else
108    FLEX_VERSION=`$FLEX --version | sed 's,.*\ \([0-9]*\.[0-9]*\.[0-9]*\)$,\1,'`
109    AX_COMPARE_VERSION([2.5.33],[gt],[$FLEX_VERSION],
110       AC_MSG_WARN([You need at least version 2.5.33 of the 'flex' lexer generator to compile WebKit correctly]))
111 fi
112
113 AC_PATH_PROG(GPERF, gperf)
114 if test -z "$GPERF"; then
115    AC_MSG_ERROR([You need the 'gperf' hash function generator to compile WebKit])
116 fi
117
118 AC_PATH_PROG(MV, mv)
119 if test -z "$MV"; then
120    AC_MSG_ERROR([You need 'mv' to compile WebKit])
121 fi
122
123 # GTK+ port only
124 # Check for glib-genmarshal and glib-mkenums
125 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
126 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
127 if test -z "$GLIB_GENMARSHAL" || test -z "$GLIB_MKENUMS"; then
128    AC_MSG_ERROR([You need the GLib dev tools in your path])
129 fi
130
131 # Check whether a C++ was found (AC_PROG_CXX sets $CXX to "g++" even when it
132 # doesn't exist)
133 AC_LANG_PUSH([C++])
134 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[],[AC_MSG_ERROR([No C++ compiler found])])
135 AC_LANG_POP([C++])
136
137 # C/C++ Language Features
138 AC_C_CONST
139 AC_C_INLINE
140 AC_C_VOLATILE
141
142 # C/C++ Headers
143 AC_HEADER_STDC
144 AC_HEADER_STDBOOL
145
146 # pthread (not needed on Windows)
147 if test "$os_win32" = "no"; then
148 AC_CHECK_HEADERS([pthread.h],
149                  AC_DEFINE([HAVE_PTHREAD_H],[1],[Define if pthread exists]),
150                  AC_MSG_ERROR([pthread support is required to build WebKit]))
151 fi
152
153 # check for libjpeg the way Gtk does it.
154 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
155                    jpeg_ok=yes, jpeg_ok=no
156                    AC_MSG_ERROR([JPEG library (libjpeg) not found]))
157 if test "$jpeg_ok" = yes; then
158    AC_MSG_CHECKING([for jpeglib])
159    AC_TRY_CPP(
160 [#include <stdio.h>
161 #undef PACKAGE
162 #undef VERSION
163 #undef HAVE_STDLIB_H
164 #include <jpeglib.h>],
165          jpeg_ok=yes,
166          jpeg_ok=no)
167    AC_MSG_RESULT($jpeg_ok)
168    if test "$jpeg_ok" = yes; then
169       JPEG_LIBS="-ljpeg"
170       # should we check for progressive JPEG like GTK+ as well?
171    else
172       AC_MSG_ERROR([JPEG library (libjpeg) not found])
173    fi
174 fi
175 AC_SUBST([JPEG_LIBS])
176
177 # check for pkg-config
178 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
179 if test "$PKG_CONFIG" = "no"; then
180    AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed in your PATH])
181 fi
182
183 # determine the Unicode backend
184 AC_MSG_CHECKING([the Unicode backend to use])
185 AC_ARG_WITH(unicode_backend,
186             AC_HELP_STRING([--with-unicode-backend=@<:@icu@:>@],
187                            [Select Unicode backend [default=icu]]),
188             [],[unicode_backend="icu"])
189
190 case "$unicode_backend" in
191      icu) ;;
192      *) AC_MSG_ERROR([Invalid Unicode backend: must be icu.]) ;;
193 esac
194
195 AC_MSG_RESULT([$unicode_backend])
196
197 if test "$unicode_backend" = "icu"; then
198         if test "$os_darwin" = "yes"; then
199                 UNICODE_CFLAGS="-I\$(srcdir)/JavaScriptCore/icu -I\$(srcdir)/WebCore/icu"
200                 UNICODE_LIBS="-licucore"
201         elif test "$os_win32" = "yes"; then
202                 UNICODE_CFLAGS=""
203                 UNICODE_LIBS="-licuin -licuuc"
204         else
205                 AC_PATH_PROG(icu_config, icu-config, no)
206                 if test "$icu_config" = "no"; then
207                         AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.])
208                 fi
209
210                 # We don't use --cflags as this gives us a lot of things that we don't
211                 # necessarily want, like debugging and optimization flags
212                 # See man (1) icu-config for more info.
213                 UNICODE_CFLAGS=`$icu_config --cppflags`
214                 UNICODE_LIBS=`$icu_config --ldflags`
215         fi
216 fi
217
218 AC_SUBST([UNICODE_CFLAGS])
219 AC_SUBST([UNICODE_LIBS])
220
221 # determine the GDK/GTK+ target
222 AC_MSG_CHECKING([the target windowing system])
223 AC_ARG_WITH(target,
224             AC_HELP_STRING([--with-target=@<:@x11/win32/quartz/directfb@:>@],
225                            [Select webkit target [default=x11]]),
226             [],[with_target="x11"])
227
228 case "$with_target" in
229      x11|win32|quartz|directfb) ;;
230      *) AC_MSG_ERROR([Invalid target: must be x11, quartz, win32, or directfb.]) ;;
231 esac
232
233 AC_MSG_RESULT([$with_target])
234
235 AC_MSG_CHECKING([for Hildon UI extensions])
236 AC_ARG_WITH(hildon,
237             AC_HELP_STRING([--with-hildon],
238                            [Use Hildon UI extensions [default=no]]),
239             [],[with_hildon="no"])
240 AC_MSG_RESULT([$with_hildon])
241
242 if test "$with_hildon" = "yes"; then
243     HILDON_CPPFLAGS="-DMAEMO_CHANGES"
244     PKG_CHECK_MODULES([HILDON], [hildon-1])
245     AC_SUBST([HILDON_CPPFLAGS])
246     AC_SUBST([HILDON_CFLAGS])
247     AC_SUBST([HILDON_LIBS])
248 fi
249
250 # determine the http backend
251 AC_MSG_CHECKING([the HTTP backend to use])
252 AC_ARG_WITH(http_backend,
253             AC_HELP_STRING([--with-http-backend=@<:@curl/soup@:>@],
254                            [Select HTTP backend [default=curl]]),
255             [],[with_http_backend="curl"])
256
257 case "$with_http_backend" in
258      curl|soup) ;;
259      *) AC_MSG_ERROR([Invalid HTTP backend: must be curl, soup.]) ;;
260 esac
261
262 AC_MSG_RESULT([$with_http_backend])
263
264 # minimum base dependencies
265 CAIRO_REQUIRED_VERSION=1.4
266 FONTCONFIG_REQUIRED_VERSION=2.4
267 FREETYPE2_REQUIRED_VERSION=9.0
268 LIBXML_REQUIRED_VERSION=2.6
269
270 # minimum GTK+ base dependencies
271 GLIB_REQUIRED_VERSION=2.0
272 GOBJECT_REQUIRED_VERSION=2.0
273 GTHREAD_REQUIRED_VERSION=2.0
274 PANGO_REQUIRED_VERSION=1.0
275 GTK_REQUIRED_VERSION=2.8
276
277 # optional modules
278 LIBCURL_REQUIRED_VERSION=7.15
279 LIBSOUP_REQUIRED_VERSION=2.23
280 LIBXSLT_REQUIRED_VERSION=1.1.7
281 SQLITE_REQUIRED_VERSION=3.0
282 GSTREAMER_REQUIRED_VERSION=0.10
283 GNOME_VFS_REQUIRED_VERSION=2.0
284
285 PKG_CHECK_MODULES([GLOBALDEPS],
286                   [glib-2.0 >= $GLIB_REQUIRED_VERSION
287                   gobject-2.0 >= $GOBJECT_REQUIRED_VERSION
288                   gthread-2.0 >= $GTHREAD_REQUIRED_VERSION])
289 AC_SUBST([GLOBALDEPS_CFLAGS])
290 AC_SUBST([GLOBALDEPS_LIBS])
291
292 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION)
293 AC_SUBST(LIBXML_CFLAGS)
294 AC_SUBST(LIBXML_LIBS)
295
296 PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION)
297 AC_SUBST(CAIRO_CFLAGS)
298 AC_SUBST(CAIRO_LIBS)
299
300 PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION)
301 AC_SUBST(PANGO_CFLAGS)
302 AC_SUBST(PANGO_LIBS)
303
304 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION)
305 AC_SUBST(GTK_CFLAGS)
306 AC_SUBST(GTK_LIBS)
307
308 # check for Xt if the target is X11
309 if test "$with_target" = "x11"; then
310    PKG_CHECK_MODULES([XT],
311                      [xt],
312                      [xt_has_pkg_config=yes],
313                      [xt_has_pkg_config=no])
314    # some old versions of Xt do not provide xt.pc, so try to link against Xt
315    # and if it's installed fall back to just adding -lXt
316    if test "$xt_has_pkg_config" = "no"; then
317       # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as
318       # we don't care about the XtOpenDisplay symbol but only about the
319       # existence of libXt
320       AC_CHECK_LIB([Xt], [XtOpenDisplay],
321                    [XT_CFLAGS=""; XT_LIBS="-lXt"],
322                    [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])])
323    fi
324    AC_SUBST([XT_CFLAGS])
325    AC_SUBST([XT_LIBS])
326 fi
327
328 # check whether to build with debugging enabled
329 AC_MSG_CHECKING([whether to do a debug build])
330 AC_ARG_ENABLE(debug,
331               AC_HELP_STRING([--enable-debug],
332                              [turn on debugging [default=no]]),
333               [],[enable_debug="no"])
334 AC_MSG_RESULT([$enable_debug])
335
336 # check whether to enable dashboard support
337 AC_MSG_CHECKING([whether to enable Dashboard support])
338 AC_ARG_ENABLE(dashboard_support,
339               AC_HELP_STRING([--enable-dashboard-support],
340                              [enable Dashboard support [default=yes]]),
341               [],[enable_dashboard_support="yes"])
342 AC_MSG_RESULT([$enable_dashboard_support])
343
344 # check whether to enable HTML5 Offline Web Applications support
345 AC_MSG_CHECKING([whether to enable HTML5 offline web applications support])
346 AC_ARG_ENABLE(offline_web_applications,
347               AC_HELP_STRING([--enable-offline-web-applications],
348                              [enable HTML5 offline web applications support [default=yes]]),
349               [],[enable_offline_web_applications="yes"])
350 AC_MSG_RESULT([$enable_offline_web_applications])
351
352 # check whether to enable HTML5 client-side session and persitent storage support
353 AC_MSG_CHECKING([whether to enable HTML5 client-side session and persistent storage support])
354 AC_ARG_ENABLE(dom_storage,
355               AC_HELP_STRING([--enable-dom-storage],
356                              [enable HTML5 client-side session and persistent storage support [default=yes]]),
357               [],[enable_dom_storage="yes"])
358 AC_MSG_RESULT([$enable_dom_storage])
359
360 # check whether to build with database support
361 AC_MSG_CHECKING([whether to enable HTML5 client-side database storage support])
362 AC_ARG_ENABLE(database,
363               AC_HELP_STRING([--enable-database],
364                              [enable HTML5 client-side database storage support [default=yes]]),
365               [],[enable_database="yes"])
366 AC_MSG_RESULT([$enable_database])
367
368 # check whether to build with icon database support
369 AC_MSG_CHECKING([whether to enable icon database support])
370 AC_ARG_ENABLE(icon_database,
371               AC_HELP_STRING([--enable-icon-database],
372                              [enable icon database [default=yes]]),
373               [],[enable_icon_database="yes"])
374 AC_MSG_RESULT([$enable_icon_database])
375
376 # check whether to enable HTML5 audio/video support
377 AC_MSG_CHECKING([whether to enable HTML5 video support])
378 AC_ARG_ENABLE(video,
379               AC_HELP_STRING([--enable-video],
380                              [enable HTML5 video support [default=no]]),
381               [],[enable_video="no"])
382 AC_MSG_RESULT([$enable_video])
383
384 # check whether to enable XPath support
385 AC_MSG_CHECKING([whether to enable XPath support])
386 AC_ARG_ENABLE(xpath,
387               AC_HELP_STRING([--enable-xpath],
388                              [enable support for XPath [default=yes]]),
389               [],[enable_xpath="yes"])
390 AC_MSG_RESULT([$enable_xpath])
391
392 # check whether to enable XSLT support
393 AC_MSG_CHECKING([whether to enable XSLT support])
394 AC_ARG_ENABLE(xslt,
395               AC_HELP_STRING([--enable-xslt],
396                              [enable support for XSLT [default=yes]]),
397               [],[enable_xslt="yes"])
398 AC_MSG_RESULT([$enable_xslt])
399
400 # check whether to enable SVG support
401 AC_MSG_CHECKING([whether to enable SVG support])
402 AC_ARG_ENABLE(svg,
403               AC_HELP_STRING([--enable-svg],
404                              [enable support for SVG [default=yes]]),
405               [],[enable_svg="yes"])
406 AC_MSG_RESULT([$enable_svg])
407
408 # turn off svg features if --disable-svg is requested
409 if test "$enable_svg" = "no"; then
410    enable_svg_animation=no
411    enable_svg_filters=no
412    enable_svg_fonts=no
413    enable_svg_foreign_object=no
414    enable_svg_as_image=no
415    enable_svg_use_element=no
416 fi
417
418 # check whether to enable support for SVG animation
419 AC_MSG_CHECKING([whether to enable support for SVG animation])
420 AC_ARG_ENABLE(svg_animation,
421               AC_HELP_STRING([--enable-svg-animation],
422                              [enable support for SVG animation (experimental) [default=yes]]),
423               [],[enable_svg_animation="yes"])
424 AC_MSG_RESULT([$enable_svg_animation])
425
426 # check whether to enable support for SVG filters
427 AC_MSG_CHECKING([whether to enable support for SVG filters])
428 AC_ARG_ENABLE(svg_filters,
429               AC_HELP_STRING([--enable-svg-filters],
430                              [enable support for SVG filters (experimental) [default=no]]),
431               [],[enable_svg_filters="no"])
432 AC_MSG_RESULT([$enable_svg_filters])
433
434 # check whether to enable support for SVG fonts
435 AC_MSG_CHECKING([whether to enable support for SVG fonts])
436 AC_ARG_ENABLE(svg_fonts,
437               AC_HELP_STRING([--enable-svg-fonts],
438                              [enable support for SVG fonts (experimental) [default=yes]]),
439               [],[enable_svg_fonts="yes"])
440 AC_MSG_RESULT([$enable_svg_fonts])
441
442 # check whether to enable foreign objects support for SVG
443 AC_MSG_CHECKING([whether to enable support for SVG foreign objects])
444 AC_ARG_ENABLE(svg_foreign_object,
445               AC_HELP_STRING([--enable-svg-foreign-object],
446                              [enable support for SVG foreign objects (experimental) [default=yes]]),
447               [],[enable_svg_foreign_object="yes"])
448 AC_MSG_RESULT([$enable_svg_foreign_object])
449
450 # check whether to enable SVG As Image support
451 AC_MSG_CHECKING([whether to enable SVG as Image support])
452 AC_ARG_ENABLE(svg_as_image,
453               AC_HELP_STRING([--enable-svg-as-image],
454                              [enable SVG as Image support (experimental) [default=yes]]),
455               [],[enable_svg_as_image="yes"])
456 AC_MSG_RESULT([$enable_svg_as_image])
457
458 # check whether to enable SVG USE element support
459 AC_MSG_CHECKING([whether to enable support for SVG use element])
460 AC_ARG_ENABLE(svg_use_element,
461               AC_HELP_STRING([--enable-svg-use-element],
462                              [enable SVG use element support (experimental) [default=yes]]),
463               [],[enable_svg_use_element="yes"])
464 AC_MSG_RESULT([$enable_svg_use_element])
465
466 # check for SVG features, enabling SVG if necessary
467 if test "$enable_svg_animation" = "yes" || \
468    test "$enable_svg_filters" = "yes" || \
469    test "$enable_svg_fonts" = "yes" || \
470    test "$enable_svg_foreign_object" = "yes" || \
471    test "$enable_svg_as_image" = "yes" || \
472    test "$enable_svg_use_element" = "yes"; then
473    svg_flags=yes
474    if test "$enable_svg" = "no"; then
475        AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
476        enable_svg=yes
477    fi
478 fi
479
480 # check whether to enable code coverage
481 AC_MSG_CHECKING([whether to enable code coverage support])
482 AC_ARG_ENABLE(coverage,
483               AC_HELP_STRING([--enable-coverage],
484                              [enable code coverage support [default=no]]),
485               [],[enable_coverage="no"])
486 AC_MSG_RESULT([$enable_coverage])
487
488 # check whether to enable FastMalloc
489 AC_MSG_CHECKING([whether to enable optimized memory allocator])
490 AC_ARG_ENABLE(fast_malloc,
491               AC_HELP_STRING([--enable-fast-malloc],
492                              [enable optimized memory allocator default=yes, default=no for debug builds]),
493               [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
494 AC_MSG_RESULT([$enable_fast_malloc])
495
496 # determine the font backend
497 AC_MSG_CHECKING([the font backend to use])
498 AC_ARG_WITH(font_backend,
499             AC_HELP_STRING([--with-font-backend=@<:@freetype/pango@:>@],
500                            [Select font backend [default=freetype]]),
501             [],[with_font_backend="freetype"])
502
503 case "$with_font_backend" in
504      freetype|pango) ;;
505      *) AC_MSG_ERROR([Invalid font backend: must be freetype or pango.]) ;;
506 esac
507 AC_MSG_RESULT([$with_font_backend])
508
509 # Add '-g' flag to gcc if it's debug build
510 if test "$enable_debug" = "yes"; then
511    CXXFLAGS="$CXXFLAGS -g"
512    CFLAGS="$CFLAGS -g"
513 fi
514
515 # check if curl is available
516 if test "$with_http_backend" = "curl"; then
517    PKG_CHECK_MODULES([LIBCURL],
518                      [libcurl >= $LIBCURL_REQUIRED_VERSION])
519    if test "$os_win32" = "yes"; then
520       LIBCURL_LIBS="$LIBCURL_LIBS -lWs2_32"
521    fi
522    AC_SUBST([LIBCURL_CFLAGS])
523    AC_SUBST([LIBCURL_LIBS])
524 fi
525
526 if test "$with_http_backend" = "soup"; then
527    PKG_CHECK_MODULES([LIBSOUP],
528                      [libsoup-2.4 >= $LIBSOUP_REQUIRED_VERSION])
529    AC_SUBST([LIBSOUP_CFLAGS])
530    AC_SUBST([LIBSOUP_LIBS])
531 fi
532
533 # check if FreeType/FontConfig are available
534 if test "$with_font_backend" = "freetype"; then
535    PKG_CHECK_MODULES([FREETYPE],
536                      [cairo-ft
537                      fontconfig >= $FONTCONFIG_REQUIRED_VERSION
538                      freetype2 >= $FREETYPE2_REQUIRED_VERSION])
539    AC_SUBST([FREETYPE_CFLAGS])
540    AC_SUBST([FREETYPE_LIBS])
541 fi
542
543 # check if sqlite 3 is available
544 if test "$enable_icon_database" = "yes" || \
545    test "$enable_database" = "yes" || \
546    test "$enable_offline_web_applications" = "yes" || \
547    test "$enable_dom_storage" = "yes"; then
548    PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE_REQUIRED_VERSION])
549    AC_SUBST([SQLITE3_CFLAGS])
550    AC_SUBST([SQLITE3_LIBS])
551 fi
552
553 # check if libxslt is available
554 if test "$enable_xslt" = "yes"; then
555    PKG_CHECK_MODULES([LIBXSLT],[libxslt >= $LIBXSLT_REQUIRED_VERSION])
556    AC_SUBST([LIBXSLT_CFLAGS])
557    AC_SUBST([LIBXSLT_LIBS])
558 fi
559
560 # check if gstreamer is available
561 if test "$enable_video" = "yes"; then
562    PKG_CHECK_MODULES([GSTREAMER],
563                      [gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
564                      gstreamer-base-0.10,
565                      gstreamer-plugins-base-0.10,
566                      gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION])
567    AC_SUBST([GSTREAMER_CFLAGS])
568    AC_SUBST([GSTREAMER_LIBS])
569 fi
570
571 # check for code coverage support
572 if test "$enable_coverage" = "yes"; then
573    COVERAGE_CFLAGS="-MD"
574    COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
575    AC_SUBST([COVERAGE_CFLAGS])
576    AC_SUBST([COVERAGE_LDFLAGS])
577 fi
578
579 # check for HTML features
580 if test "$enable_video" = "yes"; then
581     html_flags=yes
582 fi
583
584 # OS conditionals
585 AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
586 AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
587 AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
588 AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
589 AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
590
591 # target conditionals
592 AM_CONDITIONAL([TARGET_X11], [test "$with_target" = "x11"])
593 AM_CONDITIONAL([TARGET_WIN32], [test "$with_target" = "win32"])
594 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
595 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
596
597 # HTTP backend conditionals
598 AM_CONDITIONAL([USE_CURL], [test "$with_http_backend" = "curl"])
599 AM_CONDITIONAL([USE_SOUP], [test "$with_http_backend" = "soup"])
600
601 # Font backend conditionals
602 AM_CONDITIONAL([USE_FREETYPE], [test "$with_font_backend" = "freetype"])
603 AM_CONDITIONAL([USE_PANGO], [test "$with_font_backend" = "pango"])
604
605 # WebKit feature conditionals
606 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
607 AM_CONDITIONAL([ENABLE_DASHBOARD_SUPPORT],[test "$enable_dashboard_support" = "yes"])
608 AM_CONDITIONAL([ENABLE_OFFLINE_WEB_APPLICATIONS],[test "$enable_offline_web_applications" = "yes"])
609 AM_CONDITIONAL([ENABLE_DOM_STORAGE],[test "$enable_dom_storage" = "yes"])
610 AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
611 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
612 AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
613 AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
614 AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
615 AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
616 AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"])
617 AM_CONDITIONAL([ENABLE_SVG_FILTERS],[test "$enable_svg_filters" = "yes"])
618 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
619 AM_CONDITIONAL([ENABLE_SVG_FOREIGN_OBJECT],[test "$enable_svg_foreign_object" = "yes"])
620 AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"])
621 AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use_element" = "yes"])
622 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
623 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
624 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
625 AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"])
626
627 AC_CONFIG_FILES([
628 GNUmakefile
629 WebKit/gtk/webkit-1.0.pc:WebKit/gtk/webkit.pc.in
630 WebKit/gtk/webkit/webkitversion.h
631 ]
632 )
633
634 AC_OUTPUT
635
636 echo "
637 WebKit was configured with the following options:
638
639 Build configuration:
640  Enable debugging (slow)                                  : $enable_debug
641  Code coverage support                                    : $enable_coverage
642  Unicode backend                                          : $unicode_backend
643  HTTP backend                                             : $with_http_backend
644  Font backend                                             : $with_font_backend
645  Optimized memory allocator                               : $enable_fast_malloc
646 Features:
647  Dashboard support                                        : $enable_dashboard_support
648  HTML5 offline web applications support                   : $enable_offline_web_applications
649  HTML5 client-side session and persistent storage support : $enable_dom_storage
650  HTML5 client-side database storage support               : $enable_database
651  HTML5 video element support                              : $enable_video
652  Icon database support                                    : $enable_icon_database
653  SVG support                                              : $enable_svg
654  SVG animation support                                    : $enable_svg_animation
655  SVG filters support                                      : $enable_svg_filters
656  SVG fonts support                                        : $enable_svg_fonts
657  SVG foreign object support                               : $enable_svg_foreign_object
658  SVG as image support                                     : $enable_svg_as_image
659  SVG use element support                                  : $enable_svg_use_element
660  XPATH support                                            : $enable_xpath
661  XSLT support                                             : $enable_xslt
662 GTK+ configuration:
663  GDK target                                               : $with_target
664  Hildon UI extensions                                     : $with_hildon
665 "