[Patches] [Patch #101272] Allow bsddbmodule.c to compile with libdb 2.x w/o editing

noreply@sourceforge.net noreply@sourceforge.net
Wed, 30 Aug 2000 12:16:59 -0700


Patch #101272 has been updated. 

Project: 
Category: Modules
Status: Open
Summary: Allow bsddbmodule.c to compile with libdb 2.x w/o editing

Follow-Ups:

Date: 2000-Aug-23 19:22
By: montanaro

Comment:
Eric's been doing lots w/ libdb stuff lately.  I'll see if
he want's to check this patch out... ;-)

-------------------------------------------------------

Date: 2000-Aug-23 20:01
By: fdrake

Comment:
Update patch to also determine whether the bsddb module should be built at all automatically (adding a stanza to Setup.config.in and a comment to Setup.in).  This won't detect all cases automatically, but will catch it on platforms which have it installed as part of the base system (same as for the original patch).
-------------------------------------------------------

Date: 2000-Aug-23 20:02
By: fdrake

Comment:
I'd better note that this still needs testing on a system that only offers BSD db 1.85.
-------------------------------------------------------

Date: 2000-Aug-23 20:24
By: montanaro

Comment:
I'm afraid that's beyond my feeble autoconf/configure skills.
libdb.a is hardly installed in a standard location on all
systems.  The Setup.config.in line would be more involved
than

    @USE_BSDDB_MODULE@bsddb bsddbmodule.c -ldb

(though that would work on my Mandrake Linux system).  I
suspect many people still have to install libdb themselves,
so it could wind up just about anywhere.  You'd have to 
teach autoconf to reliably find libdb.a then add a line to
Setup.config.in that has the correct -L flag.

-------------------------------------------------------

Date: 2000-Aug-23 20:39
By: fdrake

Comment:
This is sufficient for all cases that the header detection can deal with.  We could (& perhaps should) add the necessary test to make sure -ldb works.

For BSD db installs that aren't picked up this way, the stanza in Setup.in remains, and can be edited in Setup or provided in Setup.local.
-------------------------------------------------------

Date: 2000-Aug-24 08:17
By: montanaro

Comment:
Okay, this patch goes a bit farther.  Here's a quick summary:

1. It adds a line to Modules/Setup.config.in for the bsddb
   module, prefixed with USE_BSDDB_MODULE.

2. Configure gains a --with-libdb flag.  If either
   --with-libdb is added to the command line or db.h is
   found, the bsddb module will be enabled.  Of course,
   running configure using --without-libdb will disable it.

3. There's a comment in Setup.in about the new way of
   enabling the bsddb module, but the old commented out
   lines are still there.

4. If db_185.h is found, it's included instead of db.h.
   Both #includes are protected by their relevant HAVE_*
   defines in Modules/bsddbmodule.c (or should I let the
   db.h include fail?).

5. No attempt is made to search for libdb.h.  It's assumed
   that if users install it in some odd location they will
   run configure with the --libdir and/or --includedir
   flags.

Still needs testing on a 1.85/1.86 libdb.

-------------------------------------------------------

Date: 2000-Aug-24 18:49
By: montanaro

Comment:
A new version of the patch to keep pace with other changes
to the configure.in file
-------------------------------------------------------

Date: 2000-Aug-30 12:16
By: gvanrossum

Comment:
For Fred to accept or check in.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101272&group_id=5470