Subject: Re: problems building openldap
To: Steven M. Bellovin <smb@research.att.com>
From: Gavan Fantom <gavan@coolfactor.org>
List: tech-pkg
Date: 11/29/2004 01:02:59
On Sun, 28 Nov 2004, Steven M. Bellovin wrote:

> I did that; it compiled successfully.  I wouldn't have guessed at your
> observation; I was puzzled enough afterwards when I saw that pkg_info
> listed db4 as a dependency, when it hadn't built it automatically the
> first time...

Further analysis:

From databases/openldap/options.mk (included from Makefile):

.if !empty(PKG_OPTIONS:Mbdb)
BDB_ACCEPTED=           db4 # db3?
.  include "../../mk/bdb.buildlink3.mk"
CONFIGURE_ARGS+=        --enable-bdb --enable-hdb
.  if !empty(PKG_OPTIONS:Mdynamic)
CONFIGURE_ARGS+=        --enable-hdb=mod
.  endif
.else
CONFIGURE_ARGS+=        --disable-bdb --disable-hdb
.endif

OK, so db4 is required, and mk/bdb.buildlink3.mk is included, which makes 
the right choices and brings in the db4 package.

Except if mk/bdb.buildlink3.mk has already been included, in which case it 
changes nothing. kde pulls in heimdal's buildlink3.mk, which includes... 
mk/bdb.buildlink3.mk. At the point that it's pulled in by heimdal, 
BDB_ACCEPTED hasn't been set, so it defaults to db1.

-- 
Gillette - the best a man can forget