зеркало из https://github.com/github/ruby.git
* ext/dbm/extconf.rb: fix for FreeBSD and GDBM.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
13cbec33c1
Коммит
581f7b863b
|
@ -2,20 +2,21 @@ require 'mkmf'
|
|||
|
||||
dir_config("dbm")
|
||||
|
||||
$db_hdr = "ndbm.h"
|
||||
$db_prefix = ""
|
||||
dblib = with_config("dbm-type", nil)
|
||||
|
||||
def db_check(db)
|
||||
if /^db2?$/ =~ db
|
||||
$db_hdr = "ndbm.h"
|
||||
$db_prefix = ""
|
||||
|
||||
case db
|
||||
when /^db2?$/
|
||||
$db_prefix = "__db_n"
|
||||
$db_hdr = db+".h"
|
||||
end
|
||||
r = have_library(db, db_prefix("dbm_open"))
|
||||
if db == "gdbm"
|
||||
when "gdbm"
|
||||
$have_gdbm = true
|
||||
end
|
||||
return r
|
||||
|
||||
have_func(db_prefix("dbm_open")) || have_library(db, db_prefix("dbm_open"))
|
||||
end
|
||||
|
||||
def db_prefix(func)
|
||||
|
|
Загрузка…
Ссылка в новой задаче