diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ext/dbm/extconf.rb | 11 |
2 files changed, 17 insertions, 0 deletions
@@ -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 |