#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,-O1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

BACKEND=linux
ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd)
	BACKEND=freebsd
endif

override_dh_autoreconf:
	mkdir -p m4
	NOCONFIGURE=1 dh_autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --with-backend=$(BACKEND)

execute_after_dh_auto_install:
	find debian -name '*.la' -delete

%:
	dh $@
