pidgin.vv.yahoo.voice: e24fe04d: Simplify configure script regarding sofi...

maiku at pidgin.im maiku at pidgin.im
Sat Aug 29 18:01:52 EDT 2009


-----------------------------------------------------------------
Revision: e24fe04d6dada7593746f960b9cb1aa4acb074b2
Ancestor: 1815471c7f16efce664b130a8ee2212e63dfa2d9
Author: maiku at pidgin.im
Date: 2009-08-29T21:10:21
Branch: im.pidgin.pidgin.vv.yahoo.voice
URL: http://d.pidgin.im/viewmtn/revision/info/e24fe04d6dada7593746f960b9cb1aa4acb074b2

Modified files:
        configure.ac libpurple/protocols/yahoo/yahoo_sip.c

ChangeLog: 

Simplify configure script regarding sofia-sip and wrap Yahoo voice code
in USE_VV and USE_SOFIASIP.

-------------- next part --------------
============================================================
--- configure.ac	c5324dfaaca8f124dd55bd725cf7716f87f913b9
+++ configure.ac	613b28447f23ca16c59028db31104387417a05c2
@@ -797,18 +797,10 @@ if test "x$enable_vv" != "xno"; then
 if test "x$enable_vv" != "xno"; then
 	if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno"; then
 		AC_DEFINE(USE_VV, 1, [Use voice and video])
-		PKG_CHECK_MODULES(SOFIASIP, [sofia-sip-ua], [
+		PKG_CHECK_MODULES(SOFIASIP, [sofia-sip-ua sofia-sip-ua-glib], [
 			AC_DEFINE(USE_SOFIASIP, 1, [Use Sofia-SIP for SIP voice and video])
 			AC_SUBST(SOFIASIP_CFLAGS)
 			AC_SUBST(SOFIASIP_LIBS)
-			
-			PKG_CHECK_MODULES(SOFIASIPGLIB, [sofia-sip-ua-glib], [
-				AC_DEFINE(USE_SOFIASIPGLIB, 1, [Use GLib utils for Sofia-SIP for SIP voice and video])
-				AC_SUBST(SOFIASIPGLIB_CFLAGS)
-				AC_SUBST(SOFIASIPGLIB_LIBS)
-			], [
-				enable_sofiasip="no"
-			])
 		], [
 			enable_sofiasip="no"
 		])
============================================================
--- libpurple/protocols/yahoo/yahoo_sip.c	b7c489365b0e3f759114de691ec57fa338487a04
+++ libpurple/protocols/yahoo/yahoo_sip.c	1a250ef7eab5f06e32ec5c71e42137200b443c5f
@@ -32,14 +32,19 @@
 #include "yahoo_sip.h"
 #include "libymsg.h"
 
-#include <glib.h>
+#ifdef USE_VV
+#ifdef USE_SOFIASIP
 #include <sofia-sip/nua.h>
 #include <sofia-sip/su_glib.h>
 #include <sofia-sip/soa.h>
 #include <sofia-sip/sip_header.h>
 #include <sofia-sip/sdp.h>
+#endif /* USE_SOFIASIP */
+#endif /* USE_VV */
 
 struct _YahooSip {
+#ifdef USE_VV
+#ifdef USE_SOFIASIP
 	su_root_t *root;
 	nua_t *nua;
 	nua_handle_t *nh;
@@ -47,8 +52,12 @@ struct _YahooSip {
 	guint yahooref_timeout_handle;
 	gchar *to_str;
 	gboolean shutdown;
+#endif /* USE_SOFIASIP */
+#endif /* USE_VV */
 };
 
+#ifdef USE_VV
+#ifdef USE_SOFIASIP
 /* This is the y64 alphabet... it's like base64, but has a . and a _ */
 static const char base64digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._";
 
@@ -517,19 +526,27 @@ yahoo_start_sip(GSList *hosts, gpointer 
 #endif
 			TAG_END());
 }
+#endif /* USE_SOFIASIP */
+#endif /* USE_VV */
 
 void
 yahoo_sip_init(PurpleAccount *account)
 {
+#ifdef USE_VV
+#ifdef USE_SOFIASIP
 	if (purple_dnsquery_a(YAHOO_SIP_HOST, 443,
 			yahoo_start_sip, account) == NULL)
 		purple_debug_warning("yahoo", "Error starting SIP "
 				"server dns query\n");
+#endif /* USE_SOFIASIP */
+#endif /* USE_VV */
 }
 
 void
 yahoo_sip_uninit(PurpleAccount *account)
 {
+#ifdef USE_VV
+#ifdef USE_SOFIASIP
 	PurpleConnection *pc = purple_account_get_connection(account);
 	YahooData *yd = purple_connection_get_protocol_data(pc);
 	YahooSip *ysip = yd->ysip;
@@ -557,4 +574,6 @@ yahoo_sip_uninit(PurpleAccount *account)
 	nua_destroy(ysip->nua);
 	g_free(ysip->to_str);
 	g_free(ysip);
+#endif /* USE_SOFIASIP */
+#endif /* USE_VV */
 }


More information about the Commits mailing list