[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Patch to build db in the src dir (#2)

From: Mo DeJong <mdejong_at_cygnus.com>
Date: 2001-04-22 01:09:44 CEST

Here is my second attempt at a patch to allow building
of berkeley db from the toplevel subversion script.
This patch will run configure in the ./db directory
if one is found. If there is no db directory in the
source tree it will default to the existing search
for known install locations. You can of course
override this with a --with-berkeley-db option.
I also added the URL of the berkeley db download
to the warning message printed when the search fails.

Here is what gets printed:

/home/mo/project/subversion/configure --disable-shared --enable-debug
...
checking for built-in Berkeley DB... no
checking for Berkeley DB in the standard places... no
checking for Berkeley DB in /usr/local/include/db3 and /usr/local/lib... no
checking for Berkeley DB in /usr/local... no
checking for Berkeley DB in /usr/local/BerkeleyDB.3.2... no
...

configure: warning: we have configured for a client-only build

the Subversion filesystem library, part of
the server, requires Berkeley DB version 3.2.9 or newer, which you
don't seem to have installed. We have created makefiles which will
build the Subversion client code only, and skip the server.
You can find the latest version of Berkeley DB here:
http://www.sleepycat.com/update/3.2.9/db-3.2.9.tar.gz

The patch is appended
Mo

Index: Makefile.am
===================================================================
RCS file: /cvs/subversion/Makefile.am,v
retrieving revision 1.17
diff -u -r1.17 Makefile.am
--- Makefile.am 2001/02/05 19:21:25 1.17
+++ Makefile.am 2001/04/21 22:51:01
@@ -8,7 +8,7 @@
 ## dependencies between Makefile.am, Makefile.in, and Makefile.
 ## In other words, SUBDIRS does not completely control automake
 ## generation.
-SUBDIRS = apr expat-lite neon subversion doc
+SUBDIRS = apr expat-lite neon @DB_SUBDIR@ subversion doc
 
 ACLOCAL = @ACLOCAL@ -I ac-helpers
 
Index: configure.in
===================================================================
RCS file: /cvs/subversion/configure.in,v
retrieving revision 1.80
diff -u -r1.80 configure.in
--- configure.in 2001/04/17 21:13:49 1.80
+++ configure.in 2001/04/21 22:51:02
@@ -44,6 +44,17 @@
 if test "$enable_subdir_config" = "yes"; then
   APR_SUBDIR_CONFIG(apr)
   APR_SUBDIR_CONFIG(neon, --with-expat="$abs_srcdir/expat-lite/libexpat.la")
+
+ if test -d $abs_srcdir/db ; then
+ DB_CONFIG_ARGS=
+ # Note: DB_SUBDIR is used in subversion/Makefile.am only
+ DB_SUBDIR=db/dist
+
+ # Note: We have to configure and build a db subdirectory even if
+ # some other berkeley db is configured via --with-berkeley-db
+ APR_SUBDIR_CONFIG($DB_SUBDIR, $DB_CONFIG_ARGS)
+ fi
+ AC_SUBST(DB_SUBDIR)
 fi
 
 
@@ -279,7 +290,9 @@
 the server, requires Berkeley DB version 3.2.9 or newer, which you
 don't seem to have installed. We have created makefiles which will
 build the Subversion client code only, and skip the server.
-You can find latest version of Berkeley DB at http://www.sleepycat.com.])
+You can find the latest version of Berkeley DB here:
+http://www.sleepycat.com/update/3.2.9/db-3.2.9.tar.gz
+])
   ;;
 esac
 
Index: ac-helpers/berkeley-db.m4
===================================================================
RCS file: /cvs/subversion/ac-helpers/berkeley-db.m4,v
retrieving revision 1.7
diff -u -r1.7 berkeley-db.m4
--- ac-helpers/berkeley-db.m4 2001/03/13 03:25:43 1.7
+++ ac-helpers/berkeley-db.m4 2001/04/21 22:51:02
@@ -58,7 +58,8 @@
            The Subversion server requires Berkeley DB 3.2.9 or newer. If
            you specify \`--without-berkeley-db', the server will not be
            built. Otherwise, the configure script builds the server if and
- only if it can find a new enough version installed.],
+ only if it can find a new enough version installed or if a copy
+ of Berkeley DB exists in the subversion tree.],
   [
     if test "$withval" = "yes"; then
       status=required
@@ -71,11 +72,32 @@
     fi
   ],
   [
- status=if-found
- places=search
+ # No --with-berkeley-db option:
+ #
+ # Check to see if a db directory exists in the build directory.
+ # If it does then we will be using the berkeley DB version
+ # from the source tree. We can't test it since it is not built
+ # yet, so we have to assume it is the correct version.
+
+ AC_MSG_CHECKING([for built-in Berkeley DB])
+
+ if test -d db ; then
+ status=builtin
+ AC_MSG_RESULT([yes])
+ else
+ status=if-found
+ places=search
+ AC_MSG_RESULT([no])
+ fi
   ])
 
- if test "$status" = "skip"; then
+ if test "$status" = "builtin"; then
+ # Use the include and lib files in the build dir.
+ dbdir=`cd db/dist ; pwd`
+ CPPFLAGS="$CPPFLAGS -I$dbdir"
+ LIBS="$LIBS -L$dbdir -ldb"
+ svn_lib_berkeley_db=yes
+ elif test "$status" = "skip"; then
     svn_lib_berkeley_db=no
   else
Received on Sat Oct 21 14:36:29 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.