|
Lines 863-869
class PyBuildExt(build_ext):
|
Link Here
|
|---|
|
| |
# The standard Unix dbm module: | # The standard Unix dbm module: |
if platform not in ['cygwin']: | if platform not in ['cygwin']: |
if find_file("ndbm.h", inc_dirs, []) is not None: |
if db_incs is not None: |
|
exts.append( Extension('dbm', ['dbmmodule.c'], |
|
library_dirs=dblib_dir, |
|
runtime_library_dirs=dblib_dir, |
|
include_dirs=db_incs, |
|
define_macros=[('HAVE_BERKDB_H',None), |
|
('DB_DBM_HSEARCH',None)], |
|
libraries=dblibs)) |
|
elif find_file("ndbm.h", inc_dirs, []) is not None: |
# Some systems have -lndbm, others don't | # Some systems have -lndbm, others don't |
if self.compiler.find_library_file(lib_dirs, 'ndbm'): | if self.compiler.find_library_file(lib_dirs, 'ndbm'): |
ndbm_libs = ['ndbm'] | ndbm_libs = ['ndbm'] |
|
Lines 877-890
class PyBuildExt(build_ext):
|
Link Here
|
|---|
|
exts.append( Extension('dbm', ['dbmmodule.c'], | exts.append( Extension('dbm', ['dbmmodule.c'], |
define_macros=[('HAVE_GDBM_NDBM_H',None)], | define_macros=[('HAVE_GDBM_NDBM_H',None)], |
libraries = ['gdbm'] ) ) | libraries = ['gdbm'] ) ) |
elif db_incs is not None: |
|
exts.append( Extension('dbm', ['dbmmodule.c'], |
|
library_dirs=dblib_dir, |
|
runtime_library_dirs=dblib_dir, |
|
include_dirs=db_incs, |
|
define_macros=[('HAVE_BERKDB_H',None), |
|
('DB_DBM_HSEARCH',None)], |
|
libraries=dblibs)) |
|
| |
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: | # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: |
if (self.compiler.find_library_file(lib_dirs, 'gdbm')): | if (self.compiler.find_library_file(lib_dirs, 'gdbm')): |