diff options
| author | Colomban Wendling <[email protected]> | 2025-03-25 11:00:50 +0100 | 
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2025-08-29 19:09:35 +0000 | 
| commit | b5f6b8cf2d1976e34c20d37ab737545713174ede (patch) | |
| tree | 13948f24f0cc3b3b433625d1005993fb8e70ae78 | |
| parent | 4c7baca2c322df623fa5f2b81e8477117b1f1886 (diff) | |
| download | mate-control-center-b5f6b8cf2d1976e34c20d37ab737545713174ede.tar.bz2 mate-control-center-b5f6b8cf2d1976e34c20d37ab737545713174ede.tar.xz  | |
Fix libsystemd auto-detection
Properly handle missing libsystemd when enable-systemd=auto, which is
even the default for this switch.
Without this, one had to explicitly give `--disable-systemd` despite
the what the help text stated.
| -rw-r--r-- | configure.ac | 15 | 
1 files changed, 5 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index c0e1cd0d..aca4d3e3 100644 --- a/configure.ac +++ b/configure.ac @@ -179,16 +179,11 @@ AS_IF([test "x$enable_appindicator" = xyes],  have_systemd=no  AC_ARG_ENABLE(systemd, AS_HELP_STRING([--disable-systemd], [disable systemd support]),enable_systemd="$enableval",enable_systemd=auto) -if test "x$enable_systemd" != "xno"; then -	PKG_CHECK_MODULES(SYSTEMD, [libsystemd], [have_systemd=yes], -	                  [PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= $SYSTEMD_REQUIRED], -	                  [have_systemd=yes])]) -	if test "x$have_systemd" = xno && test "x$enable_systemd" = xyes; then -		AC_MSG_ERROR([*** systemd support requested but libraries not found]) -	elif test "x$have_systemd" = xyes; then -		AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is available]) -	fi -fi +AS_CASE(["$enable_systemd"], +        [yes], [PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= $SYSTEMD_REQUIRED], [have_systemd=yes])], +        [auto], [PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= $SYSTEMD_REQUIRED], [have_systemd=yes], [have_systemd=no])], +        [have_systemd=no]) +AS_IF([test "x$have_systemd" = xyes], [AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is available])])  AM_CONDITIONAL(HAVE_SYSTEMD, [test "$have_systemd" = "yes"])  | 
