#!/usr/bin/make -f

HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
ifeq ($(HOST_ARCH_CPU), ppc64el)
	export DEB_CPPFLAGS_MAINT_APPEND = -U__vector
endif

export DEB_CXXFLAGS_MAINT_APPEND = -std=gnu++98

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_clean:
	dh_clean
	rm -f aclocal.m4 config.guess config.h.in config.sub install-sh
	rm -f libtool ltconfig ltmain.sh missing mkinstalldirs stamp-h.in
	rm -f depcomp stamp-h1 configure
	rm -rf autom4te.cache
	find -name Makefile.in | xargs -r rm -f

override_dh_auto_configure:
	dh_auto_configure -- --enable-optimize --disable-gui
