summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac21
-rw-r--r--plugins/imjournal/Makefile.am7
3 files changed, 20 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index 39095ee6..663e15d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -71,7 +71,7 @@ EXTRA_DIST = \
contrib/gnutls/key.pem \
rsyslog.service.in
-SUBDIRS = doc runtime grammar compat . plugins/immark plugins/imuxsock plugins/imjournal plugins/imtcp plugins/imudp plugins/omtesting
+SUBDIRS = doc runtime grammar compat . plugins/immark plugins/imuxsock plugins/imtcp plugins/imudp plugins/omtesting
if ENABLE_RSYSLOGD
SUBDIRS += tools
@@ -181,6 +181,10 @@ if ENABLE_OMJOURNAL
SUBDIRS += plugins/omjournal
endif
+if ENABLE_IMJOURNAL
+SUBDIRS += plugins/imjournal
+endif
+
if ENABLE_ELASTICSEARCH
SUBDIRS += plugins/omelasticsearch
endif
diff --git a/configure.ac b/configure.ac
index 8644a190..64d0126b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -325,17 +325,20 @@ AC_ARG_ENABLE(kmsg,
)
AM_CONDITIONAL(ENABLE_IMKMSG, test x$enable_kmsg = xyes)
-# journal
-AC_ARG_ENABLE(journal,
- [AS_HELP_STRING([--enable-journal],[Systemd journal message import @<:@default=no@:>@])],
+# imjournal
+AC_ARG_ENABLE(imjournal,
+ [AS_HELP_STRING([--enable-imjournal],[Systemd journal message import @<:@default=no@:>@])],
[case "${enableval}" in
- yes) enable_journal="yes" ;;
- no) enable_journal="no" ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-journal) ;;
+ yes) enable_imjournal="yes" ;;
+ no) enable_imjournal="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-imjournal) ;;
esac],
- [enable_journal="no"]
+ [enable_imjournal="no"]
)
-AM_CONDITIONAL(ENABLE_IMJOURNAL, test x$enable_journal = xyes)
+if test "x$enable_imjournal" = "xyes"; then
+ PKG_CHECK_MODULES([LIBSYSTEMD_JOURNAL], [libsystemd-journal >= 197])
+fi
+AM_CONDITIONAL(ENABLE_IMJOURNAL, test x$enable_imjournal = xyes)
# inet
AC_ARG_ENABLE(inet,
@@ -1401,7 +1404,7 @@ echo " file input module enabled: $enable_imfile"
echo " Solaris input module enabled: $enable_imsolaris"
echo " periodic statistics module enabled: $enable_impstats"
echo " imzmq3 input module enabled: $enable_imzmq3"
-echo " imjournal input module enabled: $enable_journal"
+echo " imjournal input module enabled: $enable_imjournal"
echo
echo "---{ output plugins }---"
echo " Mail support enabled: $enable_mail"
diff --git a/plugins/imjournal/Makefile.am b/plugins/imjournal/Makefile.am
index c109b750..df088a3a 100644
--- a/plugins/imjournal/Makefile.am
+++ b/plugins/imjournal/Makefile.am
@@ -1,8 +1,7 @@
pkglib_LTLIBRARIES = imjournal.la
imjournal_la_SOURCES = imjournal.c imjournal.h
-CFLAGS += -lsystemd-journal
-
-imjournal_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
+imjournal_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBSYSTEMD_JOURNAL_CFLAGS)
+#imjournal_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(LIBSYSTEMD_JOURNAL_CFLAGS)
imjournal_la_LDFLAGS = -module -avoid-version
-imjournal_la_LIBADD =
+imjournal_la_LIBADD = $(LIBSYSTEMD_JOURNAL_LIBS)