summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
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