[syslog-ng] Newer libtool and autoconf versions?

Corinna Vinschen vinschen at redhat.com
Fri Dec 10 17:57:00 CET 2010


On Dec 10 10:30, Corinna Vinschen wrote:
> On Dec  9 21:13, Balazs Scheidler wrote:
> > So for now, I can only promise to migrate to autoconf 2.67, but I'm
> > reluctant to upgrade to libtool 2.4, so the autoreconf stuff will be
> > needed for a little while.
> 
> Ok, thank you.  I can live with that.
> 
> Especially since even with libtool 2.4 there's still a problem.  Due to
> the way shared libs are handled on Windows, ther's a hardcoded mechanism
> in libtool which doesn't work overly well with syslog-ng.  When
> installing the shared libs into $(localstatedir), libtool copies the .a
> (static lib) and .dll.a (link stub for DLL) files into that directory,
> while the actual module DLLs are copied to $(localstatedir)/../bin.  My

Sorry, I messed up here.  Make these directories $(libexecdir)/syslog-ng
and $(libexecdir)/syslog-ng/../bin .

> contrib/cygwin-packaging/cygwin-postinstall script fixes this situation.
> It removes the .a and .dll.a files and moves the DLLs over to
> /usr/lib/syslog-ng.  That works, but I'd be glad to find a solution
> which does the right thing already at `make install' time, not only
> after applying some postinstall magic.  I'll investigate this further.

I just got the hint that the libtool --mode=link option "-module" is
supposed to do exactly this on Cygwin.  I tested it and with this
option the subsequent `make install' actually copies the DLLs into the
$(libexecdir)/syslog-ng directory where they belong.

I checked that the -module option is already known to libtool 2.2.6, so
it seems it would make sense to add this option generically to the
Makefile.am files in the modules subdirectories, along these lines.

--- SNIP ---
diff --git a/modules/affile/Makefile.am b/modules/affile/Makefile.am
index 9917ebf..04dbaae 100644
--- a/modules/affile/Makefile.am
+++ b/modules/affile/Makefile.am
@@ -12,6 +12,6 @@ EXTRA_DIST = $(BUILT_SOURCES) affile-grammar.ym
 
 libaffile_la_CPPFLAGS = $(AM_CPPFLAGS)
 libaffile_la_LIBADD = ../../lib/libsyslog-ng.la
-libaffile_la_LDFLAGS = -avoid-version
+libaffile_la_LDFLAGS = -avoid-version -module
 
 include $(top_srcdir)/build/lex-rules.am
--- SNAP ---

Would that be ok with you?

> Anyway, for the time being, the new cygwin-postinstall script
> (https://bugzilla.balabit.com/show_bug.cgi?id=103) will do the job.

If the aforementioned -module option is a viable approach, I would have
to change the contrib/cygwin-packaging/cygwin-postinstall script again,
so in this case I would upload a new patch to bugzilla issue 103.


Thanks in advance,
Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


More information about the syslog-ng mailing list