Bug 47572

Summary: It would be nice if apr configure --with-dbm=xdbm would imply --with-xdbm
Product: APR Reporter: Dan Poirier <poirier>
Component: APRAssignee: Apache Portable Runtime bugs mailinglist <bugs>
Status: NEW ---    
Severity: enhancement CC: bojan, poirier
Priority: P5 Keywords: PatchAvailable
Version: HEAD   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Patch to enable --with-gdbm if --with-dbm=gdbm was requested

Description Dan Poirier 2009-07-24 06:29:30 UTC
When I configure apr to use gdbm:

./configure --with-dbm=gdbm

but forget to include --with-gdbm, then apr gets built in a way that requires apr_gdbm, but doesn't build apr_gdbm.  The result is that code that tries to use apr_dbm, e.g. htdbm, fails.

It would be nice if specifying --with-dbm=gdbm would automatically add --with-gdbm, or at least result in an error if --with-gdbm wasn't specified.

I assume the same occurs with other choices for --with-dbm, but haven't checked yet.

I'll look into this further when I have time, but I'm a novice with autoconf, so if someone who knows this area better wants to look at it, that's fine with me.
Comment 1 Dan Poirier 2009-08-10 09:25:53 UTC
Created attachment 24123 [details]
Patch to enable --with-gdbm if --with-dbm=gdbm was requested

Here's a patch that seems to do what I would like.  An alternative would be to fail the configure if --with-dbm=gdbm was requested and it didn't find gdbm, whether because no --with-gdbm was given or it's just not installed.  I'm open to advice on which fits better with the usual practice for autoconf.