2010-06-28 Xan Lopez <xlopez@igalia.com>
authorxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jun 2010 13:58:42 +0000 (13:58 +0000)
committerxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jun 2010 13:58:42 +0000 (13:58 +0000)
        Reviewed by Gustavo Noronha.

        [GTK] Add support for GTK+3
        https://bugs.webkit.org/show_bug.cgi?id=41253

        Add --with-gtk configure flag, defaulting to support for GTK+ 2.x.

        * GNUmakefile.am:
        * configure.ac:

WebCore:

2010-06-28  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        [GTK] Add support for GTK+3
        https://bugs.webkit.org/show_bug.cgi?id=41253

        Adapt build system for 3.x support.

        * GNUmakefile.am:

WebKit/gtk:

2010-06-28  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        [GTK] Add support for GTK+3
        https://bugs.webkit.org/show_bug.cgi?id=41253

        Adapt build system for 3.x support, allow the JSCore gir and webkit
        pc files to be configurable at build time for different API
        versions.

        * JSCore-1.0.gir: Removed.
        * JSCore.gir.in: Added.
        * docs/GNUmakefile.am:
        * webkit.pc.in:

JavaScriptCore:

2010-06-28  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        [GTK] Add support for GTK+3
        https://bugs.webkit.org/show_bug.cgi?id=41253

        Suffix jsc with the API version of the library, so that
        libwebkitgtk 1.x and 3.x can install jsc.

        * GNUmakefile.am:

WebKitTools:

2010-06-28  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        [GTK] Add support for GTK+3
        https://bugs.webkit.org/show_bug.cgi?id=41253

        Adapt build system for 3.x support.

        * GNUmakefile.am:

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

13 files changed:
ChangeLog
GNUmakefile.am
JavaScriptCore/ChangeLog
JavaScriptCore/GNUmakefile.am
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebKit/gtk/ChangeLog
WebKit/gtk/JSCore.gir.in [moved from WebKit/gtk/JSCore-1.0.gir with 80% similarity]
WebKit/gtk/docs/GNUmakefile.am
WebKit/gtk/webkit.pc.in
WebKitTools/ChangeLog
WebKitTools/GNUmakefile.am
configure.ac

index 689f3bc..a4326ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-06-28  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Add support for GTK+3
+        https://bugs.webkit.org/show_bug.cgi?id=41253
+
+        Add --with-gtk configure flag, defaulting to support for GTK+ 2.x.
+
+        * GNUmakefile.am:
+        * configure.ac:
+
 2010-06-26  Tony Gentilcore  <tonyg@chromium.org>
 
         Reviewed by Dimitri Glazkov.
index c2b1c1c..4677aa1 100644 (file)
@@ -53,7 +53,7 @@ bin_PROGRAMS :=
 noinst_PROGRAMS :=
 noinst_HEADERS :=
 noinst_LTLIBRARIES :=
-lib_LIBRARIES :=
+lib_LTLIBRARIES :=
 IDL_BINDINGS :=
 TEST_PROGS :=
 POFILES :=
@@ -167,8 +167,8 @@ version_script = -Wl,--version-script,$(srcdir)/autotools/symbols.filter
 endif
 
 # Shared libraries
-lib_LTLIBRARIES = \
-       libwebkit-1.0.la
+lib_LTLIBRARIES += \
+       libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
 
 # Convenience libraries
 noinst_LTLIBRARIES += \
@@ -189,7 +189,7 @@ nodist_EXTRA_libJavaScriptCore_la_SOURCES = \
 nodist_libJavaScriptCore_la_SOURCES = \
        $(javascriptcore_built_sources)
 
-libJavaScriptCore_ladir = $(prefix)/include/webkit-1.0/JavaScriptCore
+libJavaScriptCore_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/JavaScriptCore
 libJavaScriptCore_la_HEADERS = $(javascriptcore_h_api)
 
 libJavaScriptCore_la_SOURCES = \
@@ -216,42 +216,42 @@ libJavaScriptCore_la_CPPFLAGS = \
        $(javascriptcore_cppflags)
 
 # WebKit
-nodist_EXTRA_libwebkit_1_0_la_SOURCES = \
+nodist_EXTRA_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
        $(webcore_built_nosources)
 
-nodist_libwebkit_1_0_la_SOURCES = \
+nodist_libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
        $(webcore_built_sources) \
        $(webkitgtk_built_sources)
 
