summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog6
-rw-r--r--ext/dbm/extconf.rb11
2 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ec6549b51..8b84a003ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Nov 13 12:43:48 2011 Tanaka Akira <akr@fsij.org>
+
+ * 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.
+
Sat Nov 12 21:14:51 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* test/webrick/test_cgi.rb (class TestWEBrickCGI): respect
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index b46688aa75..f8139495d3 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