[syslog-ng] [Bug 104] Add libtool option -module
Corinna Vinschen
vinschen at redhat.com
Tue Jan 11 16:05:00 CET 2011
On Jan 11 11:34, bugzilla at wwwold.balabit.com wrote:
> https://bugzilla.balabit.com/show_bug.cgi?id=104
>
>
>
>
>
> --- Comment #2 from Balazs Scheidler <bazsi at balabit.hu> 2011-01-11 11:34:49 ---
> I'd give a shot an integrating this, hopefully it won't break on AIX.
>
> Could you please send a signed patch as described on a post in the mailing list?
signed-off by Corinna Vinschen <vinschen at redhat.com>
diff --git a/configure.in b/configure.in
index f0f2b64..0e534f8 100644
--- a/configure.in
+++ b/configure.in
@@ -156,7 +156,7 @@ AC_PROG_YACC
AM_PROG_LEX
AC_PROG_MAKE_SET
PKG_PROG_PKG_CONFIG
-LT_INIT([disable-static])
+LT_INIT([dlopen disable-static])
dnl ***************************************************************************
dnl Validate yacc
diff --git a/lib/Makefile.am b/lib/Makefile.am
index c399e43..850e3c7 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -4,6 +4,7 @@ export top_srcdir
lib_LTLIBRARIES = libsyslog-ng.la
libsyslog_ng_la_LIBADD = @CORE_DEPS_LIBS@
+libsyslog_ng_la_LDFLAGS = -no-undefined
libsyslog_ng_la_SOURCES = \
misc.c misc.h utils.c utils.h messages.c messages.h syslog-names.c syslog-names.h \
diff --git a/modules/affile/Makefile.am b/modules/affile/Makefile.am
index 9917ebf..0a0f705 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 -no-undefined
include $(top_srcdir)/build/lex-rules.am
diff --git a/modules/afprog/Makefile.am b/modules/afprog/Makefile.am
index 0343943..8dba831 100644
--- a/modules/afprog/Makefile.am
+++ b/modules/afprog/Makefile.am
@@ -12,6 +12,6 @@ EXTRA_DIST = $(BUILT_SOURCES) afprog-grammar.ym
libafprog_la_CPPFLAGS = $(AM_CPPFLAGS)
libafprog_la_LIBADD = ../../lib/libsyslog-ng.la
-libafprog_la_LDFLAGS = -avoid-version
+libafprog_la_LDFLAGS = -avoid-version -module -no-undefined
include $(top_srcdir)/build/lex-rules.am
diff --git a/modules/afsocket/Makefile.am b/modules/afsocket/Makefile.am
index cdff078..40d9dd8 100644
--- a/modules/afsocket/Makefile.am
+++ b/modules/afsocket/Makefile.am
@@ -10,7 +10,7 @@ libafsocket_notls_la_SOURCES = \
afsocket-grammar.y afsocket-parser.c afsocket-parser.h afsocket-plugin.c
libafsocket_notls_la_CPPFLAGS = $(AM_CPPFLAGS)
libafsocket_notls_la_LIBADD = ../../lib/libsyslog-ng.la $(LIBNET_LIBS) $(LIBWRAP_LIBS)
-libafsocket_notls_la_LDFLAGS = -avoid-version
+libafsocket_notls_la_LDFLAGS = -avoid-version -module -no-undefined
if ENABLE_SSL
module_LTLIBRARIES += libafsocket-tls.la
@@ -20,7 +20,7 @@ libafsocket_tls_la_SOURCES = \
afsocket-grammar.y afsocket-parser.c afsocket-parser.h afsocket-plugin.c
libafsocket_tls_la_CPPFLAGS = $(AM_CPPFLAGS) -DENABLE_SSL=1
libafsocket_tls_la_LIBADD = ../../lib/libsyslog-ng.la $(OPENSSL_LIBS) $(ZLIB_LIBS) $(LIBNET_LIBS) $(LIBWRAP_LIBS)
-libafsocket_tls_la_LDFLAGS = -avoid-version
+libafsocket_tls_la_LDFLAGS = -avoid-version -module -no-undefined
endif
BUILT_SOURCES = afsocket-grammar.y afsocket-grammar.c afsocket-grammar.h
diff --git a/modules/afsql/Makefile.am b/modules/afsql/Makefile.am
index 172738e..5c66288 100644
--- a/modules/afsql/Makefile.am
+++ b/modules/afsql/Makefile.am
@@ -11,7 +11,7 @@ libafsql_la_SOURCES = \
libafsql_la_CPPFLAGS = $(AM_CPPFLAGS) -DENABLE_SQL=1
libafsql_la_LIBADD = ../../lib/libsyslog-ng.la $(LIBDBI_LIBS)
-libafsql_la_LDFLAGS = -avoid-version
+libafsql_la_LDFLAGS = -avoid-version -module -no-undefined
endif
diff --git a/modules/afstreams/Makefile.am b/modules/afstreams/Makefile.am
index d9708ea..e05d1e2 100644
--- a/modules/afstreams/Makefile.am
+++ b/modules/afstreams/Makefile.am
@@ -11,7 +11,7 @@ libafstreams_la_SOURCES = \
libafstreams_la_CPPFLAGS = $(AM_CPPFLAGS) -DENABLE_SUN_STREAMS=1
libafstreams_la_LIBADD = ../../lib/libsyslog-ng.la
-libafstreams_la_LDFLAGS = -avoid-version
+libafstreams_la_LDFLAGS = -avoid-version -module -no-undefined
endif
diff --git a/modules/afuser/Makefile.am b/modules/afuser/Makefile.am
index 4252e75..f20663c 100644
--- a/modules/afuser/Makefile.am
+++ b/modules/afuser/Makefile.am
@@ -9,7 +9,7 @@ libafuser_la_SOURCES = \
libafuser_la_CPPFLAGS = $(AM_CPPFLAGS)
libafuser_la_LIBADD = ../../lib/libsyslog-ng.la
-libafuser_la_LDFLAGS = -avoid-version
+libafuser_la_LDFLAGS = -avoid-version -module -no-undefined
BUILT_SOURCES = afuser-grammar.y afuser-grammar.c afuser-grammar.h
diff --git a/modules/basicfuncs/Makefile.am b/modules/basicfuncs/Makefile.am
index 934efda..b1b666b 100644
--- a/modules/basicfuncs/Makefile.am
+++ b/modules/basicfuncs/Makefile.am
@@ -6,4 +6,4 @@ module_LTLIBRARIES := libbasicfuncs.la
libbasicfuncs_la_SOURCES = basic-funcs.c
libbasicfuncs_la_CPPFLAGS = $(AM_CPPFLAGS)
libbasicfuncs_la_LIBADD = ../../lib/libsyslog-ng.la
-libbasicfuncs_la_LDFLAGS = -avoid-version
+libbasicfuncs_la_LDFLAGS = -avoid-version -module -no-undefined
diff --git a/modules/confgen/Makefile.am b/modules/confgen/Makefile.am
index 919ae09..7ab0c2e 100644
--- a/modules/confgen/Makefile.am
+++ b/modules/confgen/Makefile.am
@@ -7,7 +7,7 @@ libconfgen_la_SOURCES = \
confgen.h confgen-plugin.c
libconfgen_la_CPPFLAGS = $(AM_CPPFLAGS)
libconfgen_la_LIBADD = ../../lib/libsyslog-ng.la
-libconfgen_la_LDFLAGS = -avoid-version
+libconfgen_la_LDFLAGS = -avoid-version -module -no-undefined
include $(top_srcdir)/build/lex-rules.am
diff --git a/modules/convertfuncs/Makefile.am b/modules/convertfuncs/Makefile.am
index a19a1dc..b52aecc 100644
--- a/modules/convertfuncs/Makefile.am
+++ b/modules/convertfuncs/Makefile.am
@@ -6,4 +6,4 @@ module_LTLIBRARIES := libconvertfuncs.la
libconvertfuncs_la_SOURCES = convert-funcs.c
libconvertfuncs_la_CPPFLAGS = $(AM_CPPFLAGS)
libconvertfuncs_la_LIBADD = ../../lib/libsyslog-ng.la
-libconvertfuncs_la_LDFLAGS = -avoid-version
+libconvertfuncs_la_LDFLAGS = -avoid-version -module -no-undefined
diff --git a/modules/csvparser/Makefile.am b/modules/csvparser/Makefile.am
index 9e40e13..ce68b17 100644
--- a/modules/csvparser/Makefile.am
+++ b/modules/csvparser/Makefile.am
@@ -9,7 +9,7 @@ libcsvparser_la_SOURCES = \
libcsvparser_la_CPPFLAGS = $(AM_CPPFLAGS)
libcsvparser_la_LIBADD = ../../lib/libsyslog-ng.la
-libcsvparser_la_LDFLAGS = -avoid-version
+libcsvparser_la_LDFLAGS = -avoid-version -module -no-undefined
BUILT_SOURCES = csvparser-grammar.y csvparser-grammar.c csvparser-grammar.h
EXTRA_DIST = $(BUILT_SOURCES) csvparser-grammar.ym
diff --git a/modules/dbparser/Makefile.am b/modules/dbparser/Makefile.am
index e8d5da9..b6be631 100644
--- a/modules/dbparser/Makefile.am
+++ b/modules/dbparser/Makefile.am
@@ -21,12 +21,12 @@ libdbparser_la_SOURCES = \
libdbparser_la_CPPFLAGS = $(AM_CPPFLAGS)
libdbparser_la_LIBADD = ../../lib/libsyslog-ng.la
-libdbparser_la_LDFLAGS = -avoid-version
+libdbparser_la_LDFLAGS = -avoid-version -module -no-undefined
bin_PROGRAMS = pdbtool
pdbtool_SOURCES = pdbtool.c patternize.c patternize.h
pdbtool_CPPFLAGS = $(AM_CPPFLAGS) @OPENSSL_CFLAGS@
-pdbtool_LDADD = ../../lib/libsyslog-ng.la libdbparser.la @OPENSSL_LIBS@ @DEPS_LIBS@
+pdbtool_LDADD = ../../lib/libsyslog-ng.la -dlpreopen libdbparser.la @OPENSSL_LIBS@ @DEPS_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/dummy/Makefile.am b/modules/dummy/Makefile.am
index 3120e41..ec2f7b0 100644
--- a/modules/dummy/Makefile.am
+++ b/modules/dummy/Makefile.am
@@ -6,7 +6,7 @@ export top_srcdir
libdummy_la_SOURCES = dummy-grammar.y dummy.c dummy.h dummy-parser.c dummy-parser.h
libdummy_la_LIBADD = ../../lib/libsyslog-ng.la
-libdummy_la_LDFLAGS = -avoid-version
+libdummy_la_LDFLAGS = -avoid-version -module -no-undefined
BUILT_SOURCES = dummy-grammar.y dummy-grammar.c dummy-grammar.h
EXTRA_DIST = $(BUILT_SOURCES) dummy-grammar.ym
diff --git a/modules/pacctformat/Makefile.am b/modules/pacctformat/Makefile.am
index 4b3003e..aa231e1 100644
--- a/modules/pacctformat/Makefile.am
+++ b/modules/pacctformat/Makefile.am
@@ -10,7 +10,7 @@ libpacctformat_la_SOURCES = \
libpacctformat_la_CPPFLAGS = $(AM_CPPFLAGS)
libpacctformat_la_LIBADD = ../../lib/libsyslog-ng.la
-libpacctformat_la_LDFLAGS = -avoid-version
+libpacctformat_la_LDFLAGS = -avoid-version -module -no-undefined
endif
diff --git a/modules/syslogformat/Makefile.am b/modules/syslogformat/Makefile.am
index 9a740b8..38ad826 100644
--- a/modules/syslogformat/Makefile.am
+++ b/modules/syslogformat/Makefile.am
@@ -8,7 +8,7 @@ libsyslogformat_la_SOURCES = \
libsyslogformat_la_CPPFLAGS = $(AM_CPPFLAGS)
libsyslogformat_la_LIBADD = ../../lib/libsyslog-ng.la
-libsyslogformat_la_LDFLAGS = -avoid-version
+libsyslogformat_la_LDFLAGS = -avoid-version -module -no-undefined
include $(top_srcdir)/build/lex-rules.am
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
More information about the syslog-ng
mailing list