apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blai...@cnet.com (Blaise Tarr)
Subject Re: [PATCH] apu-conf (fix for Berkeley DB)
Date Tue, 04 Dec 2001 20:12:14 GMT
Justin Erenkrantz writes:
 > On Mon, Dec 03, 2001 at 09:11:37PM -0600, cmpilato@collab.net wrote:
 > > Justin Erenkrantz <jerenkrantz@ebuilt.com> writes:
 > > 
 > > > > how about we add 2 new config options
 > > > > --with-berkeley-db-include
 > > > > --with-berkeley-db-lib
 > > > > and let the user specify?
 > > > 
 > > > I'd rather not force the user to manually specify it if at all
 > > > possible.  What's wrong with that snippet?  First check to
 > > > see if libdb2 exists - if not, then try libdb.  We really ought
 > > > to check for db2/db.h as well (then try db.h).  -- justin
 > > 
 > > Just my $.02 worth.  Subversion, which requires Berkeley DB 3.3.11,
 > > will check your system in All The Usual Places for such, but we also
 > > allow a --with-berkeley-db option to configure.
 > 
 > Right, I'm not particularly against that config option, but I
 > am against us not looking in "All The Usual Places" first.  We
 > can only look at so many places, but I think it is reasonable
 > to look in db2/db.h and check for libdb2.so.  My $.02.  -- justin

And there is also db3, so you'd need to check db3/db.h...

I would warmly welcome a way to specify the location of Berkeley DB
headers and libs as it would be more elegant than appending paths to
CPPFLAGS and LDFLAGS.  In addition, optionally specifying the name of
the Berkeley DB library would be especially helpful on systems with
multiple Berkeley DB installations.  The name of the lib is not
guaranteed to be libdb$version.(so|a).  For example, the latest
Mandrake and RedHat RPMs have libdb-3.3.so.  In many cases
/lib/libdb.so is a symlink, but with multiple versions installed, you
can't tell which version it refers to.

In the current apu-conf.m4, detecting DB3 fails since in version 3
there is no db_open() as it has been replaced with db_create().

Also, I don't think detecting db_185.h is necessary.  db_185.h is the
compatibility API header for versions 2 and 3, so its existance
implies that DB2 or DB3 is installed.  Databases created using the
1.85 compatilibity API are still version 2 or 3 databases, not 1.85.

Blaise

Mime
View raw message