]> www.infradead.org Git - pidgin-chime.git/commitdiff
Require farstream 0.2.8 for audio support
authorDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 7 Nov 2017 18:24:49 +0000 (19:24 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 7 Nov 2017 18:24:49 +0000 (19:24 +0100)
Makefile.am
chat.c
chime.c
configure.ac

index 8dd7e42ffd7a36374e9f9b39a8959cb3c4dbd05e..8ee8f961d51da9d8936309bb3f7f2a0796ccb53c 100644 (file)
@@ -19,9 +19,13 @@ libchime_la_SOURCES = chime.c buddy.c rooms.c chat.c messages.c conversations.c
        chime-call.c chime-call.h chime-call-audio.c \
        protobuf/auth_message.pb-c.c protobuf/auth_message.pb-c.h \
        protobuf/data_message.pb-c.c protobuf/data_message.pb-c.h \
-       protobuf/rt_message.pb-c.c protobuf/rt_message.pb-c.h \
+       protobuf/rt_message.pb-c.c protobuf/rt_message.pb-c.h
+
+if BUILD_FARSTREAM
+libchime_la_SOURCES += \
        fs-app-transmitter.c fs-app-transmitter.h \
        fs-app-stream-transmitter.c fs-app-stream-transmitter.h
+endif
 
 libchime_la_CFLAGS = $(PURPLE_CFLAGS) $(SOUP_CFLAGS) $(JSON_CFLAGS) $(LIBXML_CFLAGS) $(PROTOBUF_CFLAGS) $(OPUS_CFLAGS) $(FARSTREAM_CFLAGS)
 libchime_la_LIBADD = $(PURPLE_LIBS) $(SOUP_LIBS) $(JSON_LIBS) $(LIBXML_LIBS) $(PROTOBUF_LIBS) $(OPUS_LIBS) $(FARSTREAM_LIBS)
diff --git a/chat.c b/chat.c
index 6a0b6d0d28ebe67218527212065f6bbffd08661b..06786e962be033c3fdd5e623846e69aac6ef1595 100644 (file)
--- a/chat.c
+++ b/chat.c
@@ -303,7 +303,6 @@ static void on_chat_name(ChimeObject *obj, GParamSpec *ignored, struct chime_cha
        if (name && chat->conv)
                purple_conversation_set_name(chat->conv, name);
 }
-#include <farstream/fs-candidate.h>
 
 static void audio_joined(GObject *source, GAsyncResult *result, gpointer _chat)
 {
diff --git a/chime.c b/chime.c
index e47cba79e862bcc254b51ad16c99cf07ce9f9da5..876b03614d23e1badb8b96969541054886e530cb 100644 (file)
--- a/chime.c
+++ b/chime.c
@@ -441,15 +441,20 @@ static PurplePluginInfo chime_plugin_info = {
        .actions = chime_purple_plugin_actions,
 };
 
+#ifdef HAVE_FARSTREAM
 #include "fs-app-transmitter.h"
 #include <farstream/fs-plugin.h>
 extern GType fs_app_transmitter_register_type(void *);
+#endif
 static void chime_purple_init_plugin(PurplePlugin *plugin)
 {
        PurpleAccountOption *opt;
        GList *opts = NULL;
 
+#ifdef HAVE_FARSTREAM
        fs_plugin_register_static("app", "transmitter", fs_app_transmitter_register_type(NULL));
+#endif
+
        opt = purple_account_option_string_new(_("Signin URL"),
                                               "server", NULL);
        opts = g_list_append(opts, opt);
index eaa5e93796672e58091ff7551d7c0d036e9501bd..32a008336216248c74a03beb5659e56862329b36 100644 (file)
@@ -47,7 +47,11 @@ if test "$purple_datadir" = "" ; then
 fi
 AC_SUBST(pixmapdir, ${purple_datadir}/pixmaps/pidgin/protocols)
 
-PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2])
+PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2 >= 0.2.8],
+                            [have_farstream=yes
+                            AC_DEFINE(HAVE_FARSTREAM, 1, [Have fs_plugin_register_static])], [have_farstream=no])
+AM_CONDITIONAL(BUILD_FARSTREAM, [ test "$have_farstream" = "yes" ])
+
 PKG_CHECK_MODULES(OPUS, [opus])
 PKG_CHECK_MODULES(PROTOBUF, [libprotobuf-c])
 PKG_CHECK_MODULES(JSON, [json-glib-1.0])