From 2b2ef5cfced1c06ceb9920afd6b24255510d4242 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 13 Nov 2011 03:47:07 +0000 Subject: * 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 --- ext/dbm/extconf.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ext/dbm') 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 -- cgit v1.2.3