Here are several more. Comments are in the patches. Mainly deal with
cflags and linking.
Tomas
>From 76437a496475eca0f1d2072958027acaa86adde0 Mon Sep 17 00:00:00 2001
From: Tomas Heinrich <[email protected]>
Date: Sun, 19 May 2013 09:53:30 +0200
Subject: [PATCH 1/3] Don't #include libestr and libee headers when not
necessary
Through msg.h, many unrelated components needlessly required
LIBEE_CFLAGS.
---
plugins/mmaudit/mmaudit.c | 3 +--
plugins/mmjsonparse/mmjsonparse.c | 1 -
runtime/msg.h | 2 --
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/plugins/mmaudit/mmaudit.c b/plugins/mmaudit/mmaudit.c
index 018e177..6b6b804 100644
--- a/plugins/mmaudit/mmaudit.c
+++ b/plugins/mmaudit/mmaudit.c
@@ -43,8 +43,7 @@
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
-#include <libestr.h>
-#include <libee/libee.h>
+#include <json/json.h>
#include "conf.h"
#include "syslogd-types.h"
#include "template.h"
diff --git a/plugins/mmjsonparse/mmjsonparse.c b/plugins/mmjsonparse/mmjsonparse.c
index c47aceb..35f69aa 100644
--- a/plugins/mmjsonparse/mmjsonparse.c
+++ b/plugins/mmjsonparse/mmjsonparse.c
@@ -35,7 +35,6 @@
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
-#include <libestr.h>
#include <json/json.h>
#include "conf.h"
#include "syslogd-types.h"
diff --git a/runtime/msg.h b/runtime/msg.h
index edf5ed9..6faf066 100644
--- a/runtime/msg.h
+++ b/runtime/msg.h
@@ -35,8 +35,6 @@
#include "syslogd-types.h"
#include "template.h"
#include "atomic.h"
-#include "libee/libee.h"
-
/* rgerhards 2004-11-08: The following structure represents a
* syslog message.
--
1.7.10.4
>From ab49a0ee0f8aa4e98beb2ab8d4a9796a2a2a5423 Mon Sep 17 00:00:00 2001
From: Tomas Heinrich <[email protected]>
Date: Sun, 19 May 2013 11:26:48 +0200
Subject: [PATCH 2/3] Revert "bugfix: problem in build system (especially when
cross-compiling)"
This reverts commit 813c9c7f524976ef598864afbb729bca31557c32.
Removing references to libee.h in the previous commit solves the build
issue so the cflag shoudn't be needed after all.
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 75e88d4..fd9cea8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -822,8 +822,8 @@ if test "x$enable_rsyslogrt" = "xyes"; then
RSRT_LIBS1="\$(top_builddir)/runtime/librsyslog.la"
fi
AM_CONDITIONAL(ENABLE_RSYSLOGRT, test x$enable_rsyslogrt = xyes)
-RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBEE_CFLAGS) \$(LIBESTR_CFLAGS) \$(JSON_C_FLAGS)"
-RSRT_LIBS="\$(RSRT_LIBS1) \$(LIBEE_LIBS) \$(LIBESTR_LIBS) \$(JSON_C_LIBS)"
+RSRT_CFLAGS="\$(RSRT_CFLAGS1) \$(LIBESTR_CFLAGS) \$(JSON_C_FLAGS)"
+RSRT_LIBS="\$(RSRT_LIBS1) \$(LIBESTR_LIBS) \$(JSON_C_LIBS)"
AC_SUBST(RSRT_CFLAGS1)
AC_SUBST(RSRT_LIBS1)
AC_SUBST(RSRT_CFLAGS)
--
1.7.10.4
>From 8acd029c2949b9501baf44de3822ab6324c7fc5b Mon Sep 17 00:00:00 2001
From: Tomas Heinrich <[email protected]>
Date: Sun, 19 May 2013 13:51:53 +0200
Subject: [PATCH 3/3] Remove redundat cflags and links to libraries
This prevents linking with libee, liblognorm and libgcrypt when not
necessary.
---
plugins/mmaudit/Makefile.am | 4 ++--
plugins/mmjsonparse/Makefile.am | 4 ++--
runtime/Makefile.am | 6 +++---
tools/Makefile.am | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/plugins/mmaudit/Makefile.am b/plugins/mmaudit/Makefile.am
index c64d082..77b2e85 100644
--- a/plugins/mmaudit/Makefile.am
+++ b/plugins/mmaudit/Makefile.am
@@ -1,8 +1,8 @@
pkglib_LTLIBRARIES = mmaudit.la
mmaudit_la_SOURCES = mmaudit.c
-mmaudit_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(LIBLOGNORM_CFLAGS) $(LIBEE_CFLAGS)
-mmaudit_la_LDFLAGS = -module -avoid-version $(LIBLOGNORM_LIBS) $(LIBEE_LIBS)
+mmaudit_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
+mmaudit_la_LDFLAGS = -module -avoid-version
mmaudit_la_LIBADD =
EXTRA_DIST =
diff --git a/plugins/mmjsonparse/Makefile.am b/plugins/mmjsonparse/Makefile.am
index 5175fe8..ef39163 100644
--- a/plugins/mmjsonparse/Makefile.am
+++ b/plugins/mmjsonparse/Makefile.am
@@ -1,8 +1,8 @@
pkglib_LTLIBRARIES = mmjsonparse.la
mmjsonparse_la_SOURCES = mmjsonparse.c
-mmjsonparse_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(LIBLOGNORM_CFLAGS) $(LIBEE_CFLAGS)
-mmjsonparse_la_LDFLAGS = -module -avoid-version $(LIBLOGNORM_LIBS) $(LIBEE_LIBS)
+mmjsonparse_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
+mmjsonparse_la_LDFLAGS = -module -avoid-version
mmjsonparse_la_LIBADD =
EXTRA_DIST =
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index fe4afb0..dea06fe 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -97,12 +97,12 @@ librsyslog_la_SOURCES = \
#
if WITH_MODDIRS
-librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(PTHREADS_CFLAGS) $(LIBEE_CFLAGS) $(LIBGCRYPT_CFLAGS) -I\$(top_srcdir)/tools
+librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(PTHREADS_CFLAGS) -I\$(top_srcdir)/tools
else
-librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(PTHREADS_CFLAGS) $(LIBEE_CFLAGS) $(LIBGCRYPT_CFLAGS) -I\$(top_srcdir)/tools -I\$(top_srcdir)/grammar
+librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(PTHREADS_CFLAGS) -I\$(top_srcdir)/tools -I\$(top_srcdir)/grammar
endif
#librsyslog_la_LDFLAGS = -module -avoid-version
-librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS) $(LIBGCRYPT_LIBS) $(LIBEE_LIBS)
+librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS)
#
# regular expression support
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 721992f..6832494 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -42,7 +42,7 @@ rsyslogd_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
# note: it looks like librsyslog.la must be explicitely given on LDDADD,
# otherwise dependencies are not properly calculated (resulting in a
# potentially incomplete build, a problem we had several times...)
-rsyslogd_LDADD = ../grammar/libgrammar.la ../runtime/librsyslog.la $(ZLIB_LIBS) $(PTHREADS_LIBS) $(RSRT_LIBS) $(SOL_LIBS) $(LIBEE_LIBS) $(LIBLOGNORM_LIBS) $(LIBUUID_LIBS) $(LIBGCRYPT_LIBS)
+rsyslogd_LDADD = ../grammar/libgrammar.la ../runtime/librsyslog.la $(ZLIB_LIBS) $(PTHREADS_LIBS) $(RSRT_LIBS) $(SOL_LIBS) $(LIBUUID_LIBS)
rsyslogd_LDFLAGS = -export-dynamic
EXTRA_DIST = $(man_MANS) \
--
1.7.10.4
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.