[gnome-system-monitor/migrateui] build: Disallow building with systemd v43 due to C++ incompatibility



commit 6c6622cfb3ab5fe384602862bc2c5efda7d6aa27
Author: Chris KÃhl <blixtra gmail com>
Date:   Thu Mar 22 11:18:09 2012 +0100

    build: Disallow building with systemd v43 due to C++ incompatibility
    
    systemd v43 introduced a parameter to a function named 'class' in a
    header file. This makes systemd incompatible with C++ applications due
    to 'class' being a c++ keyword.
    
    This has been fixed in subsequent versions of systemd. Thus, we exclude
    only this version in configure.ac

 configure.ac |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4632f3b..9bf6ccd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,15 +38,20 @@ GLIBMM_REQUIRED=2.27
 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
 
 PKG_CHECK_MODULES(PROCMAN, glib-2.0 >= $GLIB_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-3.0 >= $LIBWNCK_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED gtkmm-3.0 >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED gmodule-2.0)
 
 have_systemd=no
-AC_ARG_ENABLE(systemd, AS_HELP_STRING([--disable-systemd], [disable systemd support]))
+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-daemon >= SYSTEMD_REQUIRED libsystemd-login >= SYSTEMD_REQUIRED ],
-                [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
+        PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-daemon >= $SYSTEMD_REQUIRED 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]