#!/usr/bin/make -f
#export DH_VERBOSE=1

%:
	dh $@ --with autoreconf --parallel

# The upstream Makefile in the tarball is not what you might expect,
# and causes a syntax error (missing separator) in GNU make.

override_dh_auto_clean:
	-rm -f Makefile
	dh_auto_clean

# Enable SSE2 on amd64.

# This would also work on *some* arch=i386 machines.  But the set of
# arch=i386 machines which support SSE2 but do not have hardware
# support for the amd64 instruction set is very small.  On an
# arch=i386 that does have amd64 instruction set, the benefit of using
# multiarch and installing the amd64 package is greater than the
# benefit of just turning on SSE2.  So to keep things simple and
# robust, we enable SSE2 only on amd64.

configure_flags := $(shell dpkg-architecture -eamd64 && echo --enable-sse2 || :)

override_dh_auto_configure:
	dh_auto_configure -- $(configure_flags)