-libwebkit_1_0_ladir = $(prefix)/include/webkit-1.0/webkit
-libwebkit_1_0_la_HEADERS = \
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_HEADERS = \
        $(webkitgtk_h_api) \
        WebKit/gtk/webkit/webkitenumtypes.h
 
-libwebkit_1_0_la_SOURCES = \
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
        $(webcore_sources) \
        $(webcoregtk_sources) \
        $(webkitgtk_sources)
 
-libwebkit_1_0_la_CXXFLAGS = \
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS = \
        $(global_cxxflags) \
        $(corekit_cflags)
 
-libwebkit_1_0_la_CFLAGS = \
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CFLAGS = \
        $(global_cflags) \
        $(corekit_cflags)
 
-libwebkit_1_0_la_CPPFLAGS = \
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
        $(corekit_cppflags) \
        $(webkitgtk_cppflags) \
        $(HILDON_CPPFLAGS)
 
-libwebkit_1_0_la_LDFLAGS = \
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LDFLAGS = \
        -version-info @LIBWEBKITGTK_VERSION@ \
        $(version_script) \
        $(no_undefined)
 
-libwebkit_1_0_la_LIBADD = \
+libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_LIBADD = \
        -lpthread \
        libJavaScriptCore.la \
        libWebCoreJS.la \
@@ -277,7 +277,7 @@ libwebkit_1_0_la_LIBADD = \
        $(UNICODE_LIBS) \
        $(XT_LIBS)
 
-libgdom_ladir = $(prefix)/include/webkit-1.0/webkit
+libgdom_ladir = $(prefix)/include/webkit-@WEBKITGTK_API_VERSION@/webkit
 nodist_libgdom_la_HEADERS = \
        $(libgdom_h_api)
 
@@ -424,35 +424,35 @@ webkitgtk_cleanfiles += \
        $(top_builddir)/Programs/GtkLauncher \
        $(top_builddir)/WebKit/gtk/docs/version.xml \
        $(top_builddir)/WebKit/gtk/docs/GNUmakefile \
-       $(top_builddir)/WebKit/gtk/webkit-1.0.pc \
+       $(top_builddir)/WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc \
        $(top_builddir)/WebKit/gtk/webkit/webkitenumtypes.h \
        $(top_builddir)/WebKit/gtk/webkit/webkitversion.h
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = WebKit/gtk/webkit-1.0.pc
+pkgconfig_DATA = WebKit/gtk/@WEBKITGTK_PC_NAME@-@WEBKITGTK_API_VERSION@.pc
 
 if ENABLE_INTROSPECTION
-JSCORE_GIRSOURCES += JSCore-1.0.gir
-WEBKIT_GIRSOURCES += WebKit-1.0.gir
 
-# JSCore-1.0.gir is handwritten - this is a hack to make the typelib
-# generation work during make dist
-JSCore-1.0.gir: $(srcdir)/WebKit/gtk/JSCore-1.0.gir
-       cp $(srcdir)/WebKit/gtk/JSCore-1.0.gir $(builddir)/
+JSCore-@WEBKITGTK_API_VERSION@.gir: $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
+       cp $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir $(builddir)/
 
-$(WEBKIT_GIRSOURCES): $(JSCORE_GIRSOURCES) $(G_IR_SCANNER) libwebkit-1.0.la
-       $(AM_V_GEN)$(G_IR_SCANNER) -v --namespace WebKit --nsversion=1.0 \
+JSCORE_GIRSOURCES += JSCore-@WEBKITGTK_API_VERSION@.gir
+WEBKIT_GIRSOURCES += WebKit-@WEBKITGTK_API_VERSION@.gir
+
+$(WEBKIT_GIRSOURCES): $(G_IR_SCANNER) $(JSCORE_GIRSOURCES) libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
+       $(AM_V_GEN)$(G_IR_SCANNER) -v --namespace WebKit --nsversion=@WEBKITGTK_API_VERSION@ \
             --include=GObject-2.0 \
-            --include=Gtk-2.0 \
-            --include=JSCore-1.0 \
+            --include=Gtk-@GTK_API_VERSION@ \
+            --include=JSCore-@WEBKITGTK_API_VERSION@ \
             --include=Soup-2.4 \
