--enable-shared: find backends in $(libdir)/syncevolution

Somehow /usr/lib/syncevolution wasn't searched by the dynamic loader
in Moblin, despite it being in the RPATH of the binaries. Open
modules also with absolute path to find them.
This commit is contained in:
Patrick Ohly 2009-05-12 23:00:15 +02:00
parent 23f64d7fdf
commit d9dbc31904
2 changed files with 6 additions and 1 deletions

View file

@ -170,6 +170,11 @@ public:
// itself. We keep that pointer, so never close the
// module!
dlhandle = dlopen(modules[i], RTLD_NOW|RTLD_GLOBAL);
if (!dlhandle) {
string fullpath = LIBDIR "/syncevolution/";
fullpath += modules[1];
dlhandle = dlopen(fullpath.c_str(), RTLD_NOW|RTLD_GLOBAL);
}
// remember which modules were found and which were not
state = dlhandle ? &m_available : &m_missing;
state->push_back(modules[i]);

View file

@ -86,7 +86,7 @@ CORE_SOURCES = \
libsyncevolution_la_SOURCES = $(CORE_SOURCES)
libsyncevolution_la_LIBADD = @EPACKAGE_LIBS@ @GLIB_LIBS@ $(TRANSPORT_LIBS) @LIBS@ $(SYNTHESIS_LIBS) $(SYNCEVOLUTION_LDADD)
libsyncevolution_la_CXXFLAGS = $(TRANSPORT_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(SYNTHESIS_CFLAGS)
libsyncevolution_la_CPPFLAGS = $(AM_CPPFLAGS) -DTEMPLATE_DIR=\""$(sysconfdir)/default/syncevolution"\"
libsyncevolution_la_CPPFLAGS = $(AM_CPPFLAGS) -DTEMPLATE_DIR=\""$(sysconfdir)/default/syncevolution"\" -DLIBDIR=\""$(libdir)"\"
SyncEvolutionXML.c: $(srcdir)/../syncevolution.xml
echo "const char *SyncEvolutionXML =" > $@