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.
This commit is contained in:
parent
e13be40b88
commit
a57b89b492
|
@ -22,3 +22,6 @@
|
|||
|
||||
# bsddb module enabled by --with-libdb or presence of db.h
|
||||
@USE_BSDDB_MODULE@bsddb bsddbmodule.c @HAVE_LIBDB@
|
||||
|
||||
# dbm(3) may require -lndbm or similar
|
||||
@USE_DBM_MODULE@dbm dbmmodule.c @HAVE_LIBNDBM@
|
||||
|
|
|
@ -355,7 +355,10 @@ new newmodule.c
|
|||
# implementation independent wrapper for these; dumbdbm.py provides
|
||||
# similar functionality (but slower of course) implemented in Python.
|
||||
|
||||
# The standard Unix dbm module:
|
||||
# The standard Unix dbm module has been moved to Setup.config so that
|
||||
# it will be compiled as a shared library by default. Compiling it as
|
||||
# a built-in module causes conflicts with the pybsddb3 module since it
|
||||
# creates a static dependency on an out-of-date version of db.so.
|
||||
|
||||
#dbm dbmmodule.c # dbm(3) may require -lndbm or similar
|
||||
|
||||
|
|
|
@ -225,6 +225,9 @@
|
|||
/* Define if you want to use BSD db. */
|
||||
#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). */
|
||||
#undef WITH_NEXT_FRAMEWORK
|
||||
|
|
37
configure.in
37
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)
|
||||
|
|
Loading…
Reference in New Issue