-            --library=webkit-1.0 \
+            --library=webkitgtk-@WEBKITGTK_API_VERSION@ \
             --libtool="$(LIBTOOL)" \
             --pkg gobject-2.0 \
-            --pkg gtk+-2.0 \
+            --pkg gtk+-@GTK_API_VERSION@ \
             --pkg libsoup-2.4 \
             --output $@ \
             --add-include-path $(top_srcdir)/WebKit/gtk \
+            --add-include-path $(builddir) \
             -I$(top_srcdir)/WebKit/gtk \
             -I$(top_builddir)/WebKit/gtk \
             -I$(top_builddir)/DerivedSources \
@@ -468,13 +468,13 @@ typelibsdir += $(libdir)/girepository-1.0
 typelibs_DATA += $(JSCORE_GIRSOURCES:.gir=.typelib) $(WEBKIT_GIRSOURCES:.gir=.typelib)
 
 %.typelib: %.gir $(G_IR_COMPILER)
-       $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(top_srcdir)/WebKit/gtk $< -o $@
+       $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(top_srcdir)/WebKit/gtk --includedir $(builddir) $< -o $@
 
 CLEANFILES += $(JSCORE_GIRSOURCES) $(WEBKIT_GIRSOURCES) $(typelibs_DATA)
 
 endif
 
-EXTRA_DIST += WebKit/gtk/JSCore-1.0.gir
+EXTRA_DIST += $(builddir)/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
 
 WEBKIT_MARSHAL = $(GENSOURCES)/webkitmarshal
 WEBKIT_MARSHAL_LIST = $(top_srcdir)/WebKit/gtk/webkitmarshal.list
@@ -602,7 +602,7 @@ EXTRA_DIST += \
        $(srcdir)/WebKit/gtk/tests/test_utils.h
 
 # extra resource files
