From 42c0f9c63e2aa32d34b7dd1f996fb68834b5573a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 25 May 2005 13:47:55 +0000 Subject: Hurd fixes: - Link with -lcrypt. - Link with -lpthread rather than -pthread. --- debian/rules | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index a35beeae8..4e8117877 100755 --- a/debian/rules +++ b/debian/rules @@ -17,6 +17,7 @@ endif VERSION := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 | sed 's/.*://') DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null || dpkg-architecture -qDEB_HOST_GNU_SYSTEM) CLIENT_UDEB := openssh-client-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb SERVER_UDEB := openssh-server-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb @@ -43,6 +44,17 @@ PAMSUBST := yes PAMDEP := libpam-runtime endif +# The Hurd needs libcrypt for res_query et al. +ifeq ($(DEB_HOST_ARCH_OS),gnu) +FORCE_LIBS := LIBS=-lcrypt +endif + +ifeq ($(DEB_HOST_ARCH_OS),linux) +LINK_PTHREAD := -pthread +else +LINK_PTHREAD := -lpthread +endif + # Change the version string to include the Debian version SSH_EXTRAVERSION := Debian-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//') @@ -57,7 +69,7 @@ build-deb-stamp: # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999). perl -pi -e 's/.*#undef (BROKEN_SETRES[UG]ID).*/#define $$1 1/' build-deb/config.h # Supply pthread linkage for just those binaries linked to PAM. - perl -pi -e 's/^(LIBPAM=.*)/$$1 -pthread/' build-deb/Makefile + perl -pi -e 's/^(LIBPAM=.*)/$$1 $(LINK_PTHREAD)/' build-deb/Makefile $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='$(OPTFLAGS) -g -Wall -DUSE_POSIX_THREADS -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -DSSH_EXTRAVERSION="\" $(SSH_EXTRAVERSION)\""' SSH_KEYSIGN='/usr/lib/ssh-keysign' # Support building on Debian 3.0 (with GNOME 1.4) and later. -- cgit v1.2.3