[Python-checkins] CVS: python/dist/src acconfig.h,1.36,1.37 configure.in,1.151,1.152

Fred L. Drake python-dev@python.org
Thu, 31 Aug 2000 09:11:10 -0700


Update of /cvsroot/python/python/dist/src
In directory slayer.i.sourceforge.net:/tmp/cvs-serv7894

Modified Files:
	acconfig.h configure.in 
Log Message:

Skip Montanaro <skip@mojam.com>:
Update the build structures to automatically detect the presence of BSD db,
including the proper name of the header file to include.  Has all the
expected niceties associated with yet-more-configure-options.  ;)

This checkin includes changes for non-generated files only; subsequent
checkin will catch those.

This is part of SourceForge patch #101272.


Index: acconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/acconfig.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** acconfig.h	2000/08/30 22:29:47	1.36
--- acconfig.h	2000/08/31 16:11:07	1.37
***************
*** 152,155 ****
--- 152,158 ----
  #undef WITH_NEXT_FRAMEWORK
  
+ /* Define if you want to use BSD db. */
+ #undef WITH_LIBDB
+ 
  /* Define if you want to build an interpreter with many run-time checks  */
  #undef Py_DEBUG

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.151
retrieving revision 1.152
diff -C2 -r1.151 -r1.152
*** configure.in	2000/08/30 22:29:48	1.151
--- configure.in	2000/08/31 16:11:07	1.152
***************
*** 370,374 ****
  AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
  signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
! sys/audioio.h sys/file.h sys/lock.h \
  sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
  sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h)
--- 370,374 ----
  AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
  signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
! sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
  sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
  sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h)
***************
*** 812,815 ****
--- 812,839 ----
  fi
  AC_MSG_RESULT($with_cycle_gc)
+ 
+ # Check for LIBDB support
+ # either --with-libdb or, in its absence, the presence of db.h
+ AC_SUBST(USE_BSDDB_MODULE)
+ USE_BSDDB_MODULE=""
+ AC_MSG_CHECKING(for --with-libdb)
+ AC_ARG_WITH(libdb,
+ [  --with(out)-libdb               disable/enable bsddb module])
+ 
+ # default is enabled
+ if test -z "$with_libdb"
+ then with_libdb="yes"
+ fi
+ # if we found db.h, enable, unless with_libdb is expressly set to "no"
+ if test "$ac_cv_header_db_h" = "yes" -a "$with_libdb" != "no"
+ then with_libdb="yes"
+ fi
+ if test "$with_libdb" = "no"
+ then
+     USE_BSDDB_MODULE="#"
+ else
+     AC_DEFINE(WITH_LIBDB)
+ fi
+ AC_MSG_RESULT($with_libdb)
  
  # Check for --with-wctype-functions