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