summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-10-17 13:51:25 +0200
committerColin Guthrie <colin@mageia.org>2014-11-03 12:32:23 +0000
commitfb1ca6f0c1799259bad85bee8d984d62871584b9 (patch)
tree0e7bb64b198a54f2c26e494f53186013cc59aa5a /configure.ac
parentf7da58b73fd9f324d5a96746a2cdfc05eb37047a (diff)
downloadpulseaudio-fb1ca6f0c1799259bad85bee8d984d62871584b9.tar.gz
build-sys: Add support for newer systemd without compatibility libs
In newer versions of systemd some libraries were combined for the sake of general simplicity. This change checks against the newer name first and avoids separate pkgconfig checks if it's found. We probably want to keep support for the older library names for some time. systemd does allow for the shipping of compatibility pkgconfig files to not break downstream code like ourselves which is why this likely hasn't been "fixed" until now. With this change we no longer rely on systemd having been built with those compatibility pkgconfig files.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 21 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index c7595ae75..98a3ee255 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1178,13 +1178,31 @@ AM_CONDITIONAL([HAVE_GCOV], [test "x$HAVE_GCOV" = x1])
ORC_CHECK([0.4.11])
-#### systemd login support (optional) ####
+#### systemd support (optional) ####
AC_ARG_ENABLE([systemd-login],
AS_HELP_STRING([--disable-systemd-login],[Disable optional systemd login support]))
+AC_ARG_ENABLE([systemd-journal],
+ AS_HELP_STRING([--disable-systemd-journal],[Disable optional systemd journal support]))
+
+# Newer systemd's combine their subcomponent libraries into one
+# If it exists, we should use it for the further checks
+
+AS_IF([test "x$enable_systemd_login" != "xno" || test "x$enable_systemd_journal" != "xno"],
+ [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)],
+ HAVE_SYSTEMD=0)
+
+AS_IF([test "x$HAVE_SYSTEMD" = "x1"],
+ [
+ HAVE_SYSTEMD_LOGIN=1
+ HAVE_SYSTEMD_JOURNAL=1
+ ])
+
+#### systemd login support (optional) ####
+
AS_IF([test "x$enable_systemd_login" != "xno"],
- [PKG_CHECK_MODULES(SYSTEMDLOGIN, [ libsystemd-login ], HAVE_SYSTEMD_LOGIN=1, HAVE_SYSTEMD_LOGIN=0)],
+ [AS_IF([test "x$HAVE_SYSTEMD_LOGIN" != "x1"], [PKG_CHECK_MODULES(SYSTEMDLOGIN, [ libsystemd-login ], HAVE_SYSTEMD_LOGIN=1, HAVE_SYSTEMD_LOGIN=0)])],
HAVE_SYSTEMD_LOGIN=0)
AS_IF([test "x$enable_systemd_login" = "xyes" && test "x$HAVE_SYSTEMD_LOGIN" = "x0"],
@@ -1196,11 +1214,8 @@ AS_IF([test "x$HAVE_SYSTEMD_LOGIN" = "x1"], AC_DEFINE([HAVE_SYSTEMD_LOGIN], 1, [
#### systemd journal support (optional) ####
-AC_ARG_ENABLE([systemd-journal],
- AS_HELP_STRING([--disable-systemd-journal],[Disable optional systemd journal support]))
-
AS_IF([test "x$enable_systemd_journal" != "xno"],
- [PKG_CHECK_MODULES(SYSTEMDJOURNAL, [ libsystemd-journal ], HAVE_SYSTEMD_JOURNAL=1, HAVE_SYSTEMD_JOURNAL=0)],
+ [AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" != "x1"], [PKG_CHECK_MODULES(SYSTEMDJOURNAL, [ libsystemd-journal ], HAVE_SYSTEMD_JOURNAL=1, HAVE_SYSTEMD_JOURNAL=0)])],
HAVE_SYSTEMD_JOURNAL=0)
AS_IF([test "x$enable_systemd_journal" = "xyes" && test "x$HAVE_SYSTEMD_JOURNAL" = "x0"],