#!/usr/bin/make -f

include /usr/share/dpkg/buildtools.mk

# skip tests that need files we remove in the +dfsg version
SKIP_TESTS = $(shell cat debian/tests/pkg-perl/smoke-skip)
TEST_FILES = $(filter-out $(SKIP_TESTS), $(wildcard t/*.t))

XML_LIBS := $(shell $(PKG_CONFIG) --libs   libxml-2.0)
XML_INC  := $(shell $(PKG_CONFIG) --cflags libxml-2.0)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto
export DEB_CFLAGS_MAINT_STRIP = -O3
export DEB_CFLAGS_MAINT_APPEND = -O2 -Wno-incompatible-pointer-types

%:
	dh $@

override_dh_auto_configure:
	SKIP_SAX_INSTALL=1 dh_auto_configure -- LIBS="$(XML_LIBS)" INC="$(XML_INC)"
