You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2013/07/03 18:20:22 UTC

svn commit: r1499460 - in /subversion/trunk: build/ac-macros/berkeley-db.m4 configure.ac

Author: danielsh
Date: Wed Jul  3 16:20:21 2013
New Revision: 1499460

URL: http://svn.apache.org/r1499460
Log:
configure: Add an opt-in for BDB 6.

Review by: stsp
(He co-authored the warning text, too.)

* build/ac-macros/berkeley-db.m4
  (--enable-banging-head-against-wall): New option.
  (SVN_LIB_BERKELEY_DB_TRY): Grow new parameter, add a possible return value.
  (SVN_LIB_BERKELEY_DB): Add a new failure mode when bdb6 was found but the
    opt-in not used.

* configure.ac: Add a detailed warning message for "Found, but not opt-in" case.

Modified:
    subversion/trunk/build/ac-macros/berkeley-db.m4
    subversion/trunk/configure.ac

Modified: subversion/trunk/build/ac-macros/berkeley-db.m4
URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/berkeley-db.m4?rev=1499460&r1=1499459&r2=1499460&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/berkeley-db.m4 (original)
+++ subversion/trunk/build/ac-macros/berkeley-db.m4 Wed Jul  3 16:20:21 2013
@@ -126,12 +126,25 @@ AC_DEFUN(SVN_LIB_BERKELEY_DB,
     svn_lib_berkeley_db=no
   else
     AC_MSG_CHECKING([for availability of Berkeley DB])
-    SVN_LIB_BERKELEY_DB_TRY($1, $2, $3)
+    AC_ARG_ENABLE(banging-head-against-wall,
+      AS_HELP_STRING([---disable-banging-head-against-wall],
+                     [Allow building against BDB 6+.
+                      See --with-berkeley-db for specifying the location of
+                      the Berkeley DB installation.  Using BDB 6 will fail if
+                      this option is not used.]),
+      [enable_bdb6=$enableval],[enable_bdb6=unspecified])
+
+    SVN_LIB_BERKELEY_DB_TRY($1, $2, $3, $enable_bdb6)
     if test "$svn_have_berkeley_db" = "yes"; then
       AC_MSG_RESULT([yes])
       svn_lib_berkeley_db=yes
     else
-      AC_MSG_RESULT([no])
+      if test "$svn_have_berkeley_db" = "no6"; then
+        AC_MSG_RESULT([no (found version 6, but --enable-banging-head-against-wall not specified)])
+        # A warning will be printed at the end of configure.ac.
+      else
+        AC_MSG_RESULT([no])
+      fi
       svn_lib_berkeley_db=no
       if test "$bdb_status" = "required"; then
         AC_MSG_ERROR([Berkeley DB $db_version or $db_alt_version wasn't found.])
@@ -141,7 +154,7 @@ AC_DEFUN(SVN_LIB_BERKELEY_DB,
 ])
 
 
-dnl   SVN_LIB_BERKELEY_DB_TRY(major, minor, patch)
+dnl   SVN_LIB_BERKELEY_DB_TRY(major, minor, patch, enable_bdb6)
 dnl
 dnl   A subroutine of SVN_LIB_BERKELEY_DB.
 dnl
@@ -174,6 +187,7 @@ AC_DEFUN(SVN_LIB_BERKELEY_DB_TRY,
     svn_check_berkeley_db_major=$1
     svn_check_berkeley_db_minor=$2
     svn_check_berkeley_db_patch=$3
+    enable_bdb6=$4
 
    if test -z "$SVN_DB_LIBS"; then
       # We pass --dbm-libs here since Debian has modified apu-config not
@@ -215,6 +229,7 @@ AC_DEFUN(SVN_LIB_BERKELEY_DB_TRY,
 )
 
     AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <string.h>
 #include <stdlib.h>
 $svn_db_header
 
@@ -233,8 +248,8 @@ int main ()
   /* Block Berkeley DB 6, because (a) we haven't tested with it, (b) 6.0.20
      and newer are under the AGPL, and we want use of AGPL dependencies to be
      opt-in. */
-  if (major >= 6)
-    exit(1);
+  if (major >= 6 && strcmp("$enable_bdb6", "yes"))
+    exit(2);
 
   /* Run-time check:  ensure the library claims to be the correct version. */
 
@@ -255,7 +270,11 @@ int main ()
 }
       ]])],
       [svn_have_berkeley_db=yes],
-      [svn_have_berkeley_db=no],
+      [rc=$?
+       svn_have_berkeley_db=no
+       if test $rc = 2; then
+         svn_have_berkeley_db=no6
+       fi],
       [svn_have_berkeley_db=yes]
     )
 

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1499460&r1=1499459&r2=1499460&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Wed Jul  3 16:20:21 2013
@@ -1511,3 +1511,29 @@ AC_OUTPUT
 dnl Configure is long - users tend to miss warnings printed during it.
 dnl Hence, print a warnings about what we did and didn't configure at the 
 dnl end, where people will actually see them.
+
+if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then
+  AC_MSG_WARN([We have configured without BDB filesystem support
+
+
+Berkeley DB 6 was found, but not used.  Please re-run configure (see
+./config.nice) with the '--enable-banging-head-against-wall' flag to use it,
+or explicitly specify '--disable-banging-head-against-wall' or 
+'--without-berkeley-db' to silence this warning.
+
+Please note that some versions of Berkeley DB 6+ are under the GNU Affero
+General Public License, version 3:
+https://oss.oracle.com/pipermail/bdb/2013-June/000056.html
+
+The AGPL-3.0 licence may impose special requirements for making available
+source code of server-side software.  The text of the licence is:
+https://www.gnu.org/licenses/agpl-3.0.html
+http://opensource.org/licenses/AGPL-3.0
+
+The Berkeley DB backend to Subversion is deprecated; see
+http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated
+
+The Subversion developers have not tested Subversion with Berkeley DB 6 for
+technical problems or bugs.
+])
+fi