]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Link the dbm module against gdbm if it exists and if no earlier
authorBarry Warsaw <barry@python.org>
Thu, 22 May 2003 17:36:54 +0000 (17:36 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 22 May 2003 17:36:54 +0000 (17:36 +0000)
library match was found.  This fixes dbm on RedHat 9 and doesn't
appear (so far <wink>) to have any regressions on other *nixes.

setup.py

index 3210a690dfdecece4230961cca8f9625893d2407..ae2ef0a06eb0f4835815b1d2f2095d0e6075c24d 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -406,6 +406,9 @@ class PyBuildExt(build_ext):
             elif self.compiler.find_library_file(lib_dirs, 'db1'):
                 exts.append( Extension('dbm', ['dbmmodule.c'],
                                        libraries = ['db1'] ) )
+            elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
+                exts.append( Extension('dbm', ['dbmmodule.c'],
+                                       libraries = ['gdbm'] ) )
             else:
                 exts.append( Extension('dbm', ['dbmmodule.c']) )