diff -urN Modules/_dbmmodule.c Modules/_dbmmodule.c --- Modules/_dbmmodule.c 2008-11-25 19:19:17.000000000 +0000 +++ Modules/_dbmmodule.c 2008-12-04 22:24:17.000000000 +0000 @@ -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"; diff -urN setup.py setup.py --- setup.py 2008-11-04 20:45:29.000000000 +0000 +++ setup.py 2008-12-04 23:40:45.000000000 +0000 @@ -788,6 +788,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_compat') + 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_compat'] ) ) elif db_incs is not None: exts.append( Extension('_dbm', ['_dbmmodule.c'], library_dirs=dblib_dir,