diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2012-07-12 15:59:33 +0000 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2012-07-12 16:11:33 +0000 |
commit | 15f2d0318405d7646350ea0404ddc375a18b4e70 (patch) | |
tree | 8110a9ff42f53aa7604cdf2d88ba4044418a314a /configure.ac | |
parent | aa2bb63cec3c06c2875d36731383168dbf5d1361 (diff) |
autotools: ensure that link lines are complete
As mentioned by Tino Keitel on the mailing list, some libs and
executables were only implicitly linked against libraries that they
called directly. This happened to work by chance because these libraries
ended up in the running executable anyway, due to indirect loading.
To catch such problems, the "make installcheck" was extended:
dpkg-shlibdeps is run, if available, and the error output is scanned
for the messages which indicate that a symbol is used without linking
to the right library (example output below).
Had to fix quite a few _LIBADD lines to pass the test.
Some exceptions are allowed:
- libsmltk depends on the caller providing SySync logging support.
- libneon is intentionally not linked explicitly for syncevolution.org
binaries, to make resulting binaries work with GNUTLS and OpenSSL.
dpkg-shlibdeps: warning: debian/syncevolution-libs/usr/lib/syncevolution/backends/syncdav.so contains an unresolvable reference to symbol icalparameter_new_from_value_string: it's probably a plugin.
dpkg-shlibdeps: warning: 51 other similar warnings have been skipped (use -v to see them all).
...
dpkg-shlibdeps: warning: symbol dlsym used by debian/libsyncevolution0/usr/lib/libsyncevolution.so.0.0.0 found in none of the libraries.
dpkg-shlibdeps: warning: symbol dlerror used by debian/libsyncevolution0/usr/lib/libsyncevolution.so.0.0.0 found in none of the libraries.
dpkg-shlibdeps: warning: symbol dlopen used by debian/libsyncevolution0/usr/lib/libsyncevolution.so.0.0.0 found in none of the libraries.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 8 insertions, 5 deletions
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) |