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

[PATCH] select ra interfaces via configure

From: Eric Gillespie <epg_at_pretzelnet.org>
Date: 2002-12-08 04:48:14 CET

Add new options for enabling and disabling ra layers. The main
purpose behind this feature is to allow *not* building certain
ra layers when they normally would be built (for example,
disabling ra-local when db4 is installed). A side effect is an
improvement on the current neon detection behavior: lack of neon
is no longer an error, it just triggers building without ra_dav.

* ac-helpers/neon.m4

  (SVN_LIB_NEON): Set svn_lib_neon to 'yes' or 'no' according to
  whether neon was found. Don't call SVN_DOWNLOAD_NEON when it
  isn't found.

  (SVN_DOWNLOAD_NEON): Use AC_MSG_WARN instead of AC_MSG_ERR.

* build.conf

  (libsvn_ra_dav):
  (libsvn_ra_svn):
  (libsvn_ra_local):
  (svnserve): Create new install targets for these instead of
  using base-lib or fs-lib or fs-bin. This is so the individual
  targets can be added to local-all, local-install, and
  install-static targets in configure.in.

* configure.in

  New options for enabling or disabling the ra layers (and
  therefore svnserve). The default is for all to be enabled if
  the appropriate dependencies are available. Only search for
  neon if ra-dav was requested. Only search for db if ra-local
  is requested.

Index: ac-helpers/neon.m4
===================================================================
--- ac-helpers/neon.m4 (revision 4051)
+++ ac-helpers/neon.m4 (working copy)
@@ -48,6 +48,7 @@
       case "$NEON_VERSION" in
         $NEON_WANTED_REGEX)
           echo "Using neon found in source directory."
+ svn_lib_neon=yes
           SVN_NEON_INCLUDES=-'I$(abs_srcdir)/neon/src'
           NEON_LIBS="\$(abs_builddir)/neon/src/libneon.la"
 
@@ -90,7 +91,7 @@
         *)
           echo "You have a neon/ subdir containing version $NEON_VERSION,"
           echo "but Subversion needs neon ${NEON_LATEST_WORKING_VER}."
- SVN_DOWNLOAD_NEON()
+ svn_lib_neon=no
           ;;
       esac
     else
@@ -121,18 +122,19 @@
         NEON_LIBS=`$neon_config --libs`
         CFLAGS="$CFLAGS `$neon_config --cflags | sed -e 's/-I[^ ]*//g'`"
         changequote([, ])dnl
+ svn_lib_neon=yes
         ;;
       *)
         echo "You have neon version $NEON_VERSION,"
         echo "but Subversion needs neon $NEON_LATEST_WORKING_VER."
- SVN_DOWNLOAD_NEON()
+ svn_lib_neon=no
         ;;
     esac
   else
     # no neon subdir, no neon-config in PATH
     AC_MSG_RESULT([nothing])
     echo "No suitable neon can be found."
- SVN_DOWNLOAD_NEON()
+ svn_lib_neon=no
   fi
 ])
 
@@ -148,5 +150,5 @@
   echo " ${NEON_URL}"
   echo "unpack the archive using tar/gunzip and rename the resulting"
   echo "directory from ./neon-${NEON_LATEST_WORKING_VER}/ to ./neon/"
- AC_MSG_ERROR([no suitable neon found])
+ AC_MSG_WARN([no suitable neon found])
 ])
Index: build.conf
===================================================================
--- build.conf (revision 4051)
+++ build.conf (working copy)
@@ -130,7 +130,7 @@
 [libsvn_ra_dav]
 type = lib
 path = subversion/libsvn_ra_dav
-install = base-lib
+install = ra-dav-lib
 libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(NEON_LIBS)
 custom = ra-module
 
@@ -138,7 +138,7 @@
 [libsvn_ra_svn]
 type = lib
 path = subversion/libsvn_ra_svn
-install = base-lib
+install = ra-svn-lib
 libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 custom = ra-module
 
