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