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

Re: Subversion 0.14.4 released

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-10-30 02:02:31 CET

Philip Martin wrote:

>Blair Zajac <blair@orcaware.com> writes:
>
>>Change
>>
>>+ $SVN_FS_WANT_DB_PATCH, "db4 db")
>>
>>
>
>This doesn't work.
>
>>to
>>
>>+ $SVN_FS_WANT_DB_PATCH, [db4 db])
>>
>>
>
>This works for me.
>
Cool. The updated patch is attached.

>>Also, I'm on RedHat 8 and installed a vanilla DB 4.1.24 and it installs
>>db into libdb-4.1, which isn't found by default.
>>
>>How about changing this to
>>
>>+ $SVN_FS_WANT_DB_PATCH, [db-4.1 db-4.0 db-4 db4 db])
>>
>>
>
>Hmm, I have BDB 4.1 installed from a tarball and I don't find that
>necessary. I have
>
>$ ls /usr/local/db4/lib
>libdb-4.1.a libdb-4.1.la libdb-4.1.so libdb-4.so libdb.a libdb.so
>
>and when I run configure (using $SVN_FS_WANT_DB_PATCH, [db4 db]) I get
>
>$ ./config.nice
>[snip]
>checking for Berkeley DB in /usr/local/db4 (as db4)... no
>checking for Berkeley DB in /usr/local/db4 (as db)... yes
>
In that case, I strongly recommend against searching for db-4.1 and
db-4.0 explicitly. Presumably, if both are on the system, they'll be
installed in different paths. We already have a mechanism for dealing
with that, and the soname thing should handle potential runtime linking
problems.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/

cd ~/src/svn/repo/
svn diff ac-helpers/berkeley-db.m4 configure.in
Index: ac-helpers/berkeley-db.m4
===================================================================
--- ac-helpers/berkeley-db.m4 (revision 3558)
+++ ac-helpers/berkeley-db.m4 (working copy)
@@ -2,8 +2,9 @@
 dnl
 dnl Search for a useable version of Berkeley DB in a number of
 dnl common places. The installed DB must be no older than the
-dnl version given by MAJOR, MINOR, and PATCH. LIBNAME is the name of
-dnl the library to attempt to link against, typically 'db' or 'db4'.
+dnl version given by MAJOR, MINOR, and PATCH. LIBNAME is a list of
+dnl names of the library to attempt to link against, typically
+dnl 'db' and 'db4'.
 dnl
 dnl If we find a useable version, set CPPFLAGS and LIBS as
 dnl appropriate, and set the shell variable `svn_lib_berkeley_db' to
@@ -25,7 +26,6 @@
 AC_DEFUN(SVN_LIB_BERKELEY_DB,
 [
   db_version=$1.$2.$3
- db_libname=$4
   dnl Process the `with-berkeley-db' switch. We set `status' to one
   dnl of the following values:
   dnl `required' --- the user specified that they did want to use
@@ -156,31 +156,33 @@
         ;;
       esac
 
- # We generate a separate cache variable for each prefix and libname
- # we search under. That way, we avoid caching information that
- # changes if the user runs `configure' with a different set of
- # switches.
- changequote(,)
- cache_id="`echo svn_cv_lib_berkeley_db_$1_$2_$3_$4_in_${place} \
- | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
- changequote([,])
- dnl We can't use AC_CACHE_CHECK here, because that won't print out
- dnl the value of the computed cache variable properly.
- AC_MSG_CHECKING([for Berkeley DB in $description (as $db_libname)])
- AC_CACHE_VAL($cache_id,
- [
- SVN_LIB_BERKELEY_DB_TRY($1, $2, $3, $4)
- eval "$cache_id=$svn_have_berkeley_db"
- ])
- result="`eval echo '$'$cache_id`"
- AC_MSG_RESULT($result)
-
- # If we found it, no need to search any more.
- if test "`eval echo '$'$cache_id`" = "yes"; then
- found="$place"
- break
- fi
-
+ for db_libname in $4; do
+ # We generate a separate cache variable for each prefix and libname
+ # we search under. That way, we avoid caching information that
+ # changes if the user runs `configure' with a different set of
+ # switches.
+ changequote(,)
+ cache_id="`echo svn_cv_lib_berkeley_db_$1_$2_$3_${db_libname}_in_${place} \
+ | sed -e 's/[^a-zA-Z0-9_]/_/g'`"
+ changequote([,])
+ dnl We can't use AC_CACHE_CHECK here, because that won't print out
+ dnl the value of the computed cache variable properly.
+ AC_MSG_CHECKING([for Berkeley DB in $description (as $db_libname)])
+ AC_CACHE_VAL($cache_id,
+ [
+ SVN_LIB_BERKELEY_DB_TRY($1, $2, $3, $db_libname)
+ eval "$cache_id=$svn_have_berkeley_db"
+ ])
+ result="`eval echo '$'$cache_id`"
+ AC_MSG_RESULT($result)
+
+ # If we found it, no need to search any more.
+ if test "`eval echo '$'$cache_id`" = "yes"; then
+ found="$place"
+ break
+ fi
+ done
+ test "found" != "not" && break
     done
 
     # Restore the original values of the flags we tweak.
@@ -190,7 +192,7 @@
     case "$found" in
       "not" )
         if test "$status" = "required"; then
- AC_MSG_ERROR([Could not find Berkeley DB $1.$2.$3. with libname $4])
+ AC_MSG_ERROR([Could not find Berkeley DB $db_version with names: $4])
         fi
         svn_lib_berkeley_db=no
       ;;
Index: configure.in
===================================================================
--- configure.in (revision 3558)
+++ configure.in (working copy)
@@ -148,12 +148,7 @@
 SVN_FS_WANT_DB_PATCH=14
 # Look for libdb4.so first:
 SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
- $SVN_FS_WANT_DB_PATCH, "db4")
-if test "$svn_lib_berkeley_db" = "no"; then
- # ...try libdb.so otherwise.
- SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
- $SVN_FS_WANT_DB_PATCH, "db")
-fi
+ $SVN_FS_WANT_DB_PATCH, [db4 db])
 
 SVN_LIB_XMLRPC_EPI()
 

Compilation finished at Wed Oct 30 01:05:16

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 30 02:03:36 2002

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.