configure: Support systemd >= 209
authorChris Patterson <pattersonc@ainfosec.com>
Fri, 18 Dec 2015 13:27:57 +0000 (08:27 -0500)
committerTobias Brunner <tobias@strongswan.org>
Mon, 21 Dec 2015 10:53:31 +0000 (11:53 +0100)
libsystemd-journal and libsystemd-daemon are now just
part of libsystemd.

Keep original systemd checks as a fallback.

Updates charon-systemd/Makefile.am accordingly.

Tested on:
- debian wheezy (systemd v44)
- ubuntu 15.10 (systemd v255).

Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
Closes strongswan/strongswan#24.

configure.ac
src/charon-systemd/Makefile.am

index 8af5367..db35409 100644 (file)
@@ -941,13 +941,16 @@ if test x$systemd = xtrue; then
                AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
        fi
 
-       PKG_CHECK_MODULES(systemd_daemon, [libsystemd-daemon])
-       AC_SUBST(systemd_daemon_CFLAGS)
-       AC_SUBST(systemd_daemon_LIBS)
-
-       PKG_CHECK_MODULES(systemd_journal, [libsystemd-journal])
-       AC_SUBST(systemd_journal_CFLAGS)
-       AC_SUBST(systemd_journal_LIBS)
+       PKG_CHECK_MODULES(systemd, [libsystemd >= 209],
+               [AC_SUBST(systemd_CFLAGS)
+                AC_SUBST(systemd_LIBS)],
+               [PKG_CHECK_MODULES(systemd_daemon, [libsystemd-daemon])
+                AC_SUBST(systemd_daemon_CFLAGS)
+                AC_SUBST(systemd_daemon_LIBS)
+                PKG_CHECK_MODULES(systemd_journal, [libsystemd-journal])
+                AC_SUBST(systemd_journal_CFLAGS)
+                AC_SUBST(systemd_journal_LIBS)]
+       )
 fi
 
 if test x$tss = xtrousers; then
index 1b9ac15..ee85d43 100644 (file)
@@ -9,11 +9,11 @@ charon_systemd_CPPFLAGS = \
        -I$(top_srcdir)/src/libstrongswan \
        -I$(top_srcdir)/src/libhydra \
        -I$(top_srcdir)/src/libcharon \
-       $(systemd_daemon_CFLAGS) $(systemd_journal_CFLAGS) \
+       $(systemd_CFLAGS) $(systemd_daemon_CFLAGS) $(systemd_journal_CFLAGS) \
        -DPLUGINS=\""${charon_plugins}\""
 
 charon_systemd_LDADD = \
        $(top_builddir)/src/libstrongswan/libstrongswan.la \
        $(top_builddir)/src/libhydra/libhydra.la \
        $(top_builddir)/src/libcharon/libcharon.la \
-       $(systemd_daemon_LIBS) $(systemd_journal_LIBS) -lm $(PTHREADLIB) $(DLLIB)
+       $(systemd_LIBS) $(systemd_daemon_LIBS) $(systemd_journal_LIBS) -lm $(PTHREADLIB) $(DLLIB)