#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

LDFLAGS += -pthread

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

ifeq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so),)
  DEB_CONFIGURE_EXTRA_FLAGS = --enable-static --enable-thread-check
else
  DEB_CONFIGURE_EXTRA_FLAGS = --enable-static --enable-thread-check --with-mysql-lib=/usr/lib/$(DEB_HOST_MULTIARCH)
endif
DEB_COMPRESS_EXCLUDE = .cpp .h

