summaryrefslogtreecommitdiff
path: root/ext/dbm
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-13 03:47:07 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-13 03:47:07 +0000
commit2b2ef5cfced1c06ceb9920afd6b24255510d4242 (patch)
treeb6656bc4b4609d0eef76ae3cf1deb11efe14bfba /ext/dbm
parentd3fc4ae7cb4ace087eef327bd19fa5fe957c745a (diff)
* ext/dbm/extconf.rb: rollback $libs and $defs when db detection is
failed. It fixes -lgdbm -lqdbm when the system has qdbm and gdbm without gdbm_compat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm')
-rw-r--r--ext/dbm/extconf.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index b46688a..f813949 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -29,6 +29,17 @@ headers.found = []
headers.defs = nil
def headers.db_check(db)
+ old_libs = $libs
+ old_defs = $defs
+ result = db_check2(db)
+ if !result
+ $libs = old_libs
+ $defs = old_defs
+ end
+ result
+end
+
+def headers.db_check2(db)
hsearch = nil
case db