diff options
Diffstat (limited to 'rules')
-rwxr-xr-x | rules | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -11,6 +11,15 @@ ifeq (,$(findstring noopt, ${DEB_BUILD_OPTIONS})) CFLAGS += -O2 endif +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + conf_args = --build $(DEB_BUILD_GNU_TYPE) +else + conf_args = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +endif + LC_COLLATE=C export LC_COLLATE @@ -38,8 +47,8 @@ build-stamp: configure: patch configure-stamp configure-stamp: cd $(BUILD_TREE) && \ - ./configure --sysconfdir=/etc --prefix=/usr --enable-static \ - --enable-shared \ + ./configure $(conf_args) \ + --sysconfdir=/etc --prefix=/usr --enable-static --enable-shared \ --mandir=/usr/share/man --infodir=/usr/share/info --libdir=/lib \ --sbindir=/sbin --enable-docdir=/usr/share/doc/libpam-doc \ --with-mailspool=/var/mail |