#!/usr/bin/make -f
# -*- makefile-gmake -*-
#export DH_VERBOSE=1
#export DH_OPTIONS=
export GZIP=-9

%:
	dh $@ --with quilt

override_dh_auto_clean:
	dh_auto_clean
	rm -f configure config.sub config.guess
	rm -f lib/gauche/config.scm
#	rm -f gc/configure gc/Makefile.in

override_dh_auto_configure:
	ln -sf /usr/share/misc/config.sub .
	ln -sf /usr/share/misc/config.guess .
	autoconf
#	(cd gc; autoconf; automake)
	dh_auto_configure -- --enable-multibyte=utf-8 --enable-ipv6 --enable-threads=pthreads --with-slib=/usr/share/slib EXTRA_TEST_LIBS=-lpthread

override_dh_auto_install:
	make DESTDIR=$(CURDIR)/debian/tmp slibcat-in-place install-pkg install-doc
	chmod +x $(CURDIR)/debian/tmp/usr/share/gauche-0.9/[0-9]*/template.DIST
