summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorOz Tiram <[email protected]>2024-03-03 14:36:27 +0100
committerLuke from DC <[email protected]>2024-03-11 18:33:37 +0000
commit2ad956843e49cfb74862a07589810d6638122121 (patch)
treec140c6c52b88e66892db9a57bc0d23f93e91135b /configure.ac
parent4c33e64b171b52252f353720a322af6fd8b8cf54 (diff)
downloadmate-control-center-2ad956843e49cfb74862a07589810d6638122121.tar.bz2
mate-control-center-2ad956843e49cfb74862a07589810d6638122121.tar.xz
Make systemd optional
There is not much of direct systemd usage in the system-info plugin. This patch suggestion enables building this plugin on system like alpine, voidlinux or gentoo with openrc. Signed-off-by: Oz Tiram <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index aa43d083..45d5365f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,6 @@ PKG_CHECK_MODULES(TYPING, $GMODULE_ADD glib-2.0 >= $GLIB_REQUIRED gio-2.0 gtk+-3
PKG_CHECK_MODULES(GIO, gio-2.0)
PKG_CHECK_MODULES(GLIBTOP, libgtop-2.0)
PKG_CHECK_MODULES(UDISKS, udisks2)
-PKG_CHECK_MODULES(SYSTEMD, systemd >= $SYSTEMD_REQUIRED)
PKG_CHECK_MODULES([DCONF], [dconf >= 0.13.4])
AC_SUBST(DCONF_CFLAGS)
@@ -168,6 +167,20 @@ AC_ARG_ENABLE([libappindicator],
[enable_appindicator=yes],
[enable_appindicator=no])])])
+AC_ARG_ENABLE([systemd],
+ [AS_HELP_STRING([--enable-systemd[=@<:@no/auto/yes@:>@]],[Use systemd @<:@default=yes@:>@])],
+ [enable_systemd=$enableval],
+ [PKG_CHECK_EXISTS([$SYSTEMD >= $SYSTEMD_REQUIRED],
+ [enable_systemd=no],
+ ,
+ )])
+
+AS_IF([test "x$enable_systemd" = xyes],
+ [AC_MSG_NOTICE([Building with systemd support.])
+ PKG_CHECK_MODULES([SYSTEMD],
+ [systemd >= $SYSTEMD_REQUIRED],
+ [AC_DEFINE(HAVE_SYSTEMD, 1, [Have systemd])])])
+
AS_IF([test "x$enable_appindicator" = xyes],
[AC_MSG_NOTICE([Buidling against Ubuntu AppIndicator.])
PKG_CHECK_MODULES([APPINDICATOR],
@@ -313,6 +326,7 @@ Configure summary:
Ayatana AppIndicator (preferred) $(test "x$enable_appindicator" = xyes && echo no || echo yes)
Ubuntu AppIndicator (legacy) $(test "x$enable_appindicator" = xyes && echo yes || echo no)
+ Systemd: $(test "x$enable_systemd" = xyes && echo yes || echo no)
Accountsservice: ${have_accountsservice}
Native Language support: ${USE_NLS}