From: Andreas Metzler <[email protected]>

Invoke ./configure mit correct --build argument, as per
/usr/share/doc/autotools-dev/README.Debian.gz.
---
 debian/changelog |    2 ++
 debian/rules     |   16 +++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6eb124d..f55964b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ wmaker (0.92.0-9) unstable; urgency=low
       debhelper-but-no-misc-depends)
     + [debian/control] Move homepage from description text to homepage
       field. (Lintian description-contains-homepage)
+  * Invoke ./configure mit correct --build argument, as per
+     /usr/share/doc/autotools-dev/README.Debian.gz.
 
  -- Andreas Metzler <[email protected]>  Sat, 07 Aug 2010 10:56:00 +0200
 
diff --git a/debian/rules b/debian/rules
index d9c3ede..63e43e4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,6 +21,19 @@ ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 CFLAGS += -DDEBUG
 endif
 
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+export DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+       HOSTSPEC := --build $(DEB_HOST_GNU_TYPE)
+else
+       HOSTSPEC := --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+
+
 LINGUAS           := $(patsubst po/%.po, %, $(wildcard po/*.po))
 #LINGUAS           := $(filter-out zh_TW.Big5, $(LINGUAS))
 
@@ -42,7 +55,8 @@ XINERAMA        := --enable-xinerama
 
 WMAKER_OPTIONS := $(XLOCALE) $(MODELOCK) $(XINERAMA) \
        $(USERMENU) $(SHAPE_EXT) $(USE_SHM) \
-       $(USE_XPM) $(USE_PNG) $(USE_JPEG) $(USE_GIF) $(USE_TIFF)
+       $(USE_XPM) $(USE_PNG) $(USE_JPEG) $(USE_GIF) $(USE_TIFF) \
+       $(HOSTSPEC)
 
 TOPSRCDIR         := $(shell pwd)
 DEBTMPDIR         := $(TOPSRCDIR)/debian/wmaker
-- 
1.7.1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to