From d3a2c22f46d1e80c55db98bfee8575a73370c739 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Mon, 22 Aug 2011 16:06:19 -0400 Subject: [PATCH] * #6714: fixed make distcheck for daemon --- daemon/Makefile.am | 13 ++++++++++-- daemon/configure.ac | 1 + daemon/doc/Makefile.am | 4 +--- daemon/doc/doxygen/Makefile.am | 4 +++- daemon/libs/Makefile.am | 2 ++ daemon/libs/iax2/Makefile.am | 7 ++++--- daemon/src/Makefile.am | 6 ++++-- daemon/src/audio/codecs/Makefile.am | 10 +++++++-- daemon/src/audio/noisesuppress.cpp | 9 +++++---- daemon/src/config/Makefile.am | 4 +--- daemon/src/config/yamlnode.cpp | 2 +- daemon/src/dbus/Makefile.am | 10 +++++++-- daemon/src/iax/iaxvoiplink.cpp | 1 + daemon/src/plug-in/Makefile.am | 4 +++- daemon/src/plug-in/test/Makefile.am | 5 +++-- daemon/src/plug-in/test/pluginTest.cpp | 2 +- daemon/test/Makefile.am | 28 +++++++++++++++++++++----- daemon/test/history-sample.tpl | 28 +++++++++++++------------- daemon/test/historytest.cpp | 2 +- daemon/test/instantmessagingtest.cpp | 2 +- daemon/test/main.cpp | 10 ++++----- hudson-sflphone-script.sh | 1 + 22 files changed, 102 insertions(+), 53 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 4fa6a7d84b..e7a7a40df3 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -21,5 +21,14 @@ endif ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libs src ringtones man $(TESTS_DIR) doc -EXTRA_DIST = m4/*.m4 images/* README.gentoo - +EXTRA_DIST = README.gentoo \ + m4/libtool.m4 \ + m4/lt~obsolete.m4 \ + m4/ltoptions.m4 \ + m4/ltsugar.m4 \ + m4/ltversion.m4 \ + images/logo_ico.png \ + images/sfl-logo.png \ + images/sflphone_logo.png \ + images/sflphone.png \ + images/tray-icon.png diff --git a/daemon/configure.ac b/daemon/configure.ac index 3d40a0beca..13891c95da 100644 --- a/daemon/configure.ac +++ b/daemon/configure.ac @@ -348,4 +348,5 @@ BB_ENABLE_DOXYGEN # Go! AC_OUTPUT +AC_CONFIG_SUBDIRS([libs/pjproject]) AC_MSG_NOTICE([[Configuration done! Please make sure that pjsip library (libs/pjproject) has already been compiled. Run `make' to build the software.]]) diff --git a/daemon/doc/Makefile.am b/daemon/doc/Makefile.am index 10aa20d83f..237e7ee53b 100644 --- a/daemon/doc/Makefile.am +++ b/daemon/doc/Makefile.am @@ -1,7 +1,5 @@ SUBDIRS = dbus-api -if ENABLE_DOXYGEN - SUBDIRS += doxygen -endif +SUBDIRS += doxygen .PHONY: doc doc: diff --git a/daemon/doc/doxygen/Makefile.am b/daemon/doc/doxygen/Makefile.am index 75d619d822..abe5be8b20 100644 --- a/daemon/doc/doxygen/Makefile.am +++ b/daemon/doc/doxygen/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = +if ENABLE_DOXYGEN docdir = ${prefix}/share/doc/wifidog-@VERSION@ html_parent_dir = . @@ -53,3 +53,5 @@ maintainer-clean-local: clean-local -e 's:@-html_footer-@:${HTML_FOOTER}:g' rm $@.tmp3 mv $@.tmp4 $@ + +endif diff --git a/daemon/libs/Makefile.am b/daemon/libs/Makefile.am index b88a3bf3f9..da08ea625d 100644 --- a/daemon/libs/Makefile.am +++ b/daemon/libs/Makefile.am @@ -1 +1,3 @@ SUBDIRS = utilspp iax2 + +EXTRA_DIST=pjproject diff --git a/daemon/libs/iax2/Makefile.am b/daemon/libs/iax2/Makefile.am index 0ffa5583e9..5bb06f6dde 100644 --- a/daemon/libs/iax2/Makefile.am +++ b/daemon/libs/iax2/Makefile.am @@ -1,5 +1,5 @@ AM_CFLAGS = -Wall -O2 -AM_CFLAGS += -g -Wall -Wstrict-prototypes -I . +AM_CFLAGS += -g -Wall -Wstrict-prototypes -I $(top_srcdir)/libs/iax2/ AM_CFLAGS += -DLIBIAX AM_CFLAGS += -fsigned-char # -DDEBUG_SUPPORT (doesn't compile with it) @@ -7,5 +7,6 @@ AM_CFLAGS += -fsigned-char AM_CFLAGS += $(UCFLAGS) noinst_LTLIBRARIES = libiax2.la -libiax2_la_SOURCES = iax2-parser.c iax.c md5.c jitterbuf.c - +libiax2_la_SOURCES = answer.h busy.h dialtone.h frame.h iax2.h iax2-parser.c \ + iax2-parser.h iax.c iax-client.h iax.h jitterbuf.c \ + jitterbuf.h md5.c md5.h diff --git a/daemon/src/Makefile.am b/daemon/src/Makefile.am index 6b307eaa2e..91e1c98e4c 100644 --- a/daemon/src/Makefile.am +++ b/daemon/src/Makefile.am @@ -34,6 +34,8 @@ sflphoned_LDADD = ./libsflphone.la $(libssl_LIBS) -lcrypto noinst_LTLIBRARIES = libsflphone.la noinst_HEADERS = \ + global.h \ + Codec.h \ conference.h \ voiplink.h \ preferences.h \ @@ -48,8 +50,8 @@ noinst_HEADERS = \ fileutils.h libsflphone_la_LIBADD = \ - $(src)/libs/utilspp/libutilspp.la \ - $(src)/libs/iax2/libiax2.la \ + $(top_builddir)/libs/utilspp/libutilspp.la \ + $(top_builddir)/libs/iax2/libiax2.la \ $(IAX_LIB) \ ./im/libim.la \ ./sip/libsiplink.la \ diff --git a/daemon/src/audio/codecs/Makefile.am b/daemon/src/audio/codecs/Makefile.am index 3566ef8d80..bcd90a585e 100644 --- a/daemon/src/audio/codecs/Makefile.am +++ b/daemon/src/audio/codecs/Makefile.am @@ -66,7 +66,7 @@ endif noinst_PROGRAMS = libcodec_ulaw.so libcodec_alaw.so libcodec_g722.so $(GSM_LIB) $(SPEEX_NB_LIB) $(SPEEX_WB_LIB) $(SPEEX_UB_LIB) $(CELT_LIB) -noinst_HEADERS = audiocodec.h audiocodecfactory.h speexcodec.h +noinst_HEADERS = audiocodec.h audiocodecfactory.h speexcodec.h g722.h libcodec_ulaw_so_SOURCES = ulaw.cpp libcodec_ulaw_so_CFLAGS = -fPIC -g -Wall @@ -94,21 +94,27 @@ install-libcodec_ulaw_so: libcodec_ulaw.so mkdir -p $(sflcodecdir) $(INSTALL_PROGRAM) libcodec_ulaw.so $(sflcodecdir) install-libcodec_alaw_so: libcodec_alaw.so + mkdir -p $(sflcodecdir) $(INSTALL_PROGRAM) libcodec_alaw.so $(sflcodecdir) install-libcodec_g722_so: libcodec_g722.so + mkdir -p $(sflcodecdir) $(INSTALL_PROGRAM) libcodec_g722.so $(sflcodecdir) install-libcodec_gsm_so: libcodec_gsm.so + mkdir -p $(sflcodecdir) $(INSTALL_PROGRAM) libcodec_gsm.so $(sflcodecdir) install-libcodec_speex_nb_so: libcodec_speex_nb.so + mkdir -p $(sflcodecdir) $(INSTALL_PROGRAM) libcodec_speex_nb.so $(sflcodecdir) install-libcodec_speex_wb_so: libcodec_speex_wb.so + mkdir -p $(sflcodecdir) $(INSTALL_PROGRAM) libcodec_speex_wb.so $(sflcodecdir) install-libcodec_speex_ub_so: libcodec_speex_ub.so + mkdir -p $(sflcodecdir) $(INSTALL_PROGRAM) libcodec_speex_ub.so $(sflcodecdir) install-libcodec_celt_so: libcodec_celt.so + mkdir -p $(sflcodecdir) $(INSTALL_PROGRAM) libcodec_celt.so $(sflcodecdir) - uninstall-libcodec_ulaw_so: rm -f $(sflcodecdir)/libcodec_ulaw.so uninstall-libcodec_alaw_so: diff --git a/daemon/src/audio/noisesuppress.cpp b/daemon/src/audio/noisesuppress.cpp index 7016b5f10d..c7477af52e 100644 --- a/daemon/src/audio/noisesuppress.cpp +++ b/daemon/src/audio/noisesuppress.cpp @@ -51,20 +51,21 @@ void NoiseSuppress::reset (void) initNewNoiseSuppressor (_smplPerFrame, _samplingRate); } -void NoiseSuppress::putData (SFLDataFormat *inputData, int nbBytes) {} +void NoiseSuppress::putData (SFLDataFormat * /*inputData*/, int /*nbBytes*/) {} -int NoiseSuppress::getData (SFLDataFormat *outputData) +int NoiseSuppress::getData (SFLDataFormat * /*outputData*/) { return 0; } -void NoiseSuppress::process (SFLDataFormat *data, int nbBytes) +void NoiseSuppress::process (SFLDataFormat *data, int /*nbBytes*/) { if (_noiseState) speex_preprocess_run (_noiseState, data); } -int NoiseSuppress::process (SFLDataFormat *inputData, SFLDataFormat *outputData, int nbBytes) +int NoiseSuppress::process (SFLDataFormat * /*inputData*/, + SFLDataFormat * /*outputData*/, int /*nbBytes*/) { return 0; } diff --git a/daemon/src/config/Makefile.am b/daemon/src/config/Makefile.am index 4d84e41e59..ba68009603 100755 --- a/daemon/src/config/Makefile.am +++ b/daemon/src/config/Makefile.am @@ -1,5 +1,3 @@ -SUBDIRS = - noinst_LTLIBRARIES = libconfig.la libconfig_la_SOURCES = \ @@ -20,4 +18,4 @@ noinst_HEADERS = \ libconfig_la_LDFLAGS = @yaml_LIBS@ -libconfig_la_CFLAGS = @yaml_CFLAGS@ \ No newline at end of file +libconfig_la_CXXFLAGS = @yaml_CFLAGS@ -I $(top_srcdir)/src diff --git a/daemon/src/config/yamlnode.cpp b/daemon/src/config/yamlnode.cpp index b03564f5de..f310fb4451 100644 --- a/daemon/src/config/yamlnode.cpp +++ b/daemon/src/config/yamlnode.cpp @@ -29,7 +29,7 @@ */ #include "yamlnode.h" -#include "src/global.h" +#include "global.h" namespace Conf { diff --git a/daemon/src/dbus/Makefile.am b/daemon/src/dbus/Makefile.am index cbfa036393..0c6522e84d 100644 --- a/daemon/src/dbus/Makefile.am +++ b/daemon/src/dbus/Makefile.am @@ -47,7 +47,13 @@ service_DATA = $(service_in_files:.service.in=.service) $(service_DATA): $(service_in_files) Makefile sed -e "s|libexec|$(libdir)/sflphone|" $<> $@ -EXTRA_DIST = *.xml README +EXTRA_DIST = README $(service_in_files) \ + callmanager-introspec.xml \ + configurationmanager-introspec.xml \ + contactmanager-introspec.xml \ + instance-introspec.xml \ + org.freedesktop.NetworkManager.xml CLEANFILES= \ - $(BUILT_SOURCES) + $(BUILT_SOURCES) \ + org.sflphone.SFLphone.service diff --git a/daemon/src/iax/iaxvoiplink.cpp b/daemon/src/iax/iaxvoiplink.cpp index d639b8f16a..9cb6d104d0 100644 --- a/daemon/src/iax/iaxvoiplink.cpp +++ b/daemon/src/iax/iaxvoiplink.cpp @@ -265,6 +265,7 @@ IAXVoIPLink::sendAudioFromMic (void) if (audioRate != mainBufferSampleRate) { converter->resample (decData , resampledData , audioRate, mainBufferSampleRate, samples); in = resampledData; + outSamples = 0; } else { outSamples = samples; in = decData; diff --git a/daemon/src/plug-in/Makefile.am b/daemon/src/plug-in/Makefile.am index ec8d438006..be2aa0731b 100644 --- a/daemon/src/plug-in/Makefile.am +++ b/daemon/src/plug-in/Makefile.am @@ -6,5 +6,7 @@ noinst_LTLIBRARIES = libplugin.la libplugin_la_SOURCES = \ pluginmanager.cpp \ - librarymanager.cpp + librarymanager.cpp \ + pluginmanager.h librarymanager.h plugin.h +libplugin_la_CXXFLAGS = -I $(top_srcdir)/src/plug-in diff --git a/daemon/src/plug-in/test/Makefile.am b/daemon/src/plug-in/test/Makefile.am index 6809be2c0a..089aa35a82 100644 --- a/daemon/src/plug-in/test/Makefile.am +++ b/daemon/src/plug-in/test/Makefile.am @@ -2,11 +2,12 @@ include $(top_srcdir)/globals.mak PLUGIN_LIB = libplugintest.so libplugintest_so_SOURCES = pluginTest.cpp -libplugintest_so_CXXFLAGS = -fPIC -g -Wall +LLIBS=$(top_builddir)/src/plug-in/libplugin.la +libplugintest_so_CXXFLAGS = -fPIC -g -Wall -I $(top_srcdir)/src/plug-in libplugintest_so_LDFLAGS = --shared -lc INSTALL_PLUGIN_RULE = install-libplugintest_so -noinst_PROGRAMS = libplugintest.so +check_PROGRAMS = libplugintest.so install-exec-local: install-libplugintest_so uninstall-local: uninstall-libplugintest_so diff --git a/daemon/src/plug-in/test/pluginTest.cpp b/daemon/src/plug-in/test/pluginTest.cpp index 79d9f43b47..584f151d74 100644 --- a/daemon/src/plug-in/test/pluginTest.cpp +++ b/daemon/src/plug-in/test/pluginTest.cpp @@ -28,7 +28,7 @@ * as that of the covered work. */ -#include "../plugin.h" +#include "plugin.h" #define MAJOR_VERSION 1 #define MINOR_VERSION 0 diff --git a/daemon/test/Makefile.am b/daemon/test/Makefile.am index 5dde3e8664..add6996ead 100644 --- a/daemon/test/Makefile.am +++ b/daemon/test/Makefile.am @@ -4,12 +4,13 @@ TESTS_ENVIRONMENT = CODECS_PATH="$(top_builddir)/src/audio/codecs" \ FAKE_PLUGIN_DIR="$(top_builddir)/src/plug-in/test/" \ FAKE_PLUGIN_NAME="$(top_builddir)/src/plug-in/test/libplugintest.so" check_PROGRAMS = test -TESTS = run_tests.sh -test_CXXFLAGS = $(CPPUNIT_CFLAGS) -test_LDADD = $(LLIBS) @LIBCRYPTO_LIBS@ +test_CXXFLAGS = -I . +test_LDADD = $(top_builddir)/src/libsflphone.la @LIBCRYPTO_LIBS@ @CPPUNIT_LIBS@ +EXTRA_DIST = $(test_SOURCES) sflphoned-sample.yml history-sample.tpl run_tests.sh test_SOURCES = \ + constants.h \ main.cpp \ validator.cpp \ validator.h \ @@ -41,5 +42,22 @@ test_SOURCES = \ echocanceltest.cpp \ gaincontroltest.h \ gaincontroltest.cpp - -LLIBS=$(CPPUNIT_LIBS) ../src/libsflphone.la + accounttest.h \ + audiolayertest.h \ + configurationtest.h \ + constants.h \ + delaydetectiontest.h \ + echocanceltest.h \ + gaincontroltest.h \ + historytest.h \ + hookmanagertest.h \ + instantmessagingtest.h \ + mainbuffertest.h \ + numbercleanertest.h \ + pluginmanagertest.h \ + ringtonetest.h \ + rtptest.h \ + sdesnegotiatortest.h \ + sdptest.h \ + siptest.h \ + validator.h diff --git a/daemon/test/history-sample.tpl b/daemon/test/history-sample.tpl index 2fe78d9edd..e4e0e895d5 100644 --- a/daemon/test/history-sample.tpl +++ b/daemon/test/history-sample.tpl @@ -1,4 +1,16 @@ -[1688219219] +[207464428] +accountid= +confid= +id=Account:1239059899 +name=Emmanuel Milou +number=136 +recordfile= +timeadded= +timestamp_start=747638685 +timestamp_stop=747638765 +type=2 + +[221051947] accountid=empty confid= id= @@ -10,7 +22,7 @@ timestamp_start=144562000 timestamp_stop=144562458 type=0 -[1828895003] +[871962260] accountid= confid= id=Account:43789459478 @@ -22,15 +34,3 @@ timestamp_start=775354456 timestamp_stop=775354987 type=1 -[2049190489] -accountid= -confid= -id=Account:1239059899 -name=Emmanuel Milou -number=136 -recordfile= -timeadded= -timestamp_start=747638685 -timestamp_stop=747638765 -type=2 - diff --git a/daemon/test/historytest.cpp b/daemon/test/historytest.cpp index f8efbee22d..c9cbd0e76e 100644 --- a/daemon/test/historytest.cpp +++ b/daemon/test/historytest.cpp @@ -28,7 +28,7 @@ * as that of the covered work. */ -#include <stdio.h> +#include <cstdio> #include <sstream> #include <cstdlib> diff --git a/daemon/test/instantmessagingtest.cpp b/daemon/test/instantmessagingtest.cpp index 3d3b598bf4..18ad7cc3ee 100644 --- a/daemon/test/instantmessagingtest.cpp +++ b/daemon/test/instantmessagingtest.cpp @@ -184,7 +184,7 @@ static void XMLCALL startElementCallback(void *userData, const char *name, const } -static void XMLCALL endElementCallback(void *userData, const char *name) +static void XMLCALL endElementCallback(void * /*userData*/, const char * /*name*/) { // std::cout << "endElement " << name << std::endl; } diff --git a/daemon/test/main.cpp b/daemon/test/main.cpp index af8fbcd136..ba5fa4e639 100644 --- a/daemon/test/main.cpp +++ b/daemon/test/main.cpp @@ -28,9 +28,9 @@ * as that of the covered work. */ -#include <logger.h> -#include <manager.h> -#include <constants.h> +#include "logger.h" +#include "manager.h" +#include "constants.h" #include <cstdlib> @@ -119,11 +119,11 @@ int main (int argc, char* argv[]) } // Run the tests. - bool wasSucessful = runner.run(); + bool wasSuccessful = runner.run(); Manager::instance().terminate(); system("mv " CONFIG_SAMPLE ".bak " CONFIG_SAMPLE); - return wasSucessful ? 0 : 1; + return wasSuccessful ? 0 : 1; } diff --git a/hudson-sflphone-script.sh b/hudson-sflphone-script.sh index e083be6494..b1e29afaac 100755 --- a/hudson-sflphone-script.sh +++ b/hudson-sflphone-script.sh @@ -28,6 +28,7 @@ pushd daemon/test # Remove the previous XML test file rm -rf $XML_RESULTS make check || exit 1 +./run_tests.sh popd # Compile the client -- GitLab