-resourcesdir = ${datadir}/webkit-1.0/resources
+resourcesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/resources
 dist_resources_DATA = \
        $(shell ls $(srcdir)/WebKit/gtk/resources/*.html)
 
@@ -631,7 +631,7 @@ webkit_tests_cflags = \
        $(LIBSOUP_CFLAGS)
 
 webkit_tests_ldadd = \
-       libwebkit-1.0.la \
+       libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
        $(GTK_LIBS)     \
        $(GLIB_LIBS) \
        $(LIBSOUP_LIBS)
index 45d705d..9c527a5 100644 (file)
@@ -1,3 +1,15 @@
+2010-06-28  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Add support for GTK+3
+        https://bugs.webkit.org/show_bug.cgi?id=41253
+
+        Suffix jsc with the API version of the library, so that
+        libwebkitgtk 1.x and 3.x can install jsc.
+
+        * GNUmakefile.am:
+
 2010-06-27  Kwang Yul Seo  <skyul@company100.net>
 
         Reviewed by Kent Tamura.
index 92f0f7c..34f1e70 100644 (file)
@@ -569,7 +569,7 @@ JavaScriptCore/pcre/chartables.c: $(srcdir)/JavaScriptCore/pcre/dftables
        $(PERL) $^ $@
 
 bin_PROGRAMS += \
-       Programs/jsc
+       Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
 
 noinst_PROGRAMS += \
        Programs/minidom
@@ -606,21 +606,21 @@ Programs_minidom_LDFLAGS = \
        -no-fast-install
 
 # jsc
-Programs_jsc_SOURCES = \
+Programs_jsc_@WEBKITGTK_API_MAJOR_VERSION@_SOURCES = \
        JavaScriptCore/jsc.cpp
 
-Programs_jsc_CPPFLAGS = \
+Programs_jsc_@WEBKITGTK_API_MAJOR_VERSION@_CPPFLAGS = \
        $(global_cppflags) \
        $(javascriptcore_cppflags)
 
-Programs_jsc_CXXFLAGS = \
+Programs_jsc_@WEBKITGTK_API_MAJOR_VERSION@_CXXFLAGS = \
        -fno-strict-aliasing \
        $(global_cxxflags) \
        $(global_cflags) \
        $(GLOBALDEPS_CFLAGS) \
        $(UNICODE_CFLAGS)
 
-Programs_jsc_LDADD = \
+Programs_jsc_@WEBKITGTK_API_MAJOR_VERSION@_LDADD = \
        libJavaScriptCore.la
 
 javascriptcore_dist += \
@@ -649,5 +649,5 @@ CLEANFILES += \
        JavaScriptCore/runtime/RegExpObject.lut.h \
        JavaScriptCore/runtime/StringPrototype.lut.h \
        JavaScriptCore/pcre/chartables.c \
-       Programs/jsc \
+       Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@ \
        Programs/minidom
index 9b5dd0e..34dd9f3 100644 (file)
@@ -1,3 +1,14 @@
+2010-06-28  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Add support for GTK+3
+        https://bugs.webkit.org/show_bug.cgi?id=41253
+
+        Adapt build system for 3.x support.
+
+        * GNUmakefile.am:
+
 2010-06-28  Yury Semikhatsky  <yurys@chromium.org>
 
         Reviewed by Pavel Feldman.
index de60057..520e32c 100644 (file)
@@ -3976,7 +3976,7 @@ webcore_built_objects = := $(patsubst %.cpp,%.lo,$(webcore_built_nosources))
 
 $(webcore_built_objects): AM_CPPFLAGS+=$(corekit_cppflags)
 
-$(webcore_built_objects): AM_CXXFLAGS+=$(libwebkit_1_0_la_CXXFLAGS)
+$(webcore_built_objects): AM_CXXFLAGS+=$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS)
 
 libWebCoreJS_objects := $(patsubst %.idl,DerivedSources/JS%.lo,$(notdir $(IDL_BINDINGS_JS)))
 
@@ -3989,14 +3989,14 @@ libWebCoreJS_depfiles += $(patsubst %.lo,$(DEPDIR)/%.Plo,$(libWebCoreJS_objects)
 
 $(libWebCoreJS_objects): AM_CPPFLAGS+=$(corekit_cppflags)
 
-$(libWebCoreJS_objects): AM_CXXFLAGS+=$(libwebkit_1_0_la_CXXFLAGS)
+$(libWebCoreJS_objects): AM_CXXFLAGS+=$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS)
 
 libWebCoreJS.la: $(libWebCoreJS_objects)
        $(CXXLINK) $(libWebCoreJS_objects) $(LIBS)
 
 
 DerivedSources/webkit/webkitdomdummy.c:
-       echo > $@
+       mkdir -p DerivedSources/webkit || echo > $@
 
 # Because WebCore/bindings/gobject/WebKitDOMObject.h is static source but is also a distributed header
 # required by other distributed headers (both static and auto-generated), need to move this to the
@@ -4174,8 +4174,8 @@ libgdom_depfiles += $(patsubst %.h,$(WebCore)/bindings/gobject/$(DEPDIR)/%.Plo,$
 
 -include $(libgdom_depfiles)
 
-$(libgdom_objects): AM_CPPFLAGS+=$(libwebkit_1_0_la_CPPFLAGS)
-$(libgdom_objects): AM_CXXFLAGS+=$(libwebkit_1_0_la_CXXFLAGS)
+$(libgdom_objects): AM_CPPFLAGS+=$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS)
+$(libgdom_objects): AM_CXXFLAGS+=$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS)
 
 libgdom.la: $(libgdom_objects)
        $(CXXLINK) $(libgdom_objects) $(LIBS)
@@ -4232,19 +4232,19 @@ webcore_dist += \
        WebCore/xml/XPathGrammar.y
 
 # Installing web inspector files
-webinspectordir = ${datadir}/webkit-1.0/webinspector
+webinspectordir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/webinspector
 dist_webinspector_DATA = \
        $(WebCore)/English.lproj/localizedStrings.js \
        $(shell ls $(WebCore)/inspector/front-end/*.js) \
        $(shell ls $(WebCore)/inspector/front-end/*.html) \
        $(shell ls $(WebCore)/inspector/front-end/*.css)
 
-webinspectorimagesdir = ${datadir}/webkit-1.0/webinspector/Images
+webinspectorimagesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/webinspector/Images
 dist_webinspectorimages_DATA = \
        $(shell ls $(WebCore)/inspector/front-end/Images/*.gif) \
        $(shell ls $(WebCore)/inspector/front-end/Images/*.png)
 
-webresourcesdir = ${datadir}/webkit-1.0/images
+webresourcesdir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/images
 dist_webresources_DATA = \
        $(WebCore)/Resources/textAreaResizeCorner.png \
        $(WebCore)/Resources/nullPlugin.png \
index 3564e01..e4199ee 100644 (file)
@@ -1,3 +1,19 @@
+2010-06-28  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Add support for GTK+3
+        https://bugs.webkit.org/show_bug.cgi?id=41253
+
+        Adapt build system to 3.x support, allow the JSCore gir and webkit
+        pc files to be configurable at build time for different API
+        versions.
+
+        * JSCore-1.0.gir: Removed.
+        * JSCore.gir.in: Added.
+        * docs/GNUmakefile.am:
+        * webkit.pc.in:
+
 2010-06-25  Mario Sanchez Prada  <msanchez@igalia.com>
 
         Reviewed by Xan Lopez.
similarity index 80%
rename from WebKit/gtk/JSCore-1.0.gir
rename to WebKit/gtk/JSCore.gir.in
index 2fb4d46..e979c33 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<repository version="1.0"
+<repository version="1.1"
             xmlns="http://www.gtk.org/introspection/core/1.0"
             xmlns:c="http://www.gtk.org/introspection/c/1.0">
-  <namespace name="JSCore" version="1.0" shared-library="webkit-1.0">
+  <namespace name="JSCore" version="@WEBKITGTK_API_VERSION@" shared-library="webkitgtk-@WEBKITGTK_API_VERSION@">
     <alias name="GlobalContextRef"
            target="none"
            c:type="JSGlobalContextRef"/>
index 968b7f6..105e277 100644 (file)
@@ -84,7 +84,7 @@ INCLUDES= \
        $(GTK_CFLAGS) \
        $(LIBSOUP_CFLAGS)
 GTKDOC_LIBS= \
-       $(top_builddir)/libwebkit-1.0.la \
+       $(top_builddir)/libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
        $(GLIB_LIBS) \
        $(GTK_LIBS) \
        $(LIBSOUP_LIBS)
index 895aa19..9bed0f3 100644 (file)
@@ -6,6 +6,6 @@ includedir=@includedir@
 Name: WebKit
 Description: Web content engine for GTK+
 Version: @VERSION@
-Requires: glib-2.0 gtk+-2.0 libsoup-2.4
-Libs: -L${libdir} -lwebkit-1.0
-Cflags: -I${includedir}/webkit-1.0
+Requires: glib-2.0 gtk+-@GTK_API_VERSION@ libsoup-2.4
+Libs: -L${libdir} -lwebkitgtk-@WEBKITGTK_API_VERSION@
+Cflags: -I${includedir}/webkit-@WEBKITGTK_API_VERSION@
index 72f213a..a5b3e61 100644 (file)
@@ -1,3 +1,14 @@
+2010-06-28  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Add support for GTK+3
+        https://bugs.webkit.org/show_bug.cgi?id=41253
+
+        Adapt build system for 3.x support.
+
+        * GNUmakefile.am:
+
 2010-06-10  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
 
         Reviewed by Simon Hausmann.
index 4425196..448b276 100644 (file)
@@ -20,7 +20,7 @@ Programs_GtkLauncher_CFLAGS = \
        $(LIBSOUP_CFLAGS)
 
 Programs_GtkLauncher_LDADD = \
-       libwebkit-1.0.la \
+       libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
        $(GTK_LIBS) \
        $(GLIB_LIBS)
 
@@ -81,7 +81,7 @@ Programs_DumpRenderTree_CFLAGS = \
        $(LIBSOUP_CFLAGS)
 
 Programs_DumpRenderTree_LDADD = \
-       libwebkit-1.0.la \
+       libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
        libJavaScriptCore.la \
        $(GLOBALDEPS_LIBS) \
        $(CAIRO_LIBS) \
index 7fa3152..ca4252a 100644 (file)
@@ -35,7 +35,7 @@ AC_CONFIG_SRCDIR([WebCore/config.h])
 
 dnl # Libtool library version, not to confuse with API version
 dnl # see http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html#Libtool-versioning
-LIBWEBKITGTK_VERSION=20:0:18
+LIBWEBKITGTK_VERSION=0:0:0
 AC_SUBST([LIBWEBKITGTK_VERSION])
 
 AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar])
@@ -167,6 +167,44 @@ if test "$png_ok" != yes; then
 fi
 AC_SUBST([PNG_LIBS])
 
+# determine the GTK+ version to use
+AC_MSG_CHECKING([the GTK+ version to use])
+AC_ARG_WITH([gtk],
+        [AS_HELP_STRING([--with-gtk=2.0|3.0], [the GTK+ version to use (default: 2.0)])],
+        [case "$with_gtk" in
+        2.0|3.0) ;;
+        *) AC_MSG_ERROR([invalid GTK+ version specified]) ;;
+        esac],
+        [with_gtk=2.0])
+AC_MSG_RESULT([$with_gtk])
+
+case "$with_gtk" in
+     2.0) GTK_REQUIRED_VERSION=2.10
+          GTK_API_VERSION=2.0
+          WEBKITGTK_API_MAJOR_VERSION=1
+          WEBKITGTK_API_MINOR_VERSION=0
+          WEBKITGTK_API_VERSION=1.0
+          WEBKITGTK_PC_NAME=webkit
+          GAIL_PC_NAME=gail
+          GAIL_REQUIRED_VERSION=1.8
+          ;;
+     3.0) GTK_REQUIRED_VERSION=2.90
+          GTK_API_VERSION=3.0
+          WEBKITGTK_API_MAJOR_VERSION=3
+          WEBKITGTK_API_MINOR_VERSION=0
+          WEBKITGTK_API_VERSION=3.0
+          WEBKITGTK_PC_NAME=webkitgtk
+          GAIL_PC_NAME=gail-3.0
+          GAIL_REQUIRED_VERSION=2.90.4
+          ;;
+esac
+
+AC_SUBST([WEBKITGTK_API_MAJOR_VERSION])
+AC_SUBST([WEBKITGTK_API_MINOR_VERSION])
+AC_SUBST([WEBKITGTK_API_VERSION])
+AC_SUBST([WEBKITGTK_PC_NAME])
+AC_SUBST([GTK_API_VERSION])
+
 # determine the GDK/GTK+ target
 AC_MSG_CHECKING([the target windowing system])
 AC_ARG_WITH(target,
@@ -205,7 +243,6 @@ LIBXML_REQUIRED_VERSION=2.6
 
 # minimum GTK+ base dependencies
 PANGO_REQUIRED_VERSION=1.12
-GTK_REQUIRED_VERSION=2.10
 
 # optional modules
 LIBXSLT_REQUIRED_VERSION=1.1.7
@@ -213,7 +250,6 @@ SQLITE_REQUIRED_VERSION=3.0
 GSTREAMER_REQUIRED_VERSION=0.10
 GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION=0.10.25
 ENCHANT_REQUIRED_VERSION=0.22
-GAIL_REQUIRED_VERSION=1.8
 
 # Available modules
 #
@@ -242,7 +278,7 @@ PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED_VERSION)
 AC_SUBST(ENCHANT_CFLAGS)
 AC_SUBST(ENCHANT_LIBS)
 
-PKG_CHECK_MODULES(GAIL, gail >= $GAIL_REQUIRED_VERSION)
+PKG_CHECK_MODULES(GAIL, $GAIL_PC_NAME >= $GAIL_REQUIRED_VERSION)
 AC_SUBST(GAIL_CFLAGS)
 AC_SUBST(GAIL_LIBS)
 
@@ -253,7 +289,7 @@ if test "$with_target" = "directfb"; then
    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)
+   PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
 
    if test "$with_target" = "x11" && test "$os_win32" = "no"; then
       # check for XT
@@ -875,13 +911,18 @@ AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
 
 AC_CONFIG_FILES([
 GNUmakefile
-WebKit/gtk/webkit-1.0.pc:WebKit/gtk/webkit.pc.in
 WebKit/gtk/webkit/webkitversion.h
 WebKit/gtk/docs/GNUmakefile
 WebKit/gtk/docs/version.xml
 ]
 )
 
+AC_CONFIG_FILES([
+WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:WebKit/gtk/webkit.pc.in
+WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:WebKit/gtk/JSCore.gir.in]
+,[WEBKITGTK_API_VERSION=$WEBKITGTK_API_VERSION,WEBKITGTK_PC_NAME=$WEBKITGTK_PC_NAME]
+)
+
 AC_OUTPUT
 
 echo "
@@ -931,6 +972,7 @@ Features:
  XPATH support                                            : $enable_xpath
  XSLT support                                             : $enable_xslt
 GTK+ configuration:
+ GTK+ version                                             : $with_gtk
  GDK target                                               : $with_target
  Hildon UI extensions                                     : $with_hildon
  Introspection support                                    : $enable_introspection