#!/usr/bin/make -f

#export DH_VERBOSE=1

DEB_HOST_ARCH       ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

# Used to enable documentation if dependencies are available
define cond_enable
	$(shell if test -x /usr/bin/doxygen && test -x /usr/bin/dot \
		&& test -x /usr/bin/pdftex; then echo --enable-documentation; \
		else echo --disable-documentation; fi )
endef

CONFIGURE_OPTIONS ?= $(call cond_enable) \
		     --enable-dri2

%:
	dh $@

binary: binary-indep binary-arch ;

override_dh_auto_configure:
	dh_testdir
	./configure --prefix=/usr $(CONFIGURE_OPTIONS)

get-orig-source:
	$(dir $_)libvdpau-get-orig-source
