You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Doug MacEachern <do...@opengroup.org> on 1997/07/21 16:33:22 UTC

Re: [PATCH] linux: make use of TestLib

Dean Gaudet <dg...@arctic.org> wrote:

> Jim I wasn't sure how you wanted us to use helpers/TestLib ... so I've
> made changes below to use it the way I thought it should be used... tell
> me if you like 'em or not.
> 
> The rest of this cleans up the multiple linux targets.  It tests for
> -lcrypt.  It also finds the appropriate db or dbm libraries. 
> 
> Note that I still think it's kind of bunk to automatically select one db
> lib over another without providing the user a method of overriding it.
> 
> Also, support/dbmmanage needs something like "use DB_File;", or "use
> GDBM_File", or whatever added to it by Configure.  I'm sure the perl
> weenies can tell us what the correct thing is ;)  There's a PR on this
> topic, I think it's been changed to the documentation category. 

well, something like:
 
@AnyDBM_File::ISA = {
    -lgdbm => "GDBM_File",
    -ldb   => "DB_File",
    -lndbm => "NDBM_File",
}->{$DBM_LIB};

dbmopen ...;
or
tie %DB, "AnyDBM_File", ...

would do the trick, the question is, how does dbmmanage know what
$DBM_LIB is.  

Based on the order in your patch, this should work:

use Config;

for (qw(-ldb -lndbm -lgdbm)) {
    $DBM_LIB = $1, last if $Config{libs} =~ /($_)/;
}

Or, you could have Configure modify dbmmanage I suppose (ick).

-Doug