summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTOTOOLS-TODO18
-rw-r--r--Makefile.am37
-rwxr-xr-xbuild/gen-backends-am.sh8
-rw-r--r--configure.ac13
-rw-r--r--po/POTFILES.skip1
-rw-r--r--src/backends/activesync/activesync.am4
-rw-r--r--src/backends/evolution/evolution.am8
-rw-r--r--src/backends/webdav/webdav.am4
-rw-r--r--src/gnome-bluetooth/gnome-bluetooth.am3
-rw-r--r--src/src.am29
-rw-r--r--src/syncevo/syncevo.am7
-rw-r--r--src/syncevo/syncevolution.pc.in2
12 files changed, 86 insertions, 48 deletions
diff --git a/AUTOTOOLS-TODO b/AUTOTOOLS-TODO
index 819c0bec..44c308f8 100644
--- a/AUTOTOOLS-TODO
+++ b/AUTOTOOLS-TODO
@@ -13,24 +13,6 @@ IMPROVEMENTS:
- Probably client test should be built only when unit tests or integration tests
are enabled.
-
-- Look at the note at the bottom of configure.ac:
-
- # Avoid hard-coding paths in backends. These names are chosen so
- # that a backend can alternatively use its own top-level configure
- # with PKG_CHECK_MODULES(SYNCEVOLUTION, "syncevolution") to set them.
- # need absolute path, use pwd instead of relative $srcdir
- SYNCEVOLUTION_CFLAGS=-I`cd $srcdir && pwd`/src
- SYNCEVOLUTION_LIBS=`pwd`/src/syncevo/libsyncevolution.la
- AC_SUBST(SYNCEVOLUTION_CFLAGS)
- AC_SUBST(SYNCEVOLUTION_LIBS)
-
- Backends does not have their own top-level configure scripts, so usage of
- absolute path have to be checked. For now this is worked around
- in generated backends.am. Also, for relative path not $(srcdir) should be used
- but $(builddir).
-
-
- Review CLEANFILES, DISTCLEANFILES, MAINTAINERCLEANFILES and MOSTLYCLEANFILES.
That is - check which files should be assigned to which of CLEAN variables.
diff --git a/Makefile.am b/Makefile.am
index 4a9b592b..e4ab8ed5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -309,6 +309,43 @@ toplevel_so_check:
done
endif
+# Check that no executable or shared object depends on symbols in
+# libraries that it does not link against. Unnecessarily linking
+# against libs is okay, that can be caught and fixed by
+# -Wl,--as-needed. Depends on dpkg-shlibdeps, skipped if that is
+# not available.
+all_local_installchecks += toplevel_link_check
+toplevel_link_check:
+ set -x; cd $(DESTDIR) && \
+ mkdir debian && \
+ touch debian/control && \
+ trap "rm -rf debian" EXIT && \
+ files=$$(find $(DESTDIR)/$(prefix) $(DESTDIR)/$(libdir) $(DESTDIR)/$(bindir) $(DESTDIR)/$(libexecdir) -type f -perm /u+x | sort -u) && \
+ files=$$(for i in $$files; do if file $$i | grep ELF >/dev/null; then echo $$i; fi; done) && \
+ if ! dpkg-shlibdeps --version; then \
+ echo "dpkg-shlibdeps not found, skipping link check"; \
+ elif LD_LIBRARY_PATH=usr/lib:usr/lib/syncevolution dpkg-shlibdeps \
+ --ignore-missing-info -O $$files \
+ 2>&1 >/dev/null | \
+ grep -v $(LINK_CHECK_ALLOWED) | \
+ grep -e "symbol .* found in none of the libraries" \
+ -e "contains an unresolvable reference to symbol" \
+ ; then \
+ echo "linking must be fixed"; false; \
+ else \
+ echo "linking is okay"; \
+ fi
+
+# Some exceptions for the link check above (= symbol may be used without linking).
+LINK_CHECK_ALLOWED = -e xxxxxxxx
+# SySync_ConsolePrintf is expected by libsmltk and has to be provided by caller.
+LINK_CHECK_ALLOWED += -e 'SySync_ConsolePrintf.*libsmltk.so'
+if NEON_COMPATIBILITY
+# libneon is intentionally not linked against, to choose between
+# GNUTLS and OpenSSL at runtime.
+LINK_CHECK_ALLOWED += -e 'symbol ne_.*syncdav.so'
+endif
+
# Be strict about running 'syncevolution' only when not doing
# cross-compilation: in that case, if running 'syncevolution' fails,
# abort the build process. Otherwise proceed with the fallback below,
diff --git a/build/gen-backends-am.sh b/build/gen-backends-am.sh
index f4fbb73a..28503169 100755
--- a/build/gen-backends-am.sh
+++ b/build/gen-backends-am.sh
@@ -14,10 +14,10 @@ tf()
echo "$1" >>"$tmpfile"
}
-tf '# This is a stupid workaround for an absolute path in SYNCEVOLUTION_LIBS.'
-tf '# See AUTOTOOLS-TODO for details.'
-tf '@SYNCEVOLUTION_LIBS@: src/syncevo/libsyncevolution.la ; @true'
-tf ''
+# tf '# This is a stupid workaround for an absolute path in SYNCEVOLUTION_LIBS.'
+# tf '# See AUTOTOOLS-TODO for details.'
+# tf '@SYNCEVOLUTION_LIBS@: src/syncevo/libsyncevolution.la ; @true'
+# tf ''
tf "BACKENDS = $BACKENDS"
tf ''
tf "BACKEND_REGISTRIES = $BACKEND_REGISTRIES"
diff --git a/configure.ac b/configure.ac
index 159545ea..ba26bfac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -711,7 +711,7 @@ elif test "$SYNTHESISSRC" != "none" && test -d $srcdir/src/synthesis; then
elif test "$enable_shared" = "no"; then
# link against engine
PKG_CHECK_MODULES([SYNTHESIS], [synthesis >= 3.4])
- SYNTHESIS_ENGINE="$SYNTHESIS_LIBS -lsynthesis"
+ SYNTHESIS_ENGINE="$SYNTHESIS_LIBS -lsynthesis -lsmltk"
else
# link against SDK alone, except in client-test
#PKG_CHECK_MODULES(SYNTHESIS, "synthesis-sdk")
@@ -732,7 +732,7 @@ if test $SYNTHESIS_SRC != "no-synthesis-source"; then
# to trigger building the synthesis library
SYNTHESIS_SUBDIR=$PWD/src/build-synthesis
SYNTHESIS_CFLAGS="-I$SYNTHESIS_SUBDIR/src"
- SYNTHESIS_LIBS="$SYNTHESIS_SUBDIR/src/libsynthesissdk.la"
+ SYNTHESIS_LIBS="$SYNTHESIS_SUBDIR/src/libsynthesissdk.la $SYNTHESIS_SUBDIR/src/libsmltk.la"
if test "x$enable_core" = "xno" && test "x$enable_gui" != "xno"; then
# SYNTHESIS_SUBDIR is ignored, at least build headers for GUI
@@ -741,14 +741,14 @@ if test $SYNTHESIS_SRC != "no-synthesis-source"; then
if test "$enable_shared" = "no"; then
# link against the engines that were enabled
- case $SYNCML_ENGINES in both|client|server) SYNTHESIS_LIBS="$SYNTHESIS_LIBS $SYNTHESIS_SUBDIR/src/libsynthesis.la";; esac
+ case $SYNCML_ENGINES in both|client|server) SYNTHESIS_LIBS="$SYNTHESIS_LIBS $SYNTHESIS_SUBDIR/src/libsynthesis.la $SYNTHESIS_SUBDIR/src/libsmltk.la";; esac
AC_DEFINE(ENABLE_SYNCML_LINKED, 1, [SyncML engines are linked directly])
else
# It would be nice if we could avoid linking against libsynthesis.la here.
# This doesn't work at the moment because sysync::SySyncDebugPuts()
# is called directly by the libsynthesissdk instead of going through
# the normal C function pointer lookup.
- SYNTHESIS_LIBS="$SYNTHESIS_LIBS $SYNTHESIS_SUBDIR/src/libsynthesis.la"
+ SYNTHESIS_LIBS="$SYNTHESIS_LIBS $SYNTHESIS_SUBDIR/src/libsynthesis.la $SYNTHESIS_SUBDIR/src/libsmltk.la"
fi
SYNTHESIS_DEP=$SYNTHESIS_LIBS
@@ -996,8 +996,11 @@ fi
# that a backend can alternatively use its own top-level configure
# with PKG_CHECK_MODULES(SYNCEVOLUTION, "syncevolution") to set them.
# need absolute path, use pwd instead of relative $srcdir
+#
+# When adding something here, remember to also update syncevolution.pc.in.
+# -lrt is for clock_gettime() in the Timespec.h inline functions.
SYNCEVOLUTION_CFLAGS=-I`cd $srcdir && pwd`/src
-SYNCEVOLUTION_LIBS=`pwd`/src/syncevo/libsyncevolution.la
+SYNCEVOLUTION_LIBS="src/syncevo/libsyncevolution.la -lrt"
AC_SUBST(SYNCEVOLUTION_CFLAGS)
AC_SUBST(SYNCEVOLUTION_LIBS)
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 00534cd9..ea197269 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,2 +1,3 @@
src/gtk-ui/ui.xml
src/gtk-ui/gtkinfobar.c
+src/synthesis/src/pcre/pcre_compile.c
diff --git a/src/backends/activesync/activesync.am b/src/backends/activesync/activesync.am
index b01db3aa..a554bebc 100644
--- a/src/backends/activesync/activesync.am
+++ b/src/backends/activesync/activesync.am
@@ -18,10 +18,10 @@ src_backends_activesync_src = \
src/backends/activesync/ActiveSyncCalendarSource.cpp
src_backends_activesync_syncactivesync_la_SOURCES = $(src_backends_activesync_src)
-src_backends_activesync_syncactivesync_la_LIBADD = $(EASCLIENT_LIBS) $(SYNCEVOLUTION_LIBS) $(LIBICAL_LIBS)
+src_backends_activesync_syncactivesync_la_LIBADD = $(EASCLIENT_LIBS) $(SYNCEVOLUTION_LIBS) $(LIBICAL_LIBS) $(GLIB_LIBS) $(GOBJECT_LIBS)
src_backends_activesync_syncactivesync_la_LDFLAGS = -no-undefined -module -avoid-version
src_backends_activesync_syncactivesync_la_CPPFLAGS = $(SYNCEVOLUTION_CFLAGS) -I$(top_srcdir)/test $(BACKEND_CPPFLAGS)
-src_backends_activesync_syncactivesync_la_CXXFLAGS = $(EASCLIENT_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS) $(LIBICAL_CFLAGS)
+src_backends_activesync_syncactivesync_la_CXXFLAGS = $(EASCLIENT_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS) $(LIBICAL_CFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS)
src_backends_activesync_syncactivesync_la_DEPENDENCIES = $(SYNCEVOLUTION_LIBS) $(EASCLIENT_DEPENDENCIES)
# activated by EASCLIENT_DEPENDENCIES: usually empty, unless --with-activesyncd-src is used
diff --git a/src/backends/evolution/evolution.am b/src/backends/evolution/evolution.am
index d5b7ddb8..fb2d6b13 100644
--- a/src/backends/evolution/evolution.am
+++ b/src/backends/evolution/evolution.am
@@ -36,7 +36,7 @@ src_backends_evolution_cppflags = \
-I$(top_srcdir)/src/backends/evolution
src_backends_evolution_syncecal_la_SOURCES = $(src_backends_evolution_syncecal_src)
-src_backends_evolution_syncecal_la_LIBADD = $(ECAL_LIBS) $(SYNCEVOLUTION_LIBS)
+src_backends_evolution_syncecal_la_LIBADD = $(ECAL_LIBS) $(SYNCEVOLUTION_LIBS) $(GLIB_LIBS) $(GOBJECT_LIBS)
# _GNU_SOURCE and -ldl for libical.c + dlsym():
src_backends_evolution_syncecal_la_CPPFLAGS = -D_GNU_SOURCE \
-De_cal_check_timezones=syncevolution_check_timezones \
@@ -45,12 +45,12 @@ src_backends_evolution_syncecal_la_CPPFLAGS = -D_GNU_SOURCE \
-De_cal_match_tzid=syncevolution_match_tzid \
$(src_backends_evolution_cppflags)
src_backends_evolution_syncecal_la_LDFLAGS = -module -avoid-version -ldl
-src_backends_evolution_syncecal_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS)
+src_backends_evolution_syncecal_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS)
src_backends_evolution_syncecal_la_DEPENDENCIES = $(SYNCEVOLUTION_LIBS)
src_backends_evolution_syncebook_la_SOURCES = $(src_backends_evolution_syncebook_src)
-src_backends_evolution_syncebook_la_LIBADD = $(EBOOK_LIBS) $(SYNCEVOLUTION_LIBS)
+src_backends_evolution_syncebook_la_LIBADD = $(EBOOK_LIBS) $(SYNCEVOLUTION_LIBS) $(GLIB_LIBS) $(GOBJECT_LIBS)
src_backends_evolution_syncebook_la_LDFLAGS = -module -avoid-version
-src_backends_evolution_syncebook_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS)
+src_backends_evolution_syncebook_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(SYNCEVO_WFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS)
src_backends_evolution_syncebook_la_CPPFLAGS = $(src_backends_evolution_cppflags)
src_backends_evolution_syncebook_la_DEPENDENCIES = $(SYNCEVOLUTION_LIBS)
diff --git a/src/backends/webdav/webdav.am b/src/backends/webdav/webdav.am
index 860dcc6e..2cf392e9 100644
--- a/src/backends/webdav/webdav.am
+++ b/src/backends/webdav/webdav.am
@@ -33,9 +33,9 @@ src_backends_webdav_src = \
src/backends/webdav/NeonCXX.cpp
src_backends_webdav_syncdav_la_SOURCES = $(src_backends_webdav_src)
-src_backends_webdav_syncdav_la_LIBADD = $(NEON_LIBS) $(SYNCEVOLUTION_LIBS)
+src_backends_webdav_syncdav_la_LIBADD = $(NEON_LIBS) $(SYNCEVOLUTION_LIBS) $(LIBICAL_LIBS)
src_backends_webdav_syncdav_la_LDFLAGS = -module -avoid-version
-src_backends_webdav_syncdav_la_CXXFLAGS = $(NEON_CFLAGS) $(SYNCEVO_WFLAGS)
+src_backends_webdav_syncdav_la_CXXFLAGS = $(NEON_CFLAGS) $(SYNCEVO_WFLAGS) $(LIBICAL_CFLAGS)
src_backends_webdav_syncdav_la_CPPFLAGS = $(SYNCEVOLUTION_CFLAGS) -I$(top_srcdir)/test $(BACKEND_CPPFLAGS)
src_backends_webdav_syncdav_la_DEPENDENCIES = $(SYNCEVOLUTION_LIBS)
diff --git a/src/gnome-bluetooth/gnome-bluetooth.am b/src/gnome-bluetooth/gnome-bluetooth.am
index a6084302..a58f35bc 100644
--- a/src/gnome-bluetooth/gnome-bluetooth.am
+++ b/src/gnome-bluetooth/gnome-bluetooth.am
@@ -4,7 +4,8 @@ src_gnome_bluetooth_LTLIBRARIES = src/gnome-bluetooth/libgbtsyncevolution.la
src_gnome_bluetooth_libgbtsyncevolution_la_SOURCES = src/gnome-bluetooth/syncevolution.c
src_gnome_bluetooth_libgbtsyncevolution_la_LDFLAGS = -module -avoid-version
+src_gnome_bluetooth_libgbtsyncevolution_la_LIBADD = $(GUI_LIBS) $(DBUS_GLIB_LIBS)
src_gnome_bluetooth_libgbtsyncevolution_la_CPPFLAGS = \
$(GNOMEBLUETOOTH_CFLAGS) \
-DLOCALEDIR=\"$(SYNCEVOLUTION_LOCALEDIR)\"
-src_gnome_bluetooth_libgbtsyncevolution_la_CFLAGS = $(SYNCEVO_WFLAGS)
+src_gnome_bluetooth_libgbtsyncevolution_la_CFLAGS = $(SYNCEVO_WFLAGS) $(GUI_CFLAGS) $(DBUS_GLIB_CFLAGS)
diff --git a/src/src.am b/src/src.am
index 3df9f2f9..cc8692b1 100644
--- a/src/src.am
+++ b/src/src.am
@@ -121,14 +121,22 @@ src_syncevolution_CXXFLAGS = $(PCRECPP_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(CORE_
src_syncevolution_CPPFLAGS = $(src_cppflags) -I$(gdbus_dir)
# include Synthesis in distribution: package only files in git if using a git checkout
+#
+# Need to run autogen.sh in $(distdir)-synthesis and not the final
+# $(distdir)/src/synthesis because recent autotools do not copy
+# files like config.sub when invoked in $(distdir)/src/synthesis
+# (automake 1.11.5, autoconf 2.69), probably because they are
+# found in a parent directory. However, these files are needed
+# later on during the recursive libsynthesis configure+make.
all_dist_hooks += src_dist_hook
src_dist_hook:
@set -x; [ ! '$(SYNTHESIS_SUBDIR)' ] || \
- mkdir -p $(distdir)/src/synthesis && \
+ rm -rf $(distdir)-synthesis && \
+ mkdir -p $(distdir)-synthesis && \
if test -d '$(SYNTHESIS_SRC)/.git'; \
then \
- ( ( cd '$(SYNTHESIS_SRC)' && git archive HEAD ) | ( cd '$(distdir)/src/synthesis' && tar xf - && $$SHELL autogen.sh && rm -rf autom4te.cache && find . -name .gitignore -delete ) ) && \
- ( printf '%s' 'Creating ChangeLog...' && \
+ ( ( cd '$(SYNTHESIS_SRC)' && git archive HEAD ) | ( cd '$(distdir)-synthesis' && tar xf - && $$SHELL autogen.sh && rm -rf autom4te.cache && find . -name .gitignore -delete ) ) && \
+ ( printf 'Creating synthesis ChangeLog... ' && \
( ( cd '$(SYNTHESIS_SRC)' && \
echo '# Generated by configure. Do not edit.' && \
githash=`git show-ref --head --hash | head -1` && \
@@ -136,18 +144,19 @@ src_dist_hook:
echo "# git tag `git describe --tags $$githash`" && \
echo && \
'$(top_srcdir)/missing' --run perl '$(top_srcdir)/build/gen-changelog.pl' ) >ChangeLog.tmp ) && \
- ( mv -f ChangeLog.tmp '$(distdir)/src/synthesis/ChangeLog' && \
- printf '%s\n' ' done.' ) || \
+ ( mv -f ChangeLog.tmp '$(distdir)-synthesis/ChangeLog' && \
+ printf 'synthesis ChangeLog done\n' ) || \
( rm -f ChangeLog.tmp ; \
- printf '%s\n' ' failed.'; \
- echo 'Failed to generate ChangeLog.' >&2 ) \
+ printf 'synthesis ChangeLog failed\n'; \
+ echo 'Failed to generate synthesis ChangeLog.' >&2 ) \
); \
elif test '$(SYNTHESIS_SRC)' != 'no-synthesis-source'; \
then \
- cp -a '$(SYNTHESIS_SRC)/'* '$(distdir)/src/synthesis' && \
+ cp -a '$(SYNTHESIS_SRC)/'* '$(distdir)-synthesis' && \
for i in _build autom4te.cache; do [ ! -d "$(SYNTHESIS_SRC)/$$i" ] || chmod -R u+rwx "$(SYNTHESIS_SRC)/$$i"; done && \
- find '$(distdir)/src/synthesis' -name '.libs' -o -name '*~' -o -name '.*' -o -name '*.o' -o -name '*.lo' -o -name 'CVS' -o -name '.svn' -o -name '.git' -o -name .gitignore -o -name 'autom4te.cache' -print0 | xargs -0 rm -rf; \
- fi
+ find '$(distdir)-synthesis' -name '.libs' -o -name '*~' -o -name '.*' -o -name '*.o' -o -name '*.lo' -o -name 'CVS' -o -name '.svn' -o -name '.git' -o -name .gitignore -o -name 'autom4te.cache' -print0 | xargs -0 rm -rf; \
+ fi && \
+ mv '$(distdir)-synthesis' '$(distdir)/src/synthesis'
clean-local: testclean
rm -rf src/testcases
diff --git a/src/syncevo/syncevo.am b/src/syncevo/syncevo.am
index 7024f10b..292f86e8 100644
--- a/src/syncevo/syncevo.am
+++ b/src/syncevo/syncevo.am
@@ -4,7 +4,7 @@ include $(top_srcdir)/src/syncevo/configs/configs.am
# the Funambol C++ client library
src_syncevo_cxxflags = @SYNCEVOLUTION_CXXFLAGS@
src_syncevo_cppflags = @BACKEND_CPPFLAGS@ @GLIB_CFLAGS@ -I$(top_srcdir)/test -I$(gdbus_dir) $(DBUS_CFLAGS) -I$(top_builddir)/src/syncevo -I$(top_srcdir)/src -DSYNCEVO_LIBEXEC=\"$(libexecdir)\" -DSYNCEVO_BACKEND=\"$(BACKENDS_SEARCH_DIRECTORY)\"
-src_syncevo_ldadd = @SYNCEVOLUTION_LDADD@
+src_syncevo_ldadd = @SYNCEVOLUTION_LDADD@
# needed in all cases
src_syncevo_ldadd += $(gdbus_build_dir)/libgdbussyncevo.la
@@ -198,7 +198,11 @@ src_syncevo_libsyncevolution_la_LIBADD = \
$(TRANSPORT_LIBS) \
@LIBS@ \
$(src_syncevo_ldadd) \
+ $(DBUS_LIBS) \
$(NSS_LIBS)
+if ENABLE_MODULES
+src_syncevo_libsyncevolution_la_LIBADD += -ldl
+endif
src_syncevo_libsyncevolution_la_CXXFLAGS = \
$(PCRECPP_CFLAGS) \
$(TRANSPORT_CFLAGS) \
@@ -210,6 +214,7 @@ src_syncevo_libsyncevolution_la_CFLAGS = \
$(SYNCEVO_WFLAGS)
src_syncevo_libsyncevolution_la_CPPFLAGS = \
$(src_syncevo_cppflags) \
+ $(DBUS_CFLAGS) \
-DDATA_DIR=\""$(pkgdatadir)"\" \
-DXML_CONFIG_DIR=\""$(datadir)/syncevolution/xml"\" \
-DTEMPLATE_DIR=\""$(datadir)/syncevolution/templates"\" \
diff --git a/src/syncevo/syncevolution.pc.in b/src/syncevo/syncevolution.pc.in
index 4696b9d4..87258298 100644
--- a/src/syncevo/syncevolution.pc.in
+++ b/src/syncevo/syncevolution.pc.in
@@ -11,5 +11,5 @@ Description: SyncEvolution Library
Version: @VERSION@
Cflags: -I${includedir}
Requires: synthesis
-Libs: -L${libdir} -lsyncevolution
+Libs: -L${libdir} -lsyncevolution -lrt
Libs.private: -L${libdir}/syncevolution -lgdbussyncevo