summaryrefslogtreecommitdiff
path: root/ext/dbm/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dbm/extconf.rb')
-rw-r--r--ext/dbm/extconf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 19bfc1f6d3..41996c417c 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -34,6 +34,7 @@ def db_check(db)
for hdr in $dbm_conf_headers.fetch(db, ["ndbm.h"])
if have_header(hdr.dup) and have_type("DBM", hdr.dup, hsearch)
$defs << hsearch << '-DDBM_HDR="<'+hdr+'>"'
+ p $defs
return true
end
end
@@ -55,7 +56,7 @@ end
have_header("cdefs.h")
have_header("sys/cdefs.h")
-if /DBM_HDR/ =~ $CFLAGS and have_func(db_prefix("dbm_open"))
+if /DBM_HDR/ =~ $defs.join(" ") and have_func(db_prefix("dbm_open"))
have_func(db_prefix("dbm_clearerr")) unless $dbm_conf_have_gdbm
create_makefile("dbm")
end