#! /usr/bin/make -f

export DH_OPTIONS		+= -O-Bbuild
export DEB_BUILD_MAINT_OPTIONS	 = hardening=-fortify

ENABLED = --enable-threads
ENABLED += --enable-esd
# Only enable ALSA on Linux
ifeq ($(DEB_HOST_ARCH_OS),linux)
  ENABLED += --enable-alsa
else
  ENABLED += --disable-alsa
endif

override_dh_auto_configure:
	dh_auto_configure -- $(ENABLED) $(shell dpkg-buildflags --export=configure)

override_dh_installinfo:
	dh_installinfo docs/mikmod.info*

override_dh_installchangelogs:
	dh_installchangelogs -a NEWS

%:
	dh $@ --with autoreconf
