#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	touch src/configure.in && \
	touch src/aclocal.m4 && \
	touch src/configure configure

	dh_auto_configure -- \
	   --prefix=/usr --mandir=\$${prefix}/share/man \
	   --infodir=\$${prefix}/share/info \
	   --with-system-gmp=yes \
	   --with-tcp \
	   --with-clx  \
	   --enable-threads=yes \
	   --enable-boehm=system  \
	   --enable-libatomic=system \
	   --disable-rpath \
	   --with-x

override_dh_autoreconf:
	dh_autoreconf autoreconf -- -f -i src/

#mostly require remote access
override_dh_auto_test:

# install: build-arch
# 	dh_testdir -a
# 	dh_testroot -a
# 	dh_prep -a
# 	dh_installdirs -a

# #	Add here commands to install the package into debian/ecl
# 	$(MAKE) install prefix=$(CURDIR)/debian/ecl/usr

# #	remove rpath from /us/lib/ecl/ binaries (bug #495756)
# #	this is a workaround until upstream properly fixes it
# 	find $(CURDIR)/debian/ecl/usr/lib/ -name "*.fas" -print0 | \
# 	   xargs -0 chrpath -d
# 	chrpath -d $(CURDIR)/debian/ecl/usr/bin/ecl $(CURDIR)/debian/ecl/usr/lib/libecl.so.*

# 	cp debian/overrides.ecl $(CURDIR)/debian/ecl/usr/share/lintian/overrides/ecl
