summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiraj Razick <siraj.razick@collabora.co.uk>2012-01-25 16:32:32 -0500
committerSiraj Razick <siraj.razick@collabora.co.uk>2012-02-01 12:52:22 -0500
commite4cccf0a604c7cdf1107aa9b5d9cdaa996bcc702 (patch)
tree5f17698639cde294c1ca4b96b2bff26806d0f16e
parentd3beae79aadab2e0adfc206082068fc6689ff290 (diff)
Windows specfic changes to produce plugins as dll's
Using -module doesn't produce .dll files when compiling for windows These changes enable us to output .dll files for plugins. https://bugs.freedesktop.org/show_bug.cgi?id=44649
-rw-r--r--gabble/telepathy-gabble-uninstalled.pc.in1
-rw-r--r--gabble/telepathy-gabble.pc.in1
-rw-r--r--lib/loudmouth/Makefile.am2
-rw-r--r--plugins/Makefile.am45
-rw-r--r--src/Makefile.am30
-rw-r--r--src/error.c2
6 files changed, 51 insertions, 30 deletions
diff --git a/gabble/telepathy-gabble-uninstalled.pc.in b/gabble/telepathy-gabble-uninstalled.pc.in
index 72aa5d1aa..c4b1847ba 100644
--- a/gabble/telepathy-gabble-uninstalled.pc.in
+++ b/gabble/telepathy-gabble-uninstalled.pc.in
@@ -12,4 +12,5 @@ Description: XMPP backend for the Telepathy framework
Version: @VERSION@
Requires: pkg-config >= 0.21
Requires.private: glib-2.0 >= 2.16, gobject-2.0 >= 2.16, gio-2.0, telepathy-glib >= 0.7.37
+Libs: ${abs_top_builddir}/src/libgabble-plugins.la
Cflags: -I${abs_top_srcdir} -I${abs_top_srcdir}/lib/ext/wocky
diff --git a/gabble/telepathy-gabble.pc.in b/gabble/telepathy-gabble.pc.in
index d566118ac..40644ad30 100644
--- a/gabble/telepathy-gabble.pc.in
+++ b/gabble/telepathy-gabble.pc.in
@@ -12,4 +12,5 @@ Description: XMPP backend for the Telepathy framework
Version: @VERSION@
Requires: pkg-config >= 0.21
Requires.private: glib-2.0 >= 2.16, gobject-2.0 >= 2.16, gio-2.0, telepathy-glib >= 0.7.37
+Libs: -L${libdir} -lgabble-plugins
Cflags: -I${includedir}/telepathy-gabble-0
diff --git a/lib/loudmouth/Makefile.am b/lib/loudmouth/Makefile.am
index 63aed69f6..94afb39f7 100644
--- a/lib/loudmouth/Makefile.am
+++ b/lib/loudmouth/Makefile.am
@@ -62,7 +62,7 @@ loudmouth-signals-marshal.list: $(OUR_SOURCES) Makefile.am
AM_CFLAGS = $(ERROR_CFLAGS) $(GCOV_CFLAGS) @GLIB_CFLAGS@ @WOCKY_CFLAGS@
-AM_LDFLAGS = $(GCOV_LIBS) @GLIB_LIBS@ @WOCKY_LIBS@
+AM_LDFLAGS = $(GCOV_LIBS) @GLIB_LIBS@
Android.mk: Makefile.am $(BUILT_SOURCES)
androgenizer -:PROJECT telepathy-gabble -:STATIC loudmouth -:TAGS eng debug \
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 0330cec53..a6b32eacb 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1,31 +1,31 @@
plugindir = $(libdir)/telepathy/gabble-0
installable_plugins = \
- console.la \
- gateways.la
+ libconsole.la \
+ libgateways.la
-test_only_plugins = \
- test.la
+libtest_only_plugins = \
+ libtest.la
-# testing-only plugins
+# libtesting-only plugins
if ENABLE_INSTALLED_TESTS
noinst_LTLIBRARIES = \
$(NULL)
-testplugindir = $(gabbletestsdir)/plugins
-testplugin_LTLIBRARIES = \
- $(test_only_plugins) \
+libtestplugindir = $(gabbletestsdir)/plugins
+libtestplugin_LTLIBRARIES = \
+ $(libtest_only_plugins) \
$(NULL)
-test_la_LDFLAGS = $(AM_LDFLAGS)
+libtest_la_LDFLAGS = $(AM_LDFLAGS)
else
noinst_LTLIBRARIES = \
- $(test_only_plugins) \
+ $(libtest_only_plugins) \
$(NULL)
-# because test.la is not installed, libtool will want to compile it as static
+# because libtest.la is not installed, libtool will want to compile it as static
# despite -shared (a convenience library), unless we also use -rpath
-test_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(plugindir)
+libtest_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(plugindir)
endif
if ENABLE_PLUGINS
@@ -42,17 +42,30 @@ EXTRA_DIST = \
telepathy-gabble-xmpp-console
endif
-AM_LDFLAGS = -module -avoid-version -shared
+AM_LDFLAGS = -avoid-version -shared -no-undefined
-test_la_SOURCES = \
+if WINDOWS
+ALL_PLUGIN_LIBS = \
+ @WOCKY_LIBS@ \
+ @GLIB_LIBS@ \
+ @TP_GLIB_LIBS@ \
+ $(top_builddir)/extensions/libgabble-extensions.la \
+ $(top_builddir)/src/libgabble-plugins.la
+
+libtest_la_LIBADD = $(ALL_PLUGIN_LIBS)
+libgateways_la_LIBADD = $(ALL_PLUGIN_LIBS)
+libconsole_la_LIBADD = $(ALL_PLUGIN_LIBS)
+endif
+
+libtest_la_SOURCES = \
test.c \
test.h
-gateways_la_SOURCES = \
+libgateways_la_SOURCES = \
gateways.c \
gateways.h
-console_la_SOURCES = \
+libconsole_la_SOURCES = \
console.c \
console.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 9f18a3b4d..ebd9df6e3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -135,8 +135,6 @@ libgabble_convenience_la_SOURCES = \
olpc-activity.c \
plugin-loader.h \
plugin-loader.c \
- $(top_srcdir)/gabble/plugin.h \
- plugin.c \
presence.h \
presence.c \
presence-cache.h \
@@ -241,19 +239,27 @@ noinst_LTLIBRARIES = libgabble-convenience.la
lib_LTLIBRARIES = libgabble-plugins.la
+libgabble_plugins_la_LDFLAGS = -shared -no-undefined -avoid-version
+
libgabble_plugins_la_LIBADD = \
$(top_builddir)/lib/ext/telepathy-yell/telepathy-yell/libtelepathy-yell.la \
+ $(top_builddir)/lib/loudmouth/libloudmouth.la \
$(ALL_LIBS)
-
-libgabble_plugins_la_SOURCES = $(top_srcdir)/gabble/plugin.h \
+
+libgabble_plugins_la_SOURCES = \
+ (top_srcdir)/gabble/capabilities.h \
+ capabilities.c \
$(top_srcdir)/gabble/caps-channel-manager.h \
- $(top_srcdir)/gabble/plugin-connection.h \
- plugin-connection.c \
- caps-channel-manager.c \
- plugin.c \
- capabilities.c \
- debug.c \
- sidecar.c
+ caps-channel-manager.c \
+ $(top_srcdir)/gabble/debug.h \
+ debug.c \
+ $(top_srcdir)/gabble/error.h \
+ error.c \
+ $(top_srcdir)/gabble/plugin.h \
+ plugin.c \
+ $(top_srcdir)/gabble/plugin-connection.h \
+ plugin-connection.c \
+ sidecar.c
AM_CFLAGS = $(ERROR_CFLAGS) -I$(top_srcdir) -I$(top_builddir) \
@TP_YELL_CFLAGS@ \
@@ -269,7 +275,7 @@ if WINDOWS
AM_CFLAGS += -D_WIN32_WINNT=0x0501
endif
-ALL_LIBS = @DBUS_LIBS@ @GLIB_LIBS@ @WOCKY_LIBS@ @TP_GLIB_LIBS@ \
+ALL_LIBS = @DBUS_LIBS@ @GLIB_LIBS@ @TP_GLIB_LIBS@ \
@SOUP_LIBS@ @NICE_LIBS@ @GMODULE_LIBS@
# build gibber first
diff --git a/src/error.c b/src/error.c
index 57774e7c9..122254238 100644
--- a/src/error.c
+++ b/src/error.c
@@ -371,7 +371,7 @@ gabble_xmpp_error_from_node (LmMessageNode *error_node,
* numbers; the >= 0 test is OK because i is signed */
for (i = NUM_XMPP_ERRORS - 1; i >= 0; i--)
{
- if (lm_message_node_get_child_with_namespace (error_node,
+ if (wocky_node_get_child_ns (error_node,
xmpp_errors[i].name, xmpp_errors[i].namespace))
{
return i;