Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2003 15:55:27 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        "Ilmar S. Habibulin" <ilmar@watson.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: How to use functions from libs in /usr/local/lib in pam?
Message-ID:  <20030721125527.GC95314@sunbay.com>
In-Reply-To: <20030721043657.X96418@fledge.watson.org>
References:  <20030721071842.GC58121@cobweb.example.org> <20030721043657.X96418@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Mon, Jul 21, 2003 at 04:42:12AM -0400, Ilmar S. Habibulin wrote:
> 
> I'm trying to write pam module, which uses libs from /usr/local/lib (lber
> and lsap). What should i put in Makefile in order to link module with this
> libs?
> 
> LIBLDAP= /usr/local/lib/ldap.a
> 
> LDADD+= -L/usr/local/lib -lldap
> LDFLAGS += -L/usr/local/lib -lldap
> DPADD= ${LIBCRYPT} ${LIBLDAP}
> 
> doesn't help.
> 
The library should be named /usr/local/lib/libldap.a at the minimum,
to make -lldap work.  Also, -L should be taken out of LDADD, and be
put only in LDFLAGS, so it should look like this:

LIBLDAP=	/usr/local/lib/libldap.a
DPADD=		${LIBCRYPT} ${LIBLDAP}
LDADD=		-lcrypt -lldap
LDFLAGS=	-L/usr/local/lib


Cheers,
-- 
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software Ltd,
ru@FreeBSD.org		FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD4DBQE/G+K/Ukv4P6juNwoRAgsxAJ0TuWS6OzebTKnoiOCNNzNqYZDsaACY4fpa
lYdVZEMT2cAlF3YtB86TRw==
=oSXy
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030721125527.GC95314>