.:
authoralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2008 03:32:29 +0000 (03:32 +0000)
committeralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2008 03:32:29 +0000 (03:32 +0000)
        Rubber-stamped by Anders.

        Make the HTTP backend configurable in the GTK+ port. curl is currently
        the only option.

        * GNUmakefile.am:
        * WebKit.pri:
        * configure.ac:

JavaScriptCore:

        Rubber-stamped by Anders.

        Make the HTTP backend configurable in the GTK+ port. curl is currently
        the only option.

        * wtf/Platform.h: Don't hard-code WTF_USE_CURL for GTK

WebCore:

        Rubber-stamped by Anders.

        Make the HTTP backend configurable in the GTK+ port. curl is currently
        the only option.

        * GNUmakefile.am:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29505 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
GNUmakefile.am
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/Platform.h
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebKit.pri
configure.ac

index 6cd8246..d559074 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2008-01-15  Alp Toker  <alp@atoker.com>
 
+        Rubber-stamped by Anders.
+
+        Make the HTTP backend configurable in the GTK+ port. curl is currently
+        the only option.
+
+        * GNUmakefile.am:
+        * WebKit.pri:
+        * configure.ac:
+
+2008-01-15  Alp Toker  <alp@atoker.com>
+
         GTK+/autotools build fix for GCC < 4. Use the -fvisibility compiler
         flags only when they're available.
 
index 463aeba..27226b8 100644 (file)
@@ -138,6 +138,7 @@ libWebKitGtk_la_CXXFLAGS = \
        -fno-strict-aliasing \
        $(global_cflags) \
        $(DEPENDENCIES_CFLAGS) \
+       $(LIBCURL_CFLAGS) \
        $(SQLITE3_CFLAGS) \
        $(GSTREAMER_CFLAGS) \
        $(LIBXSLT_CFLAGS) \
@@ -147,6 +148,7 @@ libWebKitGtk_la_CFLAGS = \
        -fno-strict-aliasing \
        $(global_cflags) \
        $(DEPENDENCIES_CFLAGS) \
+       $(LIBCURL_CFLAGS) \
        $(SQLITE3_CFLAGS) \
        $(GSTREAMER_CFLAGS) \
        $(LIBXSLT_CFLAGS) \
@@ -162,6 +164,7 @@ libWebKitGtk_la_LIBADD = libJavaScriptCore.la
 libWebKitGtk_la_LDFLAGS = \
        $(webkitgtk_ldflags) \
        $(DEPENDENCIES_LIBS) \
+       $(LIBCURL_LIBS) \
        $(ICU_LIBS) \
        $(SQLITE3_LIBS) \
        $(GSTREAMER_LIBS) \
index e7ec485..da49d9c 100644 (file)
@@ -1,3 +1,12 @@
+2008-01-15  Alp Toker  <alp@atoker.com>
+
+        Rubber-stamped by Anders.
+
+        Make the HTTP backend configurable in the GTK+ port. curl is currently
+        the only option.
+
+        * wtf/Platform.h: Don't hard-code WTF_USE_CURL for GTK
+
 2008-01-15  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Beth Dakin.
index cde1ada..406dfee 100644 (file)
 #define WTF_USE_PTHREADS 1
 #endif
 
-#if PLATFORM(GTK)
-#define WTF_USE_CURL 1
-#endif
-
 #if PLATFORM(QT)
 #define USE_SYSTEM_MALLOC 1
 #endif
index bccb5da..4781670 100644 (file)
@@ -1,3 +1,12 @@
+2008-01-15  Alp Toker  <alp@atoker.com>
+
+        Rubber-stamped by Anders.
+
+        Make the HTTP backend configurable in the GTK+ port. curl is currently
+        the only option.
+
+        * GNUmakefile.am:
+
 2008-01-15  Adele Peterson  <adele@apple.com>
 
         Build fix.
index d5910a0..999e4ab 100644 (file)
@@ -37,7 +37,6 @@ webkitgtk_cppflags += \
        -I $(srcdir)/WebCore/platform/gtk \
        -I $(srcdir)/WebCore/platform/graphics/gtk \
        -I $(srcdir)/WebCore/platform/graphics/cairo \
-       -I $(srcdir)/WebCore/platform/network/curl \
        -I $(srcdir)/WebCore/loader/gtk \
        -I $(srcdir)/WebCore/page/gtk \
        -I $(srcdir)/WebKit/gtk/WebCoreSupport \
@@ -967,8 +966,6 @@ webkitgtk_sources += \
        WebCore/platform/graphics/gtk/ImageGtk.cpp \
        WebCore/platform/graphics/gtk/IntPointGtk.cpp \
        WebCore/platform/graphics/gtk/IntRectGtk.cpp \
-       WebCore/platform/network/curl/ResourceHandleCurl.cpp \
-       WebCore/platform/network/curl/ResourceHandleManager.cpp \
        WebCore/platform/graphics/cairo/AffineTransformCairo.cpp \
        WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp \
        WebCore/platform/graphics/cairo/ImageBufferCairo.cpp \
@@ -984,6 +981,21 @@ webkitgtk_sources += \
        WebCore/platform/image-decoders/xbm/XBMImageDecoder.cpp 
 
 # ----
+# curl http backend
+# ----
+if USE_CURL
+
+webcore_cppflags += \
+       -DWTF_USE_CURL=1 \
+       -I $(srcdir)/WebCore/platform/network/curl
+
+webcore_sources += \
+       WebCore/platform/network/curl/ResourceHandleCurl.cpp \
+       WebCore/platform/network/curl/ResourceHandleManager.cpp
+
+endif # END USE_CURL
+
+# ----
 # Database Support
 # ----
 if ENABLE_DATABASE
index 36404ac..d8fc9fd 100644 (file)
@@ -36,6 +36,7 @@ gtk-port {
 
     # We use the curl http backend on all platforms
     PKGCONFIG += libcurl
+    DEFINES += WTF_USE_CURL=1
 
     LIBS += -lWebKitGtk -ljpeg -lpng
 
index 5743d7a..2760867 100644 (file)
@@ -148,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
@@ -156,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
@@ -172,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
@@ -299,6 +314,14 @@ if test "$enable_debug" = "yes"; then
    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])
@@ -357,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"])
@@ -386,6 +412,7 @@ 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