summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-07-08 16:19:18 +0200
committerThomas Haller <thaller@redhat.com>2015-07-14 15:52:50 +0200
commitcd5417ff4f7e15e569f6818ae74605ae55bcfa05 (patch)
tree43387b635dabd86f6d26b5d69f158dad40778c70
parentb1b26e8049c5041bf3a217f68496778bbfcc7dd5 (diff)
downloadNetworkManager-cd5417ff4f7e15e569f6818ae74605ae55bcfa05.tar.gz
build: detect systemd-journald support
-rw-r--r--configure.ac25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c31f27f350..11f6ccdaad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -376,6 +376,30 @@ elif test "$hostname_persist" = gentoo; then
AC_DEFINE(HOSTNAME_PERSIST_GENTOO, 1, [Enable Gentoo hostname persist method])
fi
+AC_ARG_WITH(systemd-journal, AS_HELP_STRING([--with-systemd-journal=yes|no], [Use systemd journal for logging]))
+have_systemd_journal=no
+if test "$with_systemd_journal" != "no"; then
+ PKG_CHECK_MODULES(SYSTEMD_JOURNAL,
+ [libsystemd >= 209],
+ [have_systemd_journal=yes],
+ [PKG_CHECK_MODULES(SYSTEMD_JOURNAL,
+ [libsystemd-journal],
+ [have_systemd_journal=yes],
+ [have_systemd_journal=no])])
+ if test "$have_systemd_journal" != "yes"; then
+ if test "$with_systemd_journal" = "yes"; then
+ AC_MSG_ERROR([Missing systemd-journald support])
+ fi
+ fi
+fi
+if test "$have_systemd_journal" = "yes"; then
+ AC_SUBST(SYSTEMD_JOURNAL_CFLAGS)
+ AC_SUBST(SYSTEMD_JOURNAL_LIBS)
+ AC_DEFINE([SYSTEMD_JOURNAL], 1, [Define to 1 if libsystemd-journald is available])
+else
+ AC_DEFINE([SYSTEMD_JOURNAL], 0, [Define to 1 if libsystemd-journald is available])
+fi
+
# Session tracking support
AC_ARG_WITH(systemd-logind, AS_HELP_STRING([--with-systemd-logind=yes|no],
[Support systemd session tracking]))
@@ -1091,6 +1115,7 @@ else
fi
echo " polkit agent: ${enable_polkit_agent}"
echo " selinux: $have_selinux"
+echo " systemd-journald: $have_systemd_journal"
echo " hostname persist: ${hostname_persist}"
echo