@@ -146,7 +146,7 @@
 [libsvn_ra_local]
 type = lib
 path = subversion/libsvn_ra_local
-install = fs-lib
+install = ra-local-lib
 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 custom = ra-module
 
@@ -185,7 +185,7 @@
 [svnserve]
 type = exe
 path = subversion/svnserve
-install = fs-bin
+install = svnserve-bin
 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr libsvn_ra_svn $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # ----------------------------------------------------------------------------
Index: configure.in
===================================================================
--- configure.in (revision 4051)
+++ configure.in (working copy)
@@ -46,6 +46,19 @@
 dnl (We can add custom defines by creating ./acconfig.h if we wish.)
 AC_CONFIG_HEADER(svn_private_config.h)
 
+AC_ARG_ENABLE(ra-dav,
+ AC_HELP_STRING([--disable-ra-dav], [Do not build ra_dav.]),
+ [enable_ra_dav="$enableval"],
+ [enable_ra_dav='yes'])
+AC_ARG_ENABLE(ra-local,
+ AC_HELP_STRING([--disable-ra-local], [Do not build ra_local.]),
+ [enable_ra_local="$enableval"],
+ [enable_ra_local='yes'])
+AC_ARG_ENABLE(ra-svn,
+ AC_HELP_STRING([--disable-ra-svn], [Do not build ra_svn.]),
+ [enable_ra_svn="$enableval"],
+ [enable_ra_svn='yes'])
+
 dnl Todo: we're English-only now, but GNU Gettext eventually?
 dnl Set of available languages.
 dnl ALL_LINGUAS="de fr es ko nl no pl pt sl sv"
@@ -87,7 +100,7 @@
 SVN_LIB_APR($APR_VER_REGEX)
 SVN_LIB_APRUTIL($APU_VER_REGEX)
 
-if test -d $abs_srcdir/db ; then
+if test "$enable_ra_local" = 'yes' && test -d $abs_srcdir/db ; then
     # Note: We have to configure and build a db subdirectory even if
     # some other berkeley db is configured via --with-berkeley-db
     ### why do we "have to" ?? -gjs
@@ -129,20 +142,22 @@
 
 
 
-NEON_WANTED_REGEX="`sed -n '/NEON_WANTED_REGEX=/s/.*=//p' $srcdir/build/buildcheck.sh`"
-dnl You can skip the neon version check only if you know what you are doing
-AC_ARG_ENABLE(neon-version-check,
- AC_HELP_STRING([--disable-neon-version-check],
- [do not check the Neon version]),
- [
- if test "$enableval" = "no" ; then
- NEON_WANTED_REGEX="*"
- fi
- ],
- [])
-NEON_LATEST_WORKING_VER="`sed -n '/NEON_LATEST_WORKING_VER=/s/.*=//p' $srcdir/build/buildcheck.sh`"
-eval "`grep '^ *NEON_URL=' $srcdir/build/buildcheck.sh`"
-SVN_LIB_NEON($NEON_WANTED_REGEX, $NEON_LATEST_WORKING_VER, $NEON_URL)
+if test "$enable_ra_dav" = 'yes'; then
+ NEON_WANTED_REGEX="`sed -n '/NEON_WANTED_REGEX=/s/.*=//p' $srcdir/build/buildcheck.sh`"
+ dnl You can skip the neon version check only if you know what you are doing
+ AC_ARG_ENABLE(neon-version-check,
+ AC_HELP_STRING([--disable-neon-version-check],
+ [do not check the Neon version]),
+ [
+ if test "$enableval" = "no" ; then
+ NEON_WANTED_REGEX="*"
+ fi
+ ],
+ [])
+ NEON_LATEST_WORKING_VER="`sed -n '/NEON_LATEST_WORKING_VER=/s/.*=//p' $srcdir/build/buildcheck.sh`"
+ eval "`grep '^ *NEON_URL=' $srcdir/build/buildcheck.sh`"
+ SVN_LIB_NEON($NEON_WANTED_REGEX, $NEON_LATEST_WORKING_VER, $NEON_URL)
+fi
 
 dnl find Apache with a recent-enough magic module number.
 SVN_FIND_APACHE(20020903)
