#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -Wl,-O1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

include /usr/share/dpkg/architecture.mk
ifeq ($(DEB_BUILD_ARCH_OS),linux)
	SYSTEMD_ENABLE=--with-systemd
endif

override_dh_auto_configure:
	NOCONFIGURE=1 xdt-autogen
	dh_auto_configure -- \
		$(SYSTEMD_ENABLE) \
		--with-upower \
		--with-console-kit=no \
		--enable-late-locking=yes \
		--enable-lock-on-lid=yes \
		--enable-lock-on-suspend=yes \
		--enable-settings-backend=yes \
		--with-mit-ext

%:
	dh $@
