From 77c0d1f6074059dafd2293f9c42ea0f9d60f8aad Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 5 Sep 2013 06:52:15 +0200 Subject: Add journald support --- src/external/systemd.m4 | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/external') diff --git a/src/external/systemd.m4 b/src/external/systemd.m4 index 9afb65de..dbced0d6 100644 --- a/src/external/systemd.m4 +++ b/src/external/systemd.m4 @@ -6,7 +6,20 @@ AC_DEFUN([AM_CHECK_SYSTEMD], [AC_MSG_ERROR([Could not detect systemd presence])] ) ]) + AM_COND_IF([HAVE_SYSTEMD], [PKG_CHECK_MODULES([SYSTEMD_LOGIN], [libsystemd-login], [AC_DEFINE_UNQUOTED(HAVE_SYSTEMD_LOGIN, 1, [Build with libsystemdlogin support])], [AC_MSG_NOTICE([Build without libsystemd-login support])])]) + +dnl A macro to check presence of journald on the system +AC_DEFUN([AM_CHECK_JOURNALD], +[ + PKG_CHECK_MODULES(JOURNALD, + libsystemd-journal, + [AC_DEFINE_UNQUOTED([WITH_JOURNALD], 1, [journald is available])]) + dnl Some older versions of pkg-config might not set these automatically + dnl while setting CFLAGS and LIBS manually twice doesn't hurt. + AC_SUBST([JOURNALD_CFLAGS]) + AC_SUBST([JOURNALD_LIBS]) +]) -- cgit