From 2a87bee9f8e6bf325cd6525e6ac5cca58ac39586 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 17 Nov 2007 20:00:10 +0000 Subject: * Use autotools-dev's recommended configure --build and --host options. --- debian/rules | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 13363341e..14c10e7d1 100755 --- a/debian/rules +++ b/debian/rules @@ -12,6 +12,15 @@ else OPTFLAGS := -O0 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)) + confflags += --build=$(DEB_HOST_GNU_TYPE) +else + confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) +endif + DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) @@ -87,7 +96,7 @@ build-deb: build-deb-stamp build-deb-stamp: dh_testdir mkdir -p build-deb - cd build-deb && $(FORCE_LIBS) LDFLAGS='$(PIE_LDFLAGS)' ../configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUSER_PATH) --with-pam --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper --with-libedit --with-kerberos5=/usr --with-ssl-engine $(SELINUX) + cd build-deb && $(FORCE_LIBS) LDFLAGS='$(PIE_LDFLAGS)' ../configure $(confflags) --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUSER_PATH) --with-pam --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper --with-libedit --with-kerberos5=/usr --with-ssl-engine $(SELINUX) ifeq ($(DEB_HOST_ARCH_OS),linux) # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999). @@ -110,7 +119,7 @@ build-udeb: build-udeb-stamp build-udeb-stamp: dh_testdir mkdir -p build-udeb - cd build-udeb && $(FORCE_LIBS) ../configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --without-xauth --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper + cd build-udeb && $(FORCE_LIBS) ../configure $(confflags) --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --without-xauth --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper # Debian's /var/log/btmp has inappropriate permissions. perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-udeb/config.h # Avoid libnsl linkage. Ugh. -- cgit v1.2.3