Issue #15044: Handle Fedora 17's approach to ndbm compatibility (backport from 3.x)
authorNick Coghlan <ncoghlan@gmail.com>
Sun, 17 Jun 2012 08:35:39 +0000 (18:35 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Sun, 17 Jun 2012 08:35:39 +0000 (18:35 +1000)
setup.py

index 064bbc0f08b0fb20bca86d91709cf8991dd636fd..a939b73eda4436aa5e245b6a89e0f55109070fb2 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1158,10 +1158,14 @@ class PyBuildExt(build_ext):
             for cand in dbm_order:
                 if cand == "ndbm":
                     if find_file("ndbm.h", inc_dirs, []) is not None:
-                        # Some systems have -lndbm, others don't
+                        # Some systems have -lndbm, others have -lgdbm_compat,
+                        # others don't have either
                         if self.compiler.find_library_file(lib_dirs,
                                                                'ndbm'):
                             ndbm_libs = ['ndbm']
+                        elif self.compiler.find_library_file(lib_dirs,
+                                                             'gdbm_compat'):
+                            ndbm_libs = ['gdbm_compat']
                         else:
                             ndbm_libs = []
                         print "building dbm using ndbm"