@@ -157,8 +172,10 @@
 SVN_FS_WANT_DB_MINOR=0
 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 db])
+if test "$enable_ra_local" = 'yes'; then
+ SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
+ $SVN_FS_WANT_DB_PATCH, [db4 db])
+fi
 
 
 # Only add *_APACHE_RULE if we also have db, since mod_dav_svn depends on it.
@@ -171,6 +188,26 @@
   INSTALL_RULES="install-base-lib install-fs-lib install-lib install-include install-static $INSTALL_APACHE_RULE"
   FS_TEST_DEPS="\$(FS_TEST_DEPS)"
   FS_TEST_PROGRAMS="\$(FS_TEST_PROGRAMS)"
+
+ if test "$enable_ra_local" = 'yes'; then
+ BUILD_RULES="$BUILD_RULES ra-local-lib"
+ INSTALL_RULES="$INSTALL_RULES install-ra-local-lib"
+ fi
+fi
+
+if test "$enable_ra_svn" = 'yes'; then
+ BUILD_RULES="$BUILD_RULES ra-svn-lib"
+ INSTALL_RULES="$INSTALL_RULES install-ra-svn-lib"
+
+ if test "$svn_lib_berkeley_db" = 'yes'; then
+ BUILD_RULES="$BUILD_RULES svnserve-bin"
+ INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-svnserve-bin"
+ fi
+fi
+
+if test "$enable_ra_dav" = 'yes' && test "$svn_lib_neon" = 'yes'; then
+ BUILD_RULES="$BUILD_RULES ra-dav-lib"
+ INSTALL_RULES="$INSTALL_RULES install-ra-dav-lib"
 fi
 
 AC_SUBST(BUILD_RULES)
@@ -359,17 +396,32 @@
 ])
 
 if test "$enable_shared" = "no" -o "$enable_dso" != "yes"; then
- AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_DAV, 1,
- [Defined if libsvn_client should link against libsvn_ra_dav])
- svn_ra_lib_deps="\$(RA_DAV_DEPS)"
- svn_ra_lib_link="\$(RA_DAV_LINK)"
-
- AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SVN, 1,
- [Defined if libsvn_client should link against libsvn_ra_svn])
- svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)"
- svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)"
+ svn_ra_lib_deps=
+ svn_ra_lib_link=
+
+ if test "$enable_ra_dav" = "yes" && test "$svn_lib_neon" = "yes"; then
+ AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_DAV, 1,
+ [Defined if libsvn_client should link against libsvn_ra_dav])
+ svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_DAV_DEPS)"
+ svn_ra_lib_link="$svn_ra_lib_link \$(RA_DAV_LINK)"
+ fi
 
- if test "$svn_lib_berkeley_db" = "yes"; then
+ if test "$enable_ra_svn" = "yes"; then
+ AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SVN, 1,
+ [Defined if libsvn_client should link against libsvn_ra_svn])
+ svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)"
+ svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)"
+ fi
+
+ if test "$enable_ra_pipe" = "yes"; then
+ AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_PIPE, 1,
+ [Defined if libsvn_client should link against libsvn_ra_pipe])
+ svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_PIPE_DEPS)"
+ svn_ra_lib_link="$svn_ra_lib_link \$(RA_PIPE_LINK)"
+ fi
+
+ if test "$enable_ra_local" = "yes" \
+ && test "$svn_lib_berkeley_db" = "yes"; then
     AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL, 1,
         [Defined if libsvn_client should link against libsvn_ra_local])
     svn_ra_lib_deps="\$(RA_LOCAL_DEPS) $svn_ra_lib_deps"
@@ -447,3 +499,6 @@
 ;;
 esac
 
+if test "$enable_ra_dav" = 'yes' && test "$svn_lib_neon" = 'no'; then
+ SVN_DOWNLOAD_NEON()
+fi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 8 04:48:57 2002

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