mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/dbm/extconf.rb: treat libc as a choice for a library which
provide ndbm API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3e5bff7ec1
commit
e8ca9cc343
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Nov 13 16:24:48 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/dbm/extconf.rb: treat libc as a choice for a library which
|
||||
provide ndbm API.
|
||||
|
||||
Sun Nov 13 15:40:43 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/dbm/extconf.rb: duplicate $libs and $defs when save them.
|
||||
|
|
|
@ -5,10 +5,11 @@ dir_config("dbm")
|
|||
if dblib = with_config("dbm-type", nil)
|
||||
dblib = dblib.split(/[ ,]+/)
|
||||
else
|
||||
dblib = %w(db db2 db1 db5 db4 db3 dbm gdbm gdbm_compat qdbm)
|
||||
dblib = %w(libc db db2 db1 db5 db4 db3 dbm gdbm gdbm_compat qdbm)
|
||||
end
|
||||
|
||||
headers = {
|
||||
"libc" => ["ndbm.h"],
|
||||
"db" => ["db.h"],
|
||||
"db1" => ["db1/ndbm.h", "db1.h", "ndbm.h"],
|
||||
"db2" => ["db2/db.h", "db2.h", "db.h"],
|
||||
|
@ -52,7 +53,8 @@ def headers.db_check2(db)
|
|||
|
||||
hdrs = self.fetch(db, ["ndbm.h"])
|
||||
if (hdr = hdrs.find {|h| have_type("DBM", h, hsearch)} || hdrs.find {|h| have_type("DBM", ["db.h", h], hsearch)}) and
|
||||
(have_library(db, 'dbm_open("", 0, 0)', hdr, hsearch) || have_func('dbm_open("", 0, 0)', hdr, hsearch)) and
|
||||
(db == 'libc' ? have_func('dbm_open("", 0, 0)', hdr, hsearch) :
|
||||
have_library(db, 'dbm_open("", 0, 0)', hdr, hsearch)) and
|
||||
have_func('dbm_clearerr((DBM *)0)', hdr, hsearch)
|
||||
if hsearch
|
||||
$defs << hsearch
|
||||
|
|
Loading…
Reference in a new issue