From owner-cvs-all Wed Sep 13 19:43:34 2000 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 559C737B43C; Wed, 13 Sep 2000 19:43:26 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id NAA22853; Thu, 14 Sep 2000 13:43:01 +1100 Date: Thu, 14 Sep 2000 13:42:59 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Peter Wemm Cc: Gregory Neil Shapiro , "Steven E. Ames" , Gregory Neil Shapiro , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/sendmail Makefile In-Reply-To: <200009131756.e8DHutG95016@netplex.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 13 Sep 2000, Peter Wemm wrote: > Gregory Neil Shapiro wrote: > > steve> Am I missing something obvious? How do I add libraries (e.g. Cyrus SAS > L) > > steve> without modifying this Makefile (which is what I normally do)... I'm > > steve> maybe not seeing or understanding the hooks? > > > > Add this to /etc/make.conf: > > > > .if ${.CURDIR} == "/usr/src/usr.sbin/sendmail" > > CFLAGS+=-DSASL -I/usr/local/include/sasl > > LDADD+=-L/usr/local/lib -lsasl > > .endif > > Oh my, this is scarey. :-) This is just bogus :-). LDADD is not user servicable. Apart from conventional reasons, the library order may be important, and a single variable doesn't provide enough control. Setting LDADD without setting DPADD breaks dependencies. Use `make checkdpadd' to check that DPADD is consistent with LDADD. `make checkdpadd' doesn't understand -L in LDADD, so you have to use the full path to nonstandard libraries (static version) to quiet it. Authors of /etc/make.conf shouldn't have to know these details. > May I suggest something like this instead? > > Add SASL_PREFIX=/usr/local to /etc/make.conf > > and in the sendmail Makefile: > > .if defined(SASL_PREFIX) > CFLAGS+= -DSASL -I${SASL_PREFIX}/include/sasl > LDADD+= -L{$SASL_PREFIX}/lib -lsasl > .endif > > The user exposure is much smaller then. They just have to add the location > of the SASL stuff. This is OK except for the missing DPADD, use of -L, and a space instead of a tab after LDADD+=. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message