--- rules.orig  2013-07-11 15:39:41.000000000 +0800
+++ rules       2013-08-17 00:30:20.472302468 +0800
@@ -7,6 +7,8 @@
 # needed for correct building of new texinfo
 DEB_CFLAGS_MAINT_STRIP=-Werror=format-security
 
+DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
 texinfo := $(CURDIR)/debian/texinfo
 ii := $(CURDIR)/debian/install-info
 tmpdir := $(CURDIR)/debian/tmp
@@ -21,14 +23,17 @@
          --with-external-Text-Unidecode=yes \
          --with-external-libintl-perl=yes \
          --prefix=/usr \
-          --infodir='$${prefix}/share/info' --mandir='$${prefix}/share/man'
+          --infodir='$${prefix}/share/info' --mandir='$${prefix}/share/man' \
+         --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
        $(MAKE)
        touch $@
 
 check-stamp: build-stamp
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        $(MAKE) check ALL_TESTS=yes
 endif
+endif
        touch $@
 
 clean:
