summaryrefslogtreecommitdiff
path: root/ext/dbm
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-24 15:55:40 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-24 15:55:40 +0000
commitdcd6223c648d1c6834873b69b9293e5b53258d5b (patch)
tree53cd7442ca60d3feb9f44f406698d163f9f70b2e /ext/dbm
parent79f2ee2f0411c1d10ceefc869a32925d39171b1a (diff)
* ext/dbm/extconf.rb: fix support for *BSD and set $CFLAGS
properly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm')
-rw-r--r--ext/dbm/extconf.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 1c1abd0..0655625 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -6,7 +6,7 @@ dblib = with_config("dbm-type", nil)
$dbm_conf_headers = {
"db" => ["db.h"],
- "db1" => ["db1/ndbm.h", "db1.h"],
+ "db1" => ["db1/ndbm.h", "db1.h", "ndbm.h"],
"db2" => ["db2/db.h", "db2.h", "db.h"],
"dbm" => ["ndbm.h"],
"gdbm" => ["gdbm-ndbm.h", "gdbm.h"],
@@ -28,12 +28,10 @@ def db_check(db)
if have_func(db_prefix("dbm_open")) || have_library(db, db_prefix("dbm_open"))
for hdr in $dbm_conf_headers.fetch(db, ["ndbm.h"])
if have_header(hdr.dup)
- $CFLAGS = "-DDBM_HDR='<"+hdr+">'"
- break
+ $CFLAGS += " " + hsearch + "-DDBM_HDR='<"+hdr+">'"
+ return true
end
end
- $CFLAGS = hsearch + "-DDBM_HDR='<"+hdr+">'"
- return true
end
return false
end