xmpp_adapter.c speaks protocol v1 on stdio with libstrophe: hello with jid/password/resource/host/port, configure, connect (resource appended to a bare JID), xmpp_run_once in the main loop next to a non-blocking stdin, state connecting/online/offline, text messages in both directions (incoming message events, 'sent' for our own), network/stream errors, clean disconnect and bye. DTCHAT_XMPP_NO_TLS/TRUST_TLS exist for tests. libstrophe 0.14's get_text_ptr() returned NULL for a parsed body, so the adapter uses get_text() and frees it. configure checks strophe.h and libstrophe (MCDE_STROPHE); without it dtchat-xmpp is not built. tests/xmpp_fake.py runs a minimal XMPP server (stream header, SASL PLAIN, resource bind, one message each way) and the adapter passes: online after bind, incoming text and bare-JID conversation, outgoing stanza addressed and delivered, SASL payload, bye and exit 0, no stderr. In-tree build pending: a foreign release chain holds the lock (pid 141722).
55 lines
1.9 KiB
Makefile
55 lines
1.9 KiB
Makefile
MAINTAINERCLEANFILES = Makefile.in
|
|
|
|
bin_PROGRAMS = dtchat dtchat-headless
|
|
noinst_PROGRAMS = dtchat-demo dtchat-irc
|
|
|
|
man_MANS = dtchat.1
|
|
|
|
dtchat_CPPFLAGS = -I$(top_srcdir)/include \
|
|
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat \
|
|
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\"
|
|
|
|
# The model and the JSON schema helpers live in libDtChat/libDtChatIpc;
|
|
# DtInitialize/DTCLIENTLIBS come with T2.7.
|
|
dtchat_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
|
|
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(XTOOLLIB)
|
|
|
|
dtchat_SOURCES = main.c ui_main.c ui_accounts.c ui_request.c ui_peer.c \
|
|
ui_file.c localui.c demo.c ui_main.h ui_accounts.h ui_request.h \
|
|
ui_peer.h ui_file.h localui.h demo.h
|
|
|
|
|
|
dtchat_demo_SOURCES = demo_adapter.c
|
|
dtchat_demo_CPPFLAGS = -I$(top_srcdir)/include \
|
|
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
|
|
dtchat_demo_LDADD = $(top_builddir)/lib/libDtChat/libDtChatIpc.la
|
|
|
|
dtchat_irc_SOURCES = irc_adapter.c
|
|
dtchat_irc_CPPFLAGS = -I$(top_srcdir)/include \
|
|
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat \
|
|
$(TLS_CPPFLAGS)
|
|
dtchat_irc_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
|
|
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(LIBTLS)
|
|
|
|
dtchat_headless_SOURCES = headless.c
|
|
dtchat_headless_CPPFLAGS = -I$(top_srcdir)/include \
|
|
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
|
|
dtchat_headless_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
|
|
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(LIBTLS) $(CRYPTOLIB)
|
|
|
|
if MCDE_STROPHE
|
|
noinst_PROGRAMS += dtchat-xmpp
|
|
dtchat_xmpp_SOURCES = xmpp_adapter.c
|
|
dtchat_xmpp_CPPFLAGS = -I$(top_srcdir)/include \
|
|
-I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat
|
|
dtchat_xmpp_LDADD = $(top_builddir)/lib/libDtChat/libDtChat.la \
|
|
$(top_builddir)/lib/libDtChat/libDtChatIpc.la $(STROPHELIB)
|
|
endif
|
|
|
|
appdefaultsdir = $(CDE_INSTALLATION_TOP)/app-defaults/C
|
|
dist_appdefaults_DATA = Dtchat
|
|
|
|
if SOLARIS
|
|
dtchat_LDADD += -lintl
|
|
endif
|