[evolution-data-server] Build libedbus-private.la as a shared library



commit a2790163af4d3f375a778055d0e2699207dfd050
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 1 07:39:07 2014 +0200

    Build libedbus-private.la as a shared library
    
    This fixes an issue under Win32, where symbols from library are
    linked multiple times into the final executable (like into
    evolution-source-registry), which causes a runtime error about
    registering EDBusObject type multiple times on start.

 configure.ac        |   10 ++++++++++
 private/Makefile.am |    3 ++-
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 93fa65a..4cd6009 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1629,6 +1629,16 @@ AC_SUBST(privincludedir)
 privlibdir='${libdir}'/evolution-data-server
 AC_SUBST(privlibdir)
 
+if test "$os_win32" = yes; then
+       dnl On Win32 there is no "rpath" mechanism. We install the private
+       dnl shared libraries in $libdir, meaning the DLLs will actually be in
+       dnl $bindir. This means just having $bindir in PATH will be enough.
+       privsolibdir=$libdir
+else
+       privsolibdir=$privlibdir
+fi
+AC_SUBST(privsolibdir)
+
 imagesdir='${datadir}'/pixmaps/evolution-data-server
 AC_SUBST(imagesdir)
 
diff --git a/private/Makefile.am b/private/Makefile.am
index 0ff1d13..a96d525 100644
--- a/private/Makefile.am
+++ b/private/Makefile.am
@@ -200,7 +200,7 @@ BUILT_SOURCES = \
        $(GENERATED_DBUS_SUBPROCESS_BACKEND) \
        $(NULL)
 
-noinst_LTLIBRARIES = libedbus-private.la
+privsolib_LTLIBRARIES = libedbus-private.la
 
 # We omit AM_CPPFLAGS -- which is mostly warning flags -- since
 # we have no control over the C code generated by gdbus-codegen.
@@ -225,6 +225,7 @@ libedbus_private_la_LIBADD = \
        $(NULL)
 
 libedbus_private_la_LDFLAGS = \
+       -avoid-version \
        $(NO_UNDEFINED) \
        $(CODE_COVERAGE_LDFLAGS) \
        $(NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]