summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-01-15 17:07:21 (GMT)
committerBarry Warsaw <barry@python.org>2001-01-15 17:07:21 (GMT)
commita57b89b4926bf49052ebd8a6401059e0a5368139 (patch)
tree3819ce08f5a1f6edd16efcb3e9af096ed4d12023 /configure.in
parente13be40b889619af8c26d7d19e924e7babcbb683 (diff)
downloadcpython-a57b89b4926bf49052ebd8a6401059e0a5368139.zip
cpython-a57b89b4926bf49052ebd8a6401059e0a5368139.tar.gz
cpython-a57b89b4926bf49052ebd8a6401059e0a5368139.tar.bz2
Committing patch #103216, autodetect of dbmmodule support and building
of dbmmodule dynamically by default (otherwise it can pull in dependencies with libdb that croak pybsddb3). This change moves the Setup line for dbmmodule to Setup.config.in.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in37
1 files changed, 37 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 898e811..8fa11e8 100644
--- a/configure.in
+++ b/configure.in
@@ -888,6 +888,43 @@ else
fi
AC_MSG_RESULT($with_cycle_gc)
+# Check for DBM support
+AC_SUBST(USE_DBM_MODULE)
+USE_DBM_MODULE=""
+AC_MSG_CHECKING(for --with-dbm)
+AC_ARG_WITH(dbm,
+[ --with(out)-dbm disable/enable dbm module])
+
+# enabled by default but one of the dbm.h files must be found
+if test "$ac_cv_header_dbm_h" = "yes" -o "$ac_cv_header_db1_ndbm_h" = "yes" -o "$ac_cv_header_gdbm_ndbm_h" = "yes"
+then
+ if test "$with_dbm" != "no"
+ then with_dbm="yes"
+ fi
+else
+ # make sure user knows why dbm support wasn't enabled even though
+ # s/he requested it
+ if test "$with_dbm" = "yes"
+ then echo $ac_n "(requested by no ndbm.h was found) $ac_c"
+ fi
+ with_dbm="no"
+fi
+
+if test "$with_dbm" = "no"
+then
+ USE_DBM_MODULE="#"
+else
+ AC_DEFINE(WITH_LIBNDBM)
+fi
+AC_MSG_RESULT($with_dbm)
+
+if test "$with_dbm" = "yes"
+then
+ # check for libndbm
+ AC_SUBST(HAVE_LIBNDBM)
+ AC_CHECK_FUNC(dbmopen, [HAVE_LIBNDBM=], [HAVE_LIBNDBM=-lndbm])
+fi
+
# Check for LIBDB support
# either --with-libdb or, in its absence, the presence of db.h
AC_SUBST(USE_BSDDB_MODULE)