[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 01:07:56 CET

Philip Martin wrote:

>The top of ac-helpers/berkeley-db.m4 sets status to "required", then
>when the test fails the following code in ac-helpers/berkeley-db is
>run
>
> case "$found" in
> "not" )
> if test "$status" = "required"; then
> AC_MSG_ERROR([Could not find Berkeley DB $1.$2.$3. with libname $4])
> fi
> svn_lib_berkeley_db=no
> ;;
>
>
>I think AC_MSG_ERROR must be fatal, I don't know much about autoconf,
>but if I put an echo immediately after the AC_MSG_ERROR its output
>doesn't appear.
>
Yes, of course it's fatal.

>So I think it affects BDB 4.0 as well as 4.1, this will affect lots of
>people. Perhaps we should pull the 0.14.4 tarball?
>
>
I agree absolutely. In the meantime, Ben, please try the attached patch.
It moves the logic for testing several lib names from configure.in to
SVN_LIB_BERKELEY_DB in ac-helpers/berkeley-db.m4.

-- 
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 01:09:00 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.