* platform/win/Skipped: Added another failure.
[WebKit-https.git] / configure.ac
index 05c25b9..2760867 100644 (file)
@@ -9,9 +9,7 @@ AC_CONFIG_SRCDIR([WebCore/config.h])
 LIBWEBKITGTK_VERSION=1:0:0
 AC_SUBST([LIBWEBKITGTK_VERSION])
 
-AM_INIT_AUTOMAKE([1.9 foreign tar-ustar subdir-objects])
-
-AM_MAINTAINER_MODE
+AM_INIT_AUTOMAKE([foreign subdir-objects])
 
 AC_CANONICAL_HOST
 
@@ -53,9 +51,20 @@ AM_PROG_LIBTOOL
 AC_PROG_INSTALL
 AM_PROG_CC_STDC
 AC_PROG_CXX
-AC_PROG_CXX_C_O
 AM_PROG_CC_C_O
 
+# check for -fvisibility=hidden compiler support (GCC >= 4)    
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
+AC_MSG_CHECKING([if ${CXX} supports -fvisibility=hidden -fvisibility-inlines-hidden])
+AC_COMPILE_IFELSE([char foo;],
+      [ AC_MSG_RESULT([yes])
+        SYMBOL_VISIBILITY="-fvisibility=hidden" SYMBOL_VISIBILITY_INLINES="-fvisibility-inlines-hidden" ],
+        AC_MSG_RESULT([no]))
+CFLAGS="$saved_CFLAGS"
+AC_SUBST(SYMBOL_VISIBILITY)
+AC_SUBST(SYMBOL_VISIBILITY_INLINES)
+
 AC_PATH_PROG(PERL, perl)
 if test -z "$PERL"; then
    AC_MSG_ERROR([You need 'perl' to compile WebKit])
@@ -139,6 +148,22 @@ esac
 
 AC_MSG_RESULT([$with_webkit_target])
 
+
+# determine the http backend
+AC_MSG_CHECKING([the HTTP backend to use])
+AC_ARG_WITH(http_backend,
+            AC_HELP_STRING([--with-http-backend=@<:@curl@:>@],
+                           [Select HTTP backend [default=curl]]),
+            [],[http_backend="curl"])
+
+case "$http_backend" in
+     curl) ;;
+     *) AC_MSG_ERROR([Invalid HTTP backend: must be curl.]) ;;
+esac
+
+AC_MSG_RESULT([$http_backend])
+
+
 # minimum base dependencies
 GLIB_REQUIRED_VERSION=2.0
 GOBJECT_REQUIRED_VERSION=2.0
@@ -147,11 +172,11 @@ PANGO_REQUIRED_VERSION=1.0
 CAIRO_REQUIRED_VERSION=1.2
 FONTCONFIG_REQUIRED_VERSION=2.4
 FREETYPE2_REQUIRED_VERSION=9.0
-LIBCURL_REQUIRED_VERSION=7.15
 LIBXML_REQUIRED_VERSION=2.6
 
 # optional modules
 GTK_REQUIRED_VERSION=2.0
+LIBCURL_REQUIRED_VERSION=7.15
 LIBXSLT_REQUIRED_VERSION=1.1.7
 SQLITE_REQUIRED_VERSION=3.0
 GSTREAMER_REQUIRED_VERSION=0.10
@@ -163,7 +188,6 @@ PKG_CHECK_MODULES([DEPENDENCIES],
                   gthread-2.0 >= $GTHREAD_REQUIRED_VERSION
                   gtk+-2.0 >= $GTK_REQUIRED_VERSION
                   pango >= $PANGO_REQUIRED_VERSION
-                  libcurl >= $LIBCURL_REQUIRED_VERSION
                   cairo >= $CAIRO_REQUIRED_VERSION
                   cairo-ft,
                   fontconfig >= $FONTCONFIG_REQUIRED_VERSION
@@ -177,14 +201,14 @@ AC_MSG_CHECKING([whether to do a debug build])
 AC_ARG_ENABLE(debug,
               AC_HELP_STRING([--enable-debug],
                              [turn on debugging [default=no]]),
-              [enable_debug="yes"],[enable_debug="no"])
+              [],[enable_debug="no"])
 AC_MSG_RESULT([$enable_debug])
 
 # check whether to build with database support
 AC_MSG_CHECKING([whether to enable HTML5 client-side storage support])
 AC_ARG_ENABLE(database,
               AC_HELP_STRING([--enable-database],
-                             [enable HTML5 client-side storage support [default=no]]),
+                             [enable HTML5 client-side storage support [default=yes]]),
               [],[enable_database="yes"])
 AC_MSG_RESULT([$enable_database])
 
