From ee379181d3b6b89c23a660d027caa9c2d027aa7d Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 19 Dec 2014 00:28:04 +0100 Subject: Update systemd support from several GSD commits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Msg: Backout change from using free() to g_free() in systemd patch Commit: f1f7bddf007c950608f5f8c5a771a7fb2ab187d5 From: Chris Kühl Msg: Require systemd 38 or greater when using --enable-systemd Commit: ff551c6974cfa0801a368ee5c2406ce941ac8cab From: Chris Kühl Msg: build: Disallow building with systemd v43 due to C++ incompatibility Commit: 8a17cd6ff6b0ab4979c6ed8426724ce355d23679 From: Chris Kühl Msg: Check for logind, not for systemd Commit: 4cf87daa48a8ab606afe5e3c2ac54c8f6276ba98 From: Martin Pitt --- configure.ac | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'configure.ac') 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 -- cgit v1.2.1