From a7a6c59bdaff30d190aec4b4bb028c3e1112cb69 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Tue, 21 Jun 2016 10:23:33 +0300 Subject: [PATCH] build: Add --enable-sysprofd configure flag This is useful to ensure reproducible builds. https://bugzilla.gnome.org/show_bug.cgi?id=767902 --- configure.ac | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index dc52d93d..2246d5a0 100644 --- a/configure.ac +++ b/configure.ac @@ -113,12 +113,23 @@ PKG_CHECK_MODULES(SYSTEMD, [have_systemd=yes], [have_systemd=no]) -enable_sysprofd=no -AS_IF([test "$have_polkit" = "yes" && test "$have_systemd" = "yes"],[ - enable_sysprofd=yes +# sysprofd requires libsystemd and polkit, and is required to run +# the ui without root permissions +AC_ARG_ENABLE([sysprofd], + [AS_HELP_STRING([--enable-sysprofd=@<:@yes/no/auto@:>@], + [Build Sysprof D-Bus daemon.])], + [enable_sysprofd=$enableval], + [enable_sysprofd=auto]) +AS_IF([test "$enable_sysprofd" = "auto"],[ + AS_IF([test "$have_polkit" = "yes" && test "$have_systemd" = "yes"], + [enable_sysprofd=yes], + [enable_sysprofd=no]) +]) +AS_IF([test "$enable_sysprofd" = "yes"],[ + AS_IF([test "$have_systemd" = "yes" && test "$have_polkit" = "yes"],[],[ + AC_MSG_ERROR([--enable-sysprofd requires libsystemd >= systemd_required_version and polkit-gobject-1]) + ]) ]) - -# we require systemd for sysprofd AM_CONDITIONAL(ENABLE_SYSPROFD, [test "$enable_sysprofd" = "yes"]) # we might be building sysprof-cli without the UI