[Python-checkins] CVS: python/dist/src config.h.in,2.84,2.85 configure,1.179,1.180 configure.in,1.187,1.188

Barry Warsaw python-dev@python.org
Mon, 15 Jan 2001 09:07:23 -0800


Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv1446

Modified Files:
	config.h.in configure configure.in 
Log Message:
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.


Index: config.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/config.h.in,v
retrieving revision 2.84
retrieving revision 2.85
diff -C2 -r2.84 -r2.85
*** config.h.in	2001/01/10 21:09:12	2.84
--- config.h.in	2001/01/15 17:07:15	2.85
***************
*** 226,229 ****
--- 226,232 ----
  #undef WITH_LIBDB
  
+ /* Define if you want to use ndbm. */
+ #undef WITH_LIBNDBM
+ 
  /* Define if you want to produce an OpenStep/Rhapsody framework
     (shared library plus accessory files). */

Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.179
retrieving revision 1.180
diff -C2 -r1.179 -r1.180
*** configure	2001/01/10 21:41:14	1.179
--- configure	2001/01/15 17:07:20	1.180
***************
*** 41,44 ****
--- 41,46 ----
    --with(out)-cycle-gc            disable/enable garbage collection"
  ac_help="$ac_help
+   --with(out)-dbm                 disable/enable dbm module"
+ ac_help="$ac_help
    --with(out)-libdb               disable/enable bsddb module"
  ac_help="$ac_help
***************
*** 576,580 ****
  
[...4222 lines suppressed...]
  
  echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
! echo "configure:6161: checking for Modules/Setup" >&5
  if test ! -f Modules/Setup ; then
      if test ! -d Modules ; then
--- 6253,6257 ----
  
  echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
! echo "configure:6256: checking for Modules/Setup" >&5
  if test ! -f Modules/Setup ; then
      if test ! -d Modules ; then
***************
*** 6338,6341 ****
--- 6433,6438 ----
  s%@LDLAST@%$LDLAST%g
  s%@USE_GC_MODULE@%$USE_GC_MODULE%g
+ s%@USE_DBM_MODULE@%$USE_DBM_MODULE%g
+ s%@HAVE_LIBNDBM@%$HAVE_LIBNDBM%g
  s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
  s%@HAVE_LIBDB@%$HAVE_LIBDB%g

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.187
retrieving revision 1.188
diff -C2 -r1.187 -r1.188
*** configure.in	2001/01/10 21:41:16	1.187
--- configure.in	2001/01/15 17:07:21	1.188
***************
*** 889,892 ****
--- 889,929 ----
  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