#!/usr/bin/make -f

# set the platform for configure script, especially useful for cross-compiling
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE))
	CONFFLAGS += --build=$(DEB_BUILD_GNU_TYPE)
else
	CONFFLAGS += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif

%:
	dh $@ --with autotools-dev

override_dh_auto_configure:
	dh_auto_configure -- --disable-static

override_dh_auto_install:
	dh_auto_install
	find . -name *.la -delete

# emtpy rule to prevent shlibs to be created because we use private shared library
# avoid pkg-has-shlibs-control-file-but-no-actual-shared-libs lintian error
override_dh_makeshlibs:
