#!/usr/bin/make -f
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_LDFLAGS_MAINT_APPEND = -pthread

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --enable-static --enable-thread-check --with-mysql-lib=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_autoreconf:
	# autoreconf fails unless aclocal is skipped
	ACLOCAL=true dh_autoreconf

override_dh_makeshlibs:
	# For new symbols when compiled with GCC 7
	dh_makeshlibs -V'libmysql++3v5 (>= 3.2.5-1~)'
