#!/usr/bin/make -f

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

# use qt4's moc as the default moc is qt3's when both are installed
PATH := /usr/share/qt4/bin:$(PATH)
export PATH

# avoid overlinking and reduce library dependencies
export LDFLAGS := -Wl,--as-needed

# a trick to fix xpdfrc location without modifying autotools stuff
DEB_CONFIGURE_SYSCONFDIR := /etc/xpdf

# disable gtk stuff to minimize Build-Depends
DEB_CONFIGURE_EXTRA_FLAGS +=			\
	--enable-libjpeg			\
	--enable-splash-output			\
	--enable-cairo-output			\
	--enable-poppler-glib			\
	--enable-poppler-qt4			\
	--enable-poppler-cpp			\
	--enable-gtk-doc			\
	--enable-xpdf-headers			\
	--disable-poppler-qt			\
	--enable-introspection=no		\
	--disable-abiword-output		\
	--disable-gtk-test

DEB_DH_MAKESHLIBS_ARGS_libpoppler13 += -V"libpoppler13"
DEB_DH_MAKESHLIBS_ARGS_libpoppler-glib6 += -V"libpoppler-glib6 (>= 0.16)"
DEB_DH_MAKESHLIBS_ARGS_libpoppler-qt4-3 += -V"libpoppler-qt4-3 (>= 0.16)"
DEB_DH_MAKESHLIBS_ARGS_libpoppler-cpp0 += -V"libpoppler-cpp0 (>= 0.16)"

clean::
	dh_clean
	rm -f glib/reference/html/*
