tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (n)dbm option handling

On Thu, 25 Jun 2009 22:24:56 +0900, Edgar Fuà <> 

> I'm trying to build proper option support into wip/am-utils.
> There is a configure option to am-utils whether to use (n)dbm: apperantly it 
> can live with either gdbm, db1 or built-in dbm functions in libc.
> What's the correct way to handle this? I.e., given the option is set, how do 
> I find out whether I need to pull-in gdbm?

I don't test, but like a following?
But current databases/gdbm does not install gdbm_compat, so can't use as ndbm.
(I might ask on somewhere at sometime that gdbm_compat should be added as 
option for gdbm or separate package...)

.if exists(/usr/include/ndbm.h)
NDBM_TYPE=      builtin
CHECK_BUILTIN.db1:=     yes
.  include "../../mk/"
CHECK_BUILTIN.db1:=     no
.  if !empty(BUILTIN_FOUND.db1:M[yY][eE][sS])
NDBM_TYPE=      db1
.  else
NDBM_TYPE=      gdbm
.  endif

"Of course I love NetBSD":-)
OBATA Akio /

Home | Main Index | Thread Index | Old Index