@@ -201,14 +225,14 @@ AC_MSG_CHECKING([whether to enable HTML5 video support])
 AC_ARG_ENABLE(video,
               AC_HELP_STRING([--enable-video],
                              [enable HTML5 video support [default=no]]),
-              [enable_video="yes"],[enable_video="no"])
+              [],[enable_video="no"])
 AC_MSG_RESULT([$enable_video])
 
 # check whether to enable XPath support
 AC_MSG_CHECKING([whether to enable XPath support])
 AC_ARG_ENABLE(xpath,
               AC_HELP_STRING([--enable-xpath],
-                             [enable support for XPath [default=no]]),
+                             [enable support for XPath [default=yes]]),
               [],[enable_xpath="yes"])
 AC_MSG_RESULT([$enable_xpath])
 
@@ -216,7 +240,7 @@ AC_MSG_RESULT([$enable_xpath])
 AC_MSG_CHECKING([whether to enable XSLT support])
 AC_ARG_ENABLE(xslt,
               AC_HELP_STRING([--enable-xslt],
-                             [enable support for XSLT [default=no]]),
+                             [enable support for XSLT [default=yes]]),
               [],[enable_xslt="yes"])
 AC_MSG_RESULT([$enable_xslt])
 
@@ -232,7 +256,7 @@ AC_MSG_RESULT([$enable_svg])
 AC_MSG_CHECKING([whether to enable support for SVG animataion])
 AC_ARG_ENABLE(svg_animation,
               AC_HELP_STRING([--enable-svg-animation],
-                             [enable support for SVG animation feature (experimental) [default=no]]),
+                             [enable support for SVG animation (experimental) [default=no]]),
               [],[enable_svg_animation="no"])
 AC_MSG_RESULT([$enable_svg_animation])
 
@@ -276,12 +300,28 @@ AC_ARG_ENABLE(coverage,
               [],[enable_coverage="no"])
 AC_MSG_RESULT([$enable_coverage])
 
+# check whether to enable FastMalloc
+AC_MSG_CHECKING([whether to enable optimized memory allocator])
+AC_ARG_ENABLE(fast_malloc,
+              AC_HELP_STRING([--enable-fast-malloc],
+                             [enable optimized memory allocator default=yes, default=no for debug builds]),
+              [],[if test "$enable_debug" = "yes"; then enable_fast_malloc="no"; else enable_fast_malloc="yes"; fi])
+AC_MSG_RESULT([$enable_fast_malloc])
+
 # Add '-g' flag to gcc if it's debug build
 if test "$enable_debug" = "yes"; then
    CXXFLAGS="$CXXFLAGS -g"
    CFLAGS="$CFLAGS -g"
 fi
 
+# check if curl is available
+if test "$http_backend" = "curl"; then
+   PKG_CHECK_MODULES([LIBCURL],
+                     [libcurl >= $LIBCURL_REQUIRED_VERSION])
+   AC_SUBST([LIBCURL_CFLAGS])
+   AC_SUBST([LIBCURL_LIBS])
+fi
+
 # check if sqlite 3 is available
 if test "$enable_icon_database" = "yes" || test "$enable_database" = "yes"; then
    PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE_REQUIRED_VERSION])
@@ -316,16 +356,16 @@ if test "$enable_coverage" = "yes"; then
 fi
 
 # check for SVG features, enabling SVG if necessary
-if test "$enable_svg" = "no" && (\
-   test "$enable_svg_animation" = "yes" || \
+if test "$enable_svg_animation" = "yes" || \
    test "$enable_svg_filters" = "yes" || \
    test "$enable_svg_fonts" = "yes" || \
    test "$enable_svg_as_image" = "yes" || \
-   test "$enable_svg_use_element" = "yes"); then
-
-   AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
-   enable_svg = yes
-   svg_flags = yes
+   test "$enable_svg_use_element" = "yes"; then
+   svg_flags=yes
+   if test "$enable_svg" = "no"; then
+       AC_MSG_WARN([SVG feature(s) requested but SVG is disabled.. Enabling SVG support])
+       enable_svg=yes
+   fi
 fi
 
 # OS conditionals
@@ -340,6 +380,9 @@ AM_CONDITIONAL([TARGET_WIN32], [test "$with_webkit_target" = "win32"])
 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_webkit_target" = "quartz"])
 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_webkit_target" = "directfb"])
 
+# HTTP backend conditionals
+AM_CONDITIONAL([USE_CURL], [test "$http_backend" = "curl"])
+
 # WebKit feature conditionals
 AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
 AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
@@ -354,6 +397,7 @@ AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
 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([SVG_FLAGS],[test "$svg_flags" = "yes"])
 
 AC_CONFIG_FILES([
@@ -368,8 +412,10 @@ echo "
 WebKit was configured with the following options:
 
  Target                            : $with_webkit_target
+ HTTP backend                      : $http_backend
  Enable debug                      : $enable_debug
  Code coverage support             : $enable_coverage
+ Optimized memory allocator        : $enable_fast_malloc
  HTML5 client-side storage support : $enable_database
  HTML5 video element support       : $enable_video
  Icon database support             : $enable_icon_database