~kennylevinsen/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH seatd] build: check for libelogind before libsystemd

Details
Message ID
<20200808122735.17951-1-ifreund@ifreund.xyz>
DKIM signature
pass
Download raw message
Patch: +7 -5
elogind provides a libsystemd wrapper which is packaged by some distros.
For whatever reason using this wrapper instead of libelogind directly
causes compiler warnings to pop up. Checking for libelogind first
ensures that this wrapper is not used.
---
 meson.build | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/meson.build b/meson.build
index 49bd049..e4785d9 100644
--- a/meson.build
+++ b/meson.build
@@ -98,15 +98,17 @@ endif

logind_provider = ''
if get_option('logind').enabled()
	logind = dependency('libsystemd', required: false)
	# Check for libelogind first, as elogind may provide a libsystemd wrapper
	# which can cause issues.
	logind = dependency('libelogind', required: false)
	add_project_arguments('-DLOGIND_ENABLED=1', language: 'c')
	if logind.found()
		add_project_arguments('-DHAVE_SYSTEMD=1', language: 'c')
		logind_provider = 'systemd'
	else
		logind = dependency('libelogind')
		add_project_arguments('-DHAVE_ELOGIND=1', language: 'c')
		logind_provider = 'elogind'
	else
		logind = dependency('libsystemd')
		add_project_arguments('-DHAVE_SYSTEMD=1', language: 'c')
		logind_provider = 'systemd'
	endif

	private_files += [
-- 
2.28.0
Reply to thread Export thread (mbox)