diff options
Diffstat (limited to 'packages/webkit/webkit-gtk/configure.ac')
-rw-r--r-- | packages/webkit/webkit-gtk/configure.ac | 234 |
1 files changed, 189 insertions, 45 deletions
diff --git a/packages/webkit/webkit-gtk/configure.ac b/packages/webkit/webkit-gtk/configure.ac index 579891cbe0..7b451efe96 100644 --- a/packages/webkit/webkit-gtk/configure.ac +++ b/packages/webkit/webkit-gtk/configure.ac @@ -1,12 +1,13 @@ AC_PREREQ(2.59) m4_define([webkit_major_version], [1]) -m4_define([webkit_minor_version], [0]) -m4_define([webkit_micro_version], [2]) +m4_define([webkit_minor_version], [1]) +m4_define([webkit_micro_version], [0]) AC_INIT([WebKit],[webkit_major_version.webkit_minor_version.webkit_micro_version],[http://bugs.webkit.org/]) AC_CONFIG_HEADERS([autotoolsconfig.h]) +AC_CANONICAL_SYSTEM WEBKIT_MAJOR_VERSION=webkit_major_version WEBKIT_MINOR_VERSION=webkit_minor_version @@ -22,9 +23,7 @@ dnl # see http://www.gnu.org/software/libtool/manual.html#Versioning LIBWEBKITGTK_VERSION=1:0:0 AC_SUBST([LIBWEBKITGTK_VERSION]) -AM_INIT_AUTOMAKE([foreign subdir-objects]) - -AC_CANONICAL_HOST +AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar]) # host checking - inspired by the GTK+ configure.in # TODO: os_mac, os_bsd @@ -51,6 +50,15 @@ case "$host" in ;; esac +case "$host_os" in + gnu* | linux* | k*bsd*-gnu) + os_gnu=yes + ;; + *) + os_gnu=no + ;; +esac + # If CXXFLAGS and CFLAGS are unset, default to empty. # This is to tell automake not to include '-g' if CXXFLAGS is not set # For more info - http://www.gnu.org/software/automake/manual/autoconf.html#C_002b_002b-Compiler @@ -68,6 +76,7 @@ AC_PROG_INSTALL AC_DISABLE_STATIC AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL +AC_SYS_LARGEFILE DOLT # check for -fvisibility=hidden compiler support (GCC >= 4) @@ -90,6 +99,15 @@ fi AC_PATH_PROG(BISON, bison) if test -z "$BISON"; then AC_MSG_ERROR([You need the 'bison' parser generator to compile WebKit]) +else + case "$target_cpu" in + arm) + BISON_VERSION=`$BISON --version | head -n1 | sed 's,.*\ \([0-9]*\.[0-9]*\)$,\1,'` + AX_COMPARE_VERSION([2.2],[gt],[$BISON_VERSION], + echo "Autoconf say: I'm broken, ignore me") + ;; + *) ;; + esac fi AC_PATH_PROG(FLEX, flex) @@ -171,6 +189,36 @@ if test "$PKG_CONFIG" = "no"; then AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed in your PATH]) fi +# Check for libpng the way Gtk+ does it +AC_MSG_CHECKING(for libpng12) +if $PKG_CONFIG --exists libpng12 ; then + AC_MSG_RESULT(yes) + PNG_LIBS=`$PKG_CONFIG --libs libpng12` +else + AC_MSG_RESULT(no) + AC_CHECK_LIB(png, png_read_info, + [AC_CHECK_HEADER(png.h, + png_ok=yes, + png_ok=no)], + AC_MSG_ERROR([PNG library (libpng) not found]), -lz -lm) + if test "$png_ok" = yes; then + AC_MSG_CHECKING([for png_structp in png.h]) + AC_TRY_COMPILE([#include <png.h>], + [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;], + png_ok=yes, + png_ok=no) + AC_MSG_RESULT($png_ok) + if test "$png_ok" = yes; then + PNG_LIBS='-lpng -lz' + else + AC_MSG_ERROR([PNG library (libpng) not found]) + fi + else + AC_MSG_ERROR([PNG library (libpng) not found]) + fi +fi +AC_SUBST([PNG_LIBS]) + # determine the Unicode backend AC_MSG_CHECKING([the Unicode backend to use]) AC_ARG_WITH(unicode_backend, @@ -186,18 +234,18 @@ esac AC_MSG_RESULT([$unicode_backend]) if test "$unicode_backend" = "icu"; then - if test "$os_darwin" = "yes"; then - UNICODE_CFLAGS="-I\$(srcdir)/JavaScriptCore/icu -I\$(srcdir)/WebCore/icu" - UNICODE_LIBS="-licucore" - elif test "$os_win32" = "yes"; then - UNICODE_CFLAGS="" - UNICODE_LIBS="-licuin -licuuc" - else - AC_PATH_PROG(icu_config, icu-config, no) - if test "$icu_config" = "no"; then + AC_PATH_PROG(icu_config, icu-config, no) + if test "$icu_config" = "no"; then + if test "$os_darwin" = "yes"; then + UNICODE_CFLAGS="-I\$(srcdir)/JavaScriptCore/icu -I\$(srcdir)/WebCore/icu" + UNICODE_LIBS="-licucore" + elif test "$os_win32" = "yes"; then + UNICODE_CFLAGS="" + UNICODE_LIBS="-licuin -licuuc" + else AC_MSG_ERROR([Cannot find icu-config. The ICU library is needed.]) fi - + else # We don't use --cflags as this gives us a lot of things that we don't # necessarily want, like debugging and optimization flags # See man (1) icu-config for more info. @@ -253,7 +301,7 @@ esac AC_MSG_RESULT([$with_http_backend]) # minimum base dependencies -CAIRO_REQUIRED_VERSION=1.4 +CAIRO_REQUIRED_VERSION=1.2 FONTCONFIG_REQUIRED_VERSION=2.4 FREETYPE2_REQUIRED_VERSION=9.0 LIBXML_REQUIRED_VERSION=2.6 @@ -271,7 +319,6 @@ LIBSOUP_REQUIRED_VERSION=2.23 LIBXSLT_REQUIRED_VERSION=1.1.7 SQLITE_REQUIRED_VERSION=3.0 GSTREAMER_REQUIRED_VERSION=0.10 -GNOME_VFS_REQUIRED_VERSION=2.0 PKG_CHECK_MODULES([GLOBALDEPS], [glib-2.0 >= $GLIB_REQUIRED_VERSION @@ -280,33 +327,48 @@ PKG_CHECK_MODULES([GLOBALDEPS], AC_SUBST([GLOBALDEPS_CFLAGS]) AC_SUBST([GLOBALDEPS_LIBS]) -PKG_CHECK_MODULES([WEBKITDEPS], - [gtk+-2.0 >= $GTK_REQUIRED_VERSION - pango >= $PANGO_REQUIRED_VERSION - cairo >= $CAIRO_REQUIRED_VERSION - libxml-2.0 >= $LIBXML_REQUIRED_VERSION]) -AC_SUBST([WEBKITDEPS_CFLAGS]) -AC_SUBST([WEBKITDEPS_LIBS]) - -# check for Xt if the target is X11 -if test "$with_target" = "x11"; then - PKG_CHECK_MODULES([XT], - [xt], - [xt_has_pkg_config=yes], - [xt_has_pkg_config=no]) - # some old versions of Xt do not provide xt.pc, so try to link against Xt - # and if it's installed fall back to just adding -lXt - if test "$xt_has_pkg_config" = "no"; then - # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as - # we don't care about the XtOpenDisplay symbol but only about the - # existence of libXt - AC_CHECK_LIB([Xt], [XtOpenDisplay], - [XT_CFLAGS=""; XT_LIBS="-lXt"], - [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])]) +PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED_VERSION) +AC_SUBST(LIBXML_CFLAGS) +AC_SUBST(LIBXML_LIBS) + +PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION) +AC_SUBST(PANGO_CFLAGS) +AC_SUBST(PANGO_LIBS) + +# check for target-specific dependencies +if test "$with_target" = "directfb"; then + PKG_CHECK_MODULES(CAIRO, cairo-directfb >= $CAIRO_REQUIRED_VERSION) + PKG_CHECK_MODULES(GTK, gtk+-directfb-2.0 >= $GTK_REQUIRED_VERSION) + AC_DEFINE([WTF_PLATFORM_DIRECTFB],[1],[Define if target is DirectFB]) +else + PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION) + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION) + + if test "$with_target" = "x11" && test "$os_win32" = "no"; then + # check for XT + PKG_CHECK_MODULES([XT], + [xt], + [xt_has_pkg_config=yes], + [xt_has_pkg_config=no]) + # some old versions of Xt do not provide xt.pc, so try to link against Xt + # and if it's installed fall back to just adding -lXt + if test "$xt_has_pkg_config" = "no"; then + # using AC_CHECK_LIB instead of AC_SEARCH_LIB is fine in this case as + # we don't care about the XtOpenDisplay symbol but only about the + # existence of libXt + AC_CHECK_LIB([Xt], [XtOpenDisplay], + [XT_CFLAGS=""; XT_LIBS="-lXt"], + [AC_MSG_ERROR([X Toolkit Intrinsics library (libXt) not found])]) + fi + AC_SUBST([XT_CFLAGS]) + AC_SUBST([XT_LIBS]) + AC_DEFINE([WTF_PLATFORM_X11],[1],[Define if target is X11]) fi - AC_SUBST([XT_CFLAGS]) - AC_SUBST([XT_LIBS]) fi +AC_SUBST(GTK_CFLAGS) +AC_SUBST(GTK_LIBS) +AC_SUBST(CAIRO_CFLAGS) +AC_SUBST(CAIRO_LIBS) # check whether to build with debugging enabled AC_MSG_CHECKING([whether to do a debug build]) @@ -316,6 +378,16 @@ AC_ARG_ENABLE(debug, [],[enable_debug="no"]) AC_MSG_RESULT([$enable_debug]) +# check whether to enable optimized builds +AC_MSG_CHECKING([whether to enable optimized builds]) +AC_ARG_ENABLE(optimizations, + AC_HELP_STRING([--enable-optimizations], + [turn on optimize builds (GCC only) + [default=yes]]), + [enable_optimizations=$enableval], + [if test "$enable_debug" = "yes"; then enable_optimizations="no"; else enable_optimizations="yes"; fi]) +AC_MSG_RESULT([$enable_optimizations]) + # check whether to enable dashboard support AC_MSG_CHECKING([whether to enable Dashboard support]) AC_ARG_ENABLE(dashboard_support, @@ -380,6 +452,14 @@ AC_ARG_ENABLE(xslt, [],[enable_xslt="yes"]) AC_MSG_RESULT([$enable_xslt]) +# check whether to enable geolocation support +AC_MSG_CHECKING([whether to enable geolocation support]) +AC_ARG_ENABLE(geolocation, + AC_HELP_STRING([--enable-geolocation], + [enable support for geolocation [default=yes]]), + [],[enable_geolocation="yes"]) +AC_MSG_RESULT([$enable_geolocation]) + # check whether to enable SVG support AC_MSG_CHECKING([whether to enable SVG support]) AC_ARG_ENABLE(svg, @@ -388,6 +468,22 @@ AC_ARG_ENABLE(svg, [],[enable_svg="yes"]) AC_MSG_RESULT([$enable_svg]) +# check whether to enable WML support +AC_MSG_CHECKING([whether to enable WML support]) +AC_ARG_ENABLE(wml, + AC_HELP_STRING([--enable-wml], + [enable support for WML [default=no]]), + [],[enable_wml="no"]) +AC_MSG_RESULT([$enable_wml]) + +# check whether to enable Web Workers support +AC_MSG_CHECKING([whether to enable Web Workers support]) +AC_ARG_ENABLE(web_workers, + AC_HELP_STRING([--enable-workers], + [enable support for Web Workers [default=yes]]), + [],[enable_web_workers="yes"]) +AC_MSG_RESULT([$enable_web_workers]) + # turn off svg features if --disable-svg is requested if test "$enable_svg" = "no"; then enable_svg_animation=no @@ -476,6 +572,28 @@ AC_ARG_ENABLE(fast_malloc, [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi]) AC_MSG_RESULT([$enable_fast_malloc]) +AC_MSG_CHECKING([whether to enable JIT compilation]) +AC_ARG_ENABLE([jit], + AC_HELP_STRING([--enable-jit], + [Enable JIT compilation default=yes]), + [],[enable_jit="yes"]) +if test "$enable_jit" = "yes"; then + case "$target_cpu" in + i*86) + AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT]) + AC_DEFINE([ENABLE_WREC], [1], [Define to enable WREC]) + AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls]) + AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access]) + AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic]) + AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list]) + ;; + *) + enable_jit="no (CPU '$target_cpu' not supported)" + ;; + esac +fi +AC_MSG_RESULT([$enable_jit]) + # determine the font backend AC_MSG_CHECKING([the font backend to use]) AC_ARG_WITH(font_backend, @@ -493,6 +611,17 @@ AC_MSG_RESULT([$with_font_backend]) if test "$enable_debug" = "yes"; then CXXFLAGS="$CXXFLAGS -g" CFLAGS="$CFLAGS -g" +else + AC_DEFINE([NDEBUG], [1], [Define to disable debugging features]) +fi + +# Add the appropriate 'O' level for optimized builds +if test "$enable_optimizations" = "yes"; then + CXXFLAGS="$CXXFLAGS -O2" + CFLAGS="$CFLAGS -O2" +else + CXXFLAGS="$CXXFLAGS -O0" + CFLAGS="$CFLAGS -O0" fi # check if curl is available @@ -500,7 +629,7 @@ if test "$with_http_backend" = "curl"; then PKG_CHECK_MODULES([LIBCURL], [libcurl >= $LIBCURL_REQUIRED_VERSION]) if test "$os_win32" = "yes"; then - LIBCURL_LIBS="$LIBCURL_LIBS -lWs2_32" + LIBCURL_LIBS="$LIBCURL_LIBS -lws2_32" fi AC_SUBST([LIBCURL_CFLAGS]) AC_SUBST([LIBCURL_LIBS]) @@ -515,10 +644,17 @@ fi # check if FreeType/FontConfig are available if test "$with_font_backend" = "freetype"; then + if test "$with_target" = "directfb"; then + PKG_CHECK_MODULES([FREETYPE], + [fontconfig >= $FONTCONFIG_REQUIRED_VERSION + freetype2 >= $FREETYPE2_REQUIRED_VERSION]) + else PKG_CHECK_MODULES([FREETYPE], [cairo-ft + pangoft2 fontconfig >= $FONTCONFIG_REQUIRED_VERSION freetype2 >= $FREETYPE2_REQUIRED_VERSION]) + fi AC_SUBST([FREETYPE_CFLAGS]) AC_SUBST([FREETYPE_LIBS]) fi @@ -545,8 +681,7 @@ if test "$enable_video" = "yes"; then PKG_CHECK_MODULES([GSTREAMER], [gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION gstreamer-base-0.10, - gstreamer-plugins-base-0.10, - gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED_VERSION]) + gstreamer-plugins-base-0.10]) AC_SUBST([GSTREAMER_CFLAGS]) AC_SUBST([GSTREAMER_LIBS]) fi @@ -568,6 +703,7 @@ fi AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"]) AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"]) AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"]) +AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"]) AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"]) # target conditionals @@ -593,6 +729,7 @@ AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"]) AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"]) AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"]) AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"]) +AM_CONDITIONAL([ENABLE_GEOLOCATION], [test "$enable_geolocation" = "yes"]) AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"]) AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"]) AM_CONDITIONAL([ENABLE_SVG_ANIMATION],[test "$enable_svg_animation" = "yes"]) @@ -603,6 +740,8 @@ AM_CONDITIONAL([ENABLE_SVG_AS_IMAGE],[test "$enable_svg_as_image" = "yes"]) AM_CONDITIONAL([ENABLE_SVG_USE],[test "$enable_svg_use_element" = "yes"]) AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"]) AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"]) +AM_CONDITIONAL([ENABLE_WML],[test "$enable_wml" = "yes"]) +AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_web_workers" = "yes"]) AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"]) AM_CONDITIONAL([HTML_FLAGS],[test "$html_flags" = "yes"]) @@ -620,12 +759,14 @@ WebKit was configured with the following options: Build configuration: Enable debugging (slow) : $enable_debug + Enable GCC build optimization : $enable_optimizations Code coverage support : $enable_coverage Unicode backend : $unicode_backend HTTP backend : $with_http_backend Font backend : $with_font_backend Optimized memory allocator : $enable_fast_malloc Features: + JIT compilation : $enable_jit Dashboard support : $enable_dashboard_support HTML5 offline web applications support : $enable_offline_web_applications HTML5 client-side session and persistent storage support : $enable_dom_storage @@ -641,6 +782,9 @@ Features: SVG use element support : $enable_svg_use_element XPATH support : $enable_xpath XSLT support : $enable_xslt + WML support : $enable_wml + Web Workers support : $enable_web_workers + Geolocation support : $enable_geolocation GTK+ configuration: GDK target : $with_target Hildon UI extensions : $with_hildon |