Index: setup.py =================================================================== --- setup.py (revision 67462) +++ setup.py (working copy) @@ -1024,6 +1024,11 @@ exts.append( Extension('dbm', ['dbmmodule.c'], define_macros=[('HAVE_GDBM_NDBM_H',None)], libraries = ['gdbm'] ) ) + elif (self.compiler.find_library_file(lib_dirs, 'gdbm') + and find_file("gdbm-ndbm.h", inc_dirs, []) is not None): + exts.append( Extension('_dbm', ['_dbmmodule.c'], + define_macros=[('HAVE_GDBM_DASH_NDBM_H',None)], + libraries = ['gdbm'] ) ) elif db_incs is not None: exts.append( Extension('dbm', ['dbmmodule.c'], library_dirs=dblib_dir, Index: Modules/_dbmmodule.c =================================================================== --- Modules/_dbmmodule.c (revision 67462) +++ Modules/_dbmmodule.c (working copy) @@ -21,6 +21,9 @@ #elif defined(HAVE_GDBM_NDBM_H) #include static char *which_dbm = "GNU gdbm"; +#elif defined(HAVE_GDBM_DASH_NDBM_H) +#include +static char *which_dbm = "GNU gdbm"; #elif defined(HAVE_BERKDB_H) #include static char *which_dbm = "Berkeley DB";