Hi folks (first post! ;-)
I've tried to build Subversion from the current CVS tree a couple
times now, but unsuccessfully.
The problem is that Debian unstable has the Berkeley DB 3 as libdb3
instead of libdb (this is done so 2 and 3 can both be installed at the
same time).
I've hacked the db 3 test to allow for that. The patch is below (hope
it goes through mime-mangling o.k.)
It's pretty.. but at least one can build current subversion from CVS
on a Debian unstable system!
And yes, I agree the duplicate SVN_LIB_BERKELEY_DB_TRY is ugly (I
*said* it's ugly, okay? ;-)
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/01 22:38:53
@@ -39,6 +39,9 @@
dnl A `place spec' is either:
dnl - the string `std', indicating that we should look for headers and
dnl libraries in the standard places,
+ dnl - the string `std3', indicating that we should look for headers and
+ dnl libraries in the standard places, but use -ldb3 (for libdb3.*)
+ dnl instead of -ldb
dnl - a directory prefix P, indicating we should look for headers in
dnl P/include and libraries in P/lib, or
dnl - a string of the form `HEADER:LIB', indicating that we should look
@@ -87,7 +90,7 @@
# /usr/local/include/db.h. So if you check for /usr/local first, you'll
# get the old header file from /usr/include, and the new library from
# /usr/local/lib --- disaster. Check for that bogosity first.
- places="std /usr/local/include/db3:/usr/local/lib /usr/local /usr/local/BerkeleyDB.3.2"
+ places="std std3 /usr/local/include/db3:/usr/local/lib /usr/local /usr/local/BerkeleyDB.3.2"
fi
# Now `places' is guaranteed to be a list of place specs we should
# search, no matter what flags the user passed.
@@ -107,6 +110,9 @@
"std" )
description="the standard places"
;;
+ "std3" )
+ description="the standard places, but not the std lib"
+ ;;
*":"* )
header="`echo $place | sed -e 's/:.*$//'`"
lib="`echo $place | sed -e 's/^.*://'`"
@@ -134,7 +140,11 @@
AC_MSG_CHECKING([for Berkeley DB in $description])
AC_CACHE_VAL($cache_id,
[
- SVN_LIB_BERKELEY_DB_TRY($1, $2, $3)
+ if test "$place" == "std3"; then
+ SVN_LIB_BERKELEY_DB3_TRY($1, $2, $3)
+ else
+ SVN_LIB_BERKELEY_DB_TRY($1, $2, $3)
+ fi
eval "$cache_id=$svn_have_berkeley_db"
])
AC_MSG_RESULT(`eval echo '$'$cache_id`)
@@ -161,6 +171,10 @@
"std" )
svn_lib_berkeley_db=yes
;;
+ "std3" )
+ LIBS="$LIBS -ldb3"
+ svn_lib_berkeley_db=yes
+ ;;
*":"* )
header="`echo $found | sed -e 's/:.*$//'`"
lib="`echo $found | sed -e 's/^.*://'`"
@@ -236,3 +250,47 @@
LIBS="$svn_lib_berkeley_db_try_save_libs"
]
)
+
+AC_DEFUN(SVN_LIB_BERKELEY_DB3_TRY,
+ [
+ svn_lib_berkeley_db_try_save_libs="$LIBS"
+ LIBS="$LIBS -ldb3"
+
+ svn_check_berkeley_db_major=$1
+ svn_check_berkeley_db_minor=$2
+ svn_check_berkeley_db_patch=$3
+ AC_TRY_RUN(
+ [
+#include <stdio.h>
+#include "db.h"
+main ()
+{
+ int major, minor, patch;
+
+ db_version (&major, &minor, &patch);
+
+ if (major < $svn_check_berkeley_db_major)
+ exit (1);
+ if (major > $svn_check_berkeley_db_major)
+ exit (0);
+
+ if (minor < $svn_check_berkeley_db_minor)
+ exit (1);
+ if (minor > $svn_check_berkeley_db_minor)
+ exit (0);
+
+ if (patch >= $svn_check_berkeley_db_patch)
+ exit (0);
+ else
+ exit (1);
+}
+ ],
+ [svn_have_berkeley_db=yes],
+ [svn_have_berkeley_db=no],
+ [svn_have_berkeley_db=yes]
+ )
+
+ LIBS="$svn_lib_berkeley_db_try_save_libs"
+ ]
+)
+
Index: subversion/tests/libsvn_fs/Makefile.am
===================================================================
RCS file: /cvs/subversion/subversion/tests/libsvn_fs/Makefile.am,v
retrieving revision 1.15
diff -u -r1.15 Makefile.am
--- subversion/tests/libsvn_fs/Makefile.am 2001/03/27 20:53:21 1.15
+++ subversion/tests/libsvn_fs/Makefile.am 2001/04/01 22:38:57
@@ -5,8 +5,7 @@
@SVN_TESTS_EDITOR_LIBS@ \
@SVN_LIBSVN_DELTA_LIBS@ \
@SVN_LIBSVN_SUBR_LIBS@ \
- @SVN_APR_LIBS@ @SVN_EXPAT_LIBS@ -ldb
- ## Shouldn't -ldb be added automatically by the autoconf script?
+ @SVN_APR_LIBS@ @SVN_EXPAT_LIBS@
# Tests for the `skeleton' library.
skel_test_SOURCES = skel-test.c
--
Jürgen A. Erhard juergen.erhard@gmx.net phone: (GERMANY) 0721 27326
MARS: http://members.tripod.com/Juergen_Erhard/mars_index.html
GNOME Desktop Project (http://www.gnome.org)
Fuck the system? Nah, you might catch something.
- application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:27 2006