#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@

override_dh_auto_configure:
	libtoolize -f
	aclocal
	automake --add-missing
	autoconf

	# The config file and filtering options can cause noticeable
	# performance impact.  If you have a high performance
	# requirement, remove those two options below.
	dh_auto_configure -- --libdir=/lib/$(DEB_HOST_MULTIARCH) --enable-config-file --enable-filtering

override_dh_install:
	dh_install
	ln -s libsnoopy.so.0.0.0 debian/snoopy/lib/snoopy.so
	rm -f debian/snoopy/lib/libsnoopy.la

override_dh_clean:
	dh_clean
	find . -name Makefile.in -exec rm {} \+
	rm -f aclocal.m4 compile configure test-driver
