ekiga r6823 - in trunk: . src src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6823 - in trunk: . src src/endpoints
- Date: Thu, 4 Sep 2008 18:38:42 +0000 (UTC)
Author: dsandras
Date: Thu Sep 4 18:38:42 2008
New Revision: 6823
URL: http://svn.gnome.org/viewvc/ekiga?rev=6823&view=rev
Log:
Allow compiling without H.323 support or without SIP support.
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/endpoints/opal-gmconf-bridge.cpp
trunk/src/endpoints/opal-main.cpp
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Sep 4 18:38:42 2008
@@ -517,6 +517,24 @@
AC_SUBST(OPAL_CFLAGS)
AC_SUBST(OPAL_LIBS)
+H323=`$PKG_CONFIG --variable=h323 opal`
+if test "x$H323" = "x1"; then
+ H323="enabled"
+ AC_DEFINE(HAVE_H323,1,[H323 support])
+else
+ H323="disabled"
+fi
+AM_CONDITIONAL(HAVE_H323, test "x${H323}" = "xenabled")
+
+SIP=`$PKG_CONFIG --variable=sip opal`
+if test "x$SIP" = "x1"; then
+ SIP="enabled"
+ AC_DEFINE(HAVE_SIP,1,[SIP support])
+else
+ SIP="disabled"
+fi
+AM_CONDITIONAL(HAVE_SIP, test "x${SIP}" = "xenabled")
+
dnl #########################################################################
dnl Support for internationalization
@@ -650,6 +668,9 @@
echo " DirectX support : $DX"
fi
echo ""
+echo " H.323 support : $H323"
+echo " SIP support : $SIP"
+echo ""
if test "x${gm_platform}" != "xmingw" ; then
echo " DBUS support : $DBUS"
echo " DBUS service support : $DBUS_SERVICE"
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Thu Sep 4 18:38:42 2008
@@ -93,18 +93,8 @@
endpoints/ekiga.cpp \
endpoints/manager.h \
endpoints/manager.cpp \
- endpoints/h323-endpoint.h \
- endpoints/h323-endpoint.cpp \
endpoints/pcss.h \
endpoints/pcss.cpp \
- endpoints/sip-presentity.h \
- endpoints/sip-presentity.cpp \
- endpoints/sip-chat-simple.h \
- endpoints/sip-chat-simple.cpp \
- endpoints/sip-dialect.h \
- endpoints/sip-dialect.cpp \
- endpoints/sip-endpoint.h \
- endpoints/sip-endpoint.cpp \
endpoints/opal-account.h \
endpoints/opal-account.cpp \
endpoints/opal-bank.h \
@@ -118,6 +108,24 @@
endpoints/opal-main.h \
endpoints/opal-main.cpp
+if HAVE_H323
+ekiga_SOURCES += \
+ endpoints/h323-endpoint.h \
+ endpoints/h323-endpoint.cpp
+endif
+
+if HAVE_SIP
+ekiga_SOURCES += \
+ endpoints/sip-presentity.h \
+ endpoints/sip-presentity.cpp \
+ endpoints/sip-chat-simple.h \
+ endpoints/sip-chat-simple.cpp \
+ endpoints/sip-dialect.h \
+ endpoints/sip-dialect.cpp \
+ endpoints/sip-endpoint.h \
+ endpoints/sip-endpoint.cpp
+endif
+
if HAVE_DBUS
ekiga_SOURCES += \
components/dbus-stub.h \
Modified: trunk/src/endpoints/opal-gmconf-bridge.cpp
==============================================================================
--- trunk/src/endpoints/opal-gmconf-bridge.cpp (original)
+++ trunk/src/endpoints/opal-gmconf-bridge.cpp Thu Sep 4 18:38:42 2008
@@ -226,6 +226,7 @@
//
// SIP related keys
//
+#ifdef HAVE_SIP
else if (key.find (SIP_KEY) != string::npos) {
Opal::Sip::EndPoint *sip_manager = dynamic_cast<Opal::Sip::EndPoint *> (manager.get_protocol_manager ("sip"));
@@ -253,10 +254,12 @@
}
}
}
+#endif
//
// H.323 keys
//
+#ifdef HAVE_H323
else if (key.find (SIP_KEY) != string::npos) {
Opal::H323::EndPoint *h323_manager = dynamic_cast<Opal::H323::EndPoint *> (manager.get_protocol_manager ("h323"));
@@ -286,6 +289,7 @@
}
}
}
+#endif
//
Modified: trunk/src/endpoints/opal-main.cpp
==============================================================================
--- trunk/src/endpoints/opal-main.cpp (original)
+++ trunk/src/endpoints/opal-main.cpp Thu Sep 4 18:38:42 2008
@@ -47,14 +47,30 @@
#include "manager.h"
#include "ekiga.h"
+
+#ifdef HAVE_SIP
#include "sip-endpoint.h"
+#endif
+
+#ifdef HAVE_H323
#include "h323-endpoint.h"
+#endif
static bool
is_supported_address (const std::string uri)
{
- return (uri.find ("sip:") == 0 || uri.find ("h323:") == 0);
+#ifdef HAVE_H323
+ if (uri.find ("h323:") == 0)
+ return true;
+#endif
+
+#ifdef HAVE_SIP
+ if (uri.find ("sip:") == 0)
+ return true;
+#endif
+
+ return false;
}
@@ -82,8 +98,6 @@
Ekiga::AccountCore *account_core = NULL;
bool result = true;
- unsigned sip_port = gm_conf_get_int (SIP_KEY "listen_port");
- unsigned h323_port = gm_conf_get_int (H323_KEY "listen_port");
contact_core = dynamic_cast<Ekiga::ContactCore *> (core.get ("contact-core"));
presence_core = dynamic_cast<Ekiga::PresenceCore *> (core.get ("presence-core"));
@@ -92,17 +106,23 @@
account_core = dynamic_cast<Ekiga::AccountCore *> (core.get ("account-core"));
CallManager *call_manager = new CallManager (core);
- Sip::EndPoint *sip_manager = new Sip::EndPoint (*call_manager, core, sip_port);
- H323::EndPoint *h323_manager = new H323::EndPoint (*call_manager, core, h323_port);
+#ifdef HAVE_SIP
+ unsigned sip_port = gm_conf_get_int (SIP_KEY "listen_port");
+ Sip::EndPoint *sip_manager = new Sip::EndPoint (*call_manager, core, sip_port);
call_manager->add_protocol_manager (*sip_manager);
+ account_core->add_account_subscriber (*sip_manager);
+#endif
+
+#ifdef HAVE_H323
+ unsigned h323_port = gm_conf_get_int (H323_KEY "listen_port");
+ H323::EndPoint *h323_manager = new H323::EndPoint (*call_manager, core, h323_port);
call_manager->add_protocol_manager (*h323_manager);
+ account_core->add_account_subscriber (*h323_manager);
+#endif
call_core->add_manager (*call_manager);
- account_core->add_account_subscriber (*sip_manager);
- account_core->add_account_subscriber (*h323_manager);
-
new ConfBridge (*call_manager);
call_manager->start ();
@@ -111,25 +131,30 @@
if (contact_core != NULL) {
+#ifdef HAVE_SIP
contact_core->add_contact_decorator (*sip_manager);
+#endif
+#ifdef HAVE_H323
contact_core->add_contact_decorator (*h323_manager);
+#endif
}
else
return false;
if (presence_core != NULL) {
+#ifdef HAVE_SIP
presence_core->add_presentity_decorator (*sip_manager);
- presence_core->add_presentity_decorator (*h323_manager);
- presence_core->add_supported_uri (sigc::ptr_fun (is_supported_address)); //FIXME
-
presence_core->add_presence_fetcher (*sip_manager);
presence_core->add_presence_publisher (*sip_manager);
+#endif
+#ifdef HAVE_H323
+ presence_core->add_presentity_decorator (*h323_manager);
+#endif
+ presence_core->add_supported_uri (sigc::ptr_fun (is_supported_address)); //FIXME
}
- else {
-
+ else
return false;
- }
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]