summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-19 00:28:04 +0100
committerinfirit <[email protected]>2014-12-19 00:28:04 +0100
commitee379181d3b6b89c23a660d027caa9c2d027aa7d (patch)
treece6e8a9b66ee4b0cdc58679d9dd53f77a7c3529f /configure.ac
parent21eeae3b6a844222365b873a8826001af33f1e97 (diff)
downloadmate-system-monitor-ee379181d3b6b89c23a660d027caa9c2d027aa7d.tar.bz2
mate-system-monitor-ee379181d3b6b89c23a660d027caa9c2d027aa7d.tar.xz
Update systemd support from several GSD commits
Msg: Backout change from using free() to g_free() in systemd patch Commit: f1f7bddf007c950608f5f8c5a771a7fb2ab187d5 From: Chris Kühl <[email protected]> Msg: Require systemd 38 or greater when using --enable-systemd Commit: ff551c6974cfa0801a368ee5c2406ce941ac8cab From: Chris Kühl <[email protected]> Msg: build: Disallow building with systemd v43 due to C++ incompatibility Commit: 8a17cd6ff6b0ab4979c6ed8426724ce355d23679 From: Chris Kühl <[email protected]> Msg: Check for logind, not for systemd Commit: 4cf87daa48a8ab606afe5e3c2ac54c8f6276ba98 From: Martin Pitt <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 11 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 0edfd3b..411a977 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,9 @@ GIOMM_REQUIRED=2.26.0
GLIBMM_REQUIRED=2.22
LIBXML_REQUIRED=2.0
RSVG_REQUIRED=2.35
+SYSTEMD_REQUIRED=38
+# systemd v43 used the C++ keyword 'class' as a function parameter. This breaks the build for C++ programs.
+SYSTEMD_EXCLUDED=43
AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
@@ -65,11 +68,14 @@ PKG_CHECK_MODULES(GMODULE,gmodule-2.0,[GMODULE_ADD="gmodule-2.0"],[GMODULE_ADD="
PKG_CHECK_MODULES(PROCMAN,$GMODULE_ADD glib-2.0 >= $GLIB_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-$LIBWNCK_API_VERSION >= $LIBWNCK_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED mate-icon-theme >= $MATE_ICON_THEME_REQUIRED gtkmm-$GTKMM_API_VERSION >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED)
have_systemd=no
-AC_ARG_ENABLE(systemd, AS_HELP_STRING([--disable-systemd], [disable systemd support]))
-if test "x$enable_systemd" != "xno"; then
- PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-daemon libsystemd-login ],
- [AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is available]) have_systemd=yes], have_systemd=no)
- if test "x$have_systemd" = xno -a "x$enable_systemd" = xyes; then
+AC_ARG_ENABLE(systemd, AS_HELP_STRING([--disable-systemd], [disable systemd support]),,enable_systemd=no)
+ if test "x$enable_systemd" != "xno"; then
+ PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login >= $SYSTEMD_REQUIRED ],
+ [ PKG_CHECK_MODULES(SYSTEMD_EX, [ libsystemd-login = $SYSTEMD_EXCLUDED ],
+ AC_MSG_ERROR([*** systemd v43 found but it has a bug in its header files (uses C++ keyword)]), # Can't use systemd v43
+ [AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is available]) have_systemd=yes])],
+ have_systemd=no)
+if test "x$have_systemd" = xno; then
AC_MSG_ERROR([*** systemd support requested but libraries not found])
fi
fi