summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-15 16:28:44 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-15 16:28:44 +0200
commit4226f0dd4813277819406a4f13b460195d798f1a (patch)
tree820809be2d91fb0bb637c8ff3659c803edac2e25
parent0e83bd69fcce2359d1d25022d1cc1263e42219a9 (diff)
downloadrsyslog-4226f0dd4813277819406a4f13b460195d798f1a.tar.gz
rsyslog-4226f0dd4813277819406a4f13b460195d798f1a.tar.xz
rsyslog-4226f0dd4813277819406a4f13b460195d798f1a.zip
begin building runtime convenience library (does not build!)
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac19
-rw-r--r--plugins/immark/Makefile.am2
-rw-r--r--runtime/Makefile.am13
-rw-r--r--runtime/queue.c (renamed from queue.c)0
-rw-r--r--runtime/queue.h (renamed from queue.h)0
6 files changed, 35 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 0e75710c..28e960e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,8 +48,6 @@ rsyslogd_SOURCES = \
wtp.h \
wti.c \
wti.h \
- queue.c \
- queue.h \
sync.c \
sync.h \
obj.c \
@@ -93,7 +91,7 @@ rsyslogd_SOURCES = \
atomic.h
rsyslogd_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/\" $(pthreads_cflags)
-rsyslogd_LDADD = $(zlib_libs) $(pthreads_libs) $(dl_libs) $(rt_libs)
+rsyslogd_LDADD = $(zlib_libs) $(pthreads_libs) $(dl_libs) $(rt_libs) runtime/librsyslog.la
rsyslogd_LDFLAGS = -export-dynamic
man_MANS += rsyslogd.8 rsyslog.conf.5
@@ -179,7 +177,7 @@ EXTRA_DIST = \
COPYING.LESSER \
$(man_MANS)
-SUBDIRS = . doc
+SUBDIRS = doc runtime .
SUBDIRS += plugins/immark plugins/imuxsock plugins/imtcp plugins/imudp plugins/omtesting
diff --git a/configure.ac b/configure.ac
index 2a5ef16b..9675a9b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -498,6 +498,23 @@ AC_SUBST(snmp_cflags)
AC_SUBST(snmp_libs)
+# support for building the rsyslogd runtime
+AC_ARG_ENABLE(rsyslogrt,
+ [AS_HELP_STRING([--enable-rsyslogrt],[Build rsyslogrt @<:@default=yes@:>@])],
+ [case "${enableval}" in
+ yes) enable_rsyslogrt="yes" ;;
+ no) enable_rsyslogrt="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-rsyslogrt) ;;
+ esac],
+ [enable_rsyslogrt=yes]
+)
+AM_CONDITIONAL(ENABLE_RSYSLOGRT, test x$enable_rsyslogrt = xyes)
+CFLAGS="-I$(top_srcdir)/runtime $CFLAGS$
+rsrt_libs=""
+AC_SUBST(rsrt_cflags)
+AC_SUBST(rsrt_libs)
+
+
# support for NOT building rsyslogd (useful for source-based packaging systems)
AC_ARG_ENABLE(rsyslogd,
[AS_HELP_STRING([--enable-rsyslogd],[Build rsyslogd @<:@default=yes@:>@])],
@@ -615,6 +632,7 @@ AM_CONDITIONAL(ENABLE_IMTEMPLATE, test x$enable_imtemplate = xyes)
AC_CONFIG_FILES([Makefile \
+ runtime/Makefile \
doc/Makefile \
plugins/imudp/Makefile \
plugins/imtcp/Makefile \
@@ -657,5 +675,6 @@ echo "Debug mode enabled: $enable_debug"
echo "Runtime Instrumentation enabled: $enable_rtinst"
echo "openssl enabled: $enable_openssl"
echo "valgrind support settings enabled: $enable_valgrind"
+echo "rsyslogd runtime will be built: $enable_rsyslogrt"
echo "rsyslogd will be built: $enable_rsyslogd"
diff --git a/plugins/immark/Makefile.am b/plugins/immark/Makefile.am
index 3dc0e408..477f45c9 100644
--- a/plugins/immark/Makefile.am
+++ b/plugins/immark/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = immark.la
immark_la_SOURCES = immark.c immark.h
-immark_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags)
+immark_la_CPPFLAGS = -I$(rsrt_cflags) -I$(top_srcdir) $(pthreads_cflags)
immark_la_LDFLAGS = -module -avoid-version
immark_la_LIBADD =
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
new file mode 100644
index 00000000..813a4c68
--- /dev/null
+++ b/runtime/Makefile.am
@@ -0,0 +1,13 @@
+noinst_LTLIBRARIES = librsyslog.la
+#pkglib_LTLIBRARIES = librsyslog.la
+
+librsyslog_la_SOURCES = \
+ queue.c \
+ queue.h
+
+librsyslog_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags)
+#librsyslog_la_LDFLAGS = -module -avoid-version
+librsyslog_la_LIBADD =
+
+sbin_PROGRAMS =
+man_MANS =
diff --git a/queue.c b/runtime/queue.c
index 0f58c545..0f58c545 100644
--- a/queue.c
+++ b/runtime/queue.c
diff --git a/queue.h b/runtime/queue.h
index 9e75b31b..9e75b31b 100644
--- a/queue.h
+++ b/runtime/queue.h