[syslog-ng] Newer libtool and autoconf versions?

Balazs Scheidler bazsi at balabit.hu
Tue Feb 22 15:11:51 CET 2011


What about this patch, e.g. create a static library, which makes pdbtool
happy and doesn't introduce another shared object.

Peter, Marius what do you think?

commit a3c2ab7e095f7638b3fa0ecf452c8a68025c6a07
Author: Balazs Scheidler <bazsi at balabit.hu>
Date:   Tue Feb 22 15:10:43 2011 +0100

    dbparser: don't create a separate shared library for libsyslog-ng-patterndb
    
    Use a static library instead, linked into both the db-parser() plugin
    and the pdbtool binary.
    
    This solves the linking issues on Cygwin and doesn't publish an internal
    shared library from syslog-ng.
    
    Reported-By: Corinna Vinschen <vinschen at redhat.com>
    Signed-off-by: Balazs Scheidler <bazsi at balabit.hu>

diff --git a/modules/dbparser/Makefile.am b/modules/dbparser/Makefile.am
index c906bcd..84b7f10 100644
--- a/modules/dbparser/Makefile.am
+++ b/modules/dbparser/Makefile.am
@@ -11,13 +11,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib -I../../lib
 AM_CFLAGS = @CFLAGS_NOWARN_POINTER_SIGN@
 export top_srcdir
 
-lib_LTLIBRARIES = libsyslog-ng-patterndb.la
-libsyslog_ng_patterndb_la_SOURCES = radix.c radix.h \
+lib_LIBRARIES = libsyslog-ng-patterndb.a
+libsyslog_ng_patterndb_a_SOURCES = radix.c radix.h \
        patterndb.c patterndb.h patterndb-int.h \
        timerwheel.c timerwheel.h \
        patternize.c patternize.h
-libsyslog_ng_patterndb_la_LDFLAGS = -no-undefined
-libsyslog_ng_patterndb_la_LIBADD =  @OPENSSL_LIBS@ @DEPS_LIBS@
+libsyslog_ng_patterndb_a_CFLAGS = $(AM_CFLAGS) -fPIC
 
 module_LTLIBRARIES = libdbparser.la
 libdbparser_la_SOURCES = \
@@ -25,13 +24,13 @@ libdbparser_la_SOURCES = \
        dbparser-grammar.y dbparser-parser.c dbparser-parser.h dbparser-plugin.c
 
 libdbparser_la_CPPFLAGS = $(AM_CPPFLAGS)
-libdbparser_la_LIBADD = ../../lib/libsyslog-ng.la libsyslog-ng-patterndb.la
+libdbparser_la_LIBADD = ../../lib/libsyslog-ng.la libsyslog-ng-patterndb.a
 libdbparser_la_LDFLAGS = -avoid-version -module -no-undefined
 
 bin_PROGRAMS = pdbtool
 pdbtool_SOURCES = pdbtool.c
 pdbtool_CPPFLAGS = $(AM_CPPFLAGS) @OPENSSL_CFLAGS@
-pdbtool_LDADD = ../../lib/libsyslog-ng.la libsyslog-ng-patterndb.la
+pdbtool_LDADD = ../../lib/libsyslog-ng.la libsyslog-ng-patterndb.a @OPENSSL_LIBS@
 
 BUILT_SOURCES = dbparser-grammar.y dbparser-grammar.c dbparser-grammar.h
 EXTRA_DIST = $(BUILT_SOURCES) radix-find.c dbparser-grammar.ym
diff --git a/modules/dbparser/pdbtool.c b/modules/dbparser/pdbtool.c
index e2368e5..bb6468f 100644
--- a/modules/dbparser/pdbtool.c
+++ b/modules/dbparser/pdbtool.c
@@ -981,7 +981,6 @@ main(int argc, char *argv[])
   msg_init(TRUE);
   plugin_load_module("syslogformat", configuration, NULL);
   plugin_load_module("basicfuncs", configuration, NULL);
-  plugin_load_module("dbparser", configuration, NULL);
 
   if (color_out)
     colors = full_colors;


On Tue, 2011-02-22 at 15:02 +0100, Balazs Scheidler wrote:
> On Mon, 2011-02-21 at 10:55 +0100, Corinna Vinschen wrote:
> > Ping 2?  Did I say anything wrong?
> > 
> > 
> 
> No, not at all. Just the usual stuff. Work, family. I've an idea, let me
> test if that works.
> 

-- 
Bazsi



More information about the syslog-ng mailing list