Since systemd 209, all the functionalities of the former libsystemd-*
(including libsystemd-journal) have been merged into a single
libsystemd, with the former libraries left as compatibility ones.

Thus, first look for libsystemd, and if not found try again with the
libsystemd-journal as used before.
---
 configure.ac | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1784264..7f8743b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1015,12 +1015,19 @@ PKG_CHECK_MODULES([HIVEX], [hivex],[
 AM_CONDITIONAL([HAVE_HIVEX],[test "x$HIVEX_LIBS" != "x"])
 
 dnl systemd journal library (optional)
-PKG_CHECK_MODULES([SD_JOURNAL], [libsystemd-journal >= 196],[
+PKG_CHECK_MODULES([SD_JOURNAL], [libsystemd],[
     AC_SUBST([SD_JOURNAL_CFLAGS])
     AC_SUBST([SD_JOURNAL_LIBS])
     AC_DEFINE([HAVE_SD_JOURNAL],[1],[systemd journal library found at compile 
time.])
-],
-    [AC_MSG_WARN([systemd journal library not found, some features will be 
disabled])])
+],[
+    PKG_CHECK_MODULES([SD_JOURNAL], [libsystemd-journal >= 196],[
+        AC_SUBST([SD_JOURNAL_CFLAGS])
+        AC_SUBST([SD_JOURNAL_LIBS])
+        AC_DEFINE([HAVE_SD_JOURNAL],[1],[systemd journal library found at 
compile time.])
+    ],[
+        AC_MSG_WARN([systemd journal library not found, some features will be 
disabled])
+    ])
+])
 
 dnl FUSE is optional to build the FUSE module.
 AC_ARG_ENABLE([fuse],
-- 
1.9.3

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to