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

[PATCH] Use apr-util's expat

From: Justin Erenkrantz <jerenkrantz_at_apache.org>
Date: 2002-04-16 09:48:37 CEST

This patch switches us to using apr-util's detected expat.

'make check' succeeded with installed expat-1.95.2.

Thoughts? This should allow us to remove expat-lite from our
tree and rely on apr-util either finding an installed expat
or using its bundled expat.

This requires recent commits/fixes to apr-util, so if you test
this out, please make sure you are running off HEAD of
apr-util. -- justin

* Makefile.in: Remove SVN_EXPAT_INCLUDES since we rely on apr-util
to determine where expat includes are.
* build.conf: Add SVN_APRUTIL_LIBS in place of libexpat for
dependencies and to all targets that include SVN_APR_LIBS. Remove
libexpat target.
* configure.in: Add usage of --old-expat switch in apu-config
(see recent commits to apr-util) to determine what expat version
we really have. If apr-util says we have an old expat, define
SVN_HAVE_OLD_EXPAT. Remove addition of expat-lite includes.
* subversion/include/svn_xml.h: Add check for SVN_HAVE_OLD_EXPAT
to determine the header name we need to include.
* subversion/libsvn_delta/xml_parse.c: Ditto.

Index: ./Makefile.in
===================================================================
--- ./Makefile.in
+++ ./Makefile.in Mon Apr 15 23:57:28 2002
@@ -52,7 +52,7 @@
 LT_LDFLAGS =
 
 INCLUDES = @SVN_EXTRA_INCLUDES@ @SVN_NEON_INCLUDES@ \
- @SVN_EXPAT_INCLUDES@ @SVN_DB_INCLUDES@
+ @SVN_DB_INCLUDES@
 
 APACHE_INCLUDES = @APACHE_INCLUDES@
 APACHE_TARGET = @APACHE_TARGET@
Index: ./build.conf
===================================================================
--- ./build.conf
+++ ./build.conf Tue Apr 16 00:22:31 2002
@@ -67,7 +67,7 @@
 type = exe
 path = subversion/clients/cmdline
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
- $(SVN_APR_LIBS) libexpat
+ $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 manpages = subversion/clients/cmdline/man/svn.1
 infopages = doc/user/manual/svn-manual.info
  doc/user/svn_for_cvs_users/svn_for_cvs_users.info
@@ -81,41 +81,41 @@
 type = exe
 path = subversion/svnadmin
 install = fs-bin
-libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # The subversion repository inspection tool
 [svnlook]
 type = exe
 path = subversion/svnlook
 install = fs-bin
-libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # Library needed by all subversion clients
 [libsvn_client]
 type = lib
 path = subversion/libsvn_client
-libs = libsvn_wc libsvn_ra libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_wc libsvn_ra libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # Routines for binary diffing and tree-deltas
 [libsvn_delta]
 type = lib
 install = base-lib
 path = subversion/libsvn_delta
-libs = libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # The repository filesystem library
 [libsvn_fs]
 type = lib
 path = subversion/libsvn_fs
 install = fs-lib
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) $(SVN_DB_LIBS)
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_DB_LIBS) $(SVN_APR_LIBS)
 
 # General API for accessing repositories
 [libsvn_ra]
 type = lib
 path = subversion/libsvn_ra
 # conditionally link in some more libs
-libs = libsvn_subr $(SVN_RA_LIB_LINK) $(SVN_APR_LIBS)
+libs = libsvn_subr $(SVN_RA_LIB_LINK) $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # conditionally add more dependencies
 add-deps = $(SVN_RA_LIB_DEPS)
 
@@ -124,34 +124,34 @@
 type = lib
 path = subversion/libsvn_ra_dav
 install = base-lib
-libs = libsvn_subr $(SVN_APR_LIBS) $(NEON_LIBS)
+libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(NEON_LIBS)
 
 # Accessing repositories via direct libsvn_fs
 [libsvn_ra_local]
 type = lib
 path = subversion/libsvn_ra_local
 install = fs-lib
-libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # Routines built on top of libsvn_fs
 [libsvn_repos]
 type = lib
 path = subversion/libsvn_repos
 install = fs-lib
-libs = libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # Low-level grab bag of utilities
 [libsvn_subr]
 type = lib
 install = base-lib
 path = subversion/libsvn_subr
-libs = $(SVN_APR_LIBS) libexpat
+libs = $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # Working copy management lib
 [libsvn_wc]
 type = lib
 path = subversion/libsvn_wc
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # Subversion plugin for Apache's mod_dav
 [mod_dav_svn]
@@ -165,14 +165,6 @@
 custom = apache-mod
 install = apache-mod
 
-# Simple XML-parsing lib
-[libexpat]
-type = lib
-install = base-lib
-path = expat-lite
-# there are some .c files included by others, so *.c isn't appropriate
-sources = hashtable.c xmlparse.c xmlrole.c xmltok.c
-
 # ----------------------------------------------------------------------------
 #
 # TARGETS FOR SWIG SUPPORT
@@ -182,7 +174,7 @@
 [libsvn_swig_py]
 type = lib
 path = subversion/bindings/swig
-libs = $(SVN_APR_LIBS)
+libs = $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 install = swig-py-lib
 # need special build rule to include -DSWIGPYTHON
 custom = swig-py
@@ -198,7 +190,7 @@
 path = subversion/tests
 sources = svn_tests_main.c svn_test_editor.c
 install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # shared utils for writing fs tests
 [libsvn_test_fs]
@@ -215,7 +207,7 @@
 sources = fs-test.c
 install = fs-test
 libs = libsvn_test libsvn_test_fs libsvn_fs libsvn_delta libsvn_subr
- $(SVN_APR_LIBS) libexpat
+ $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # run-fs-tests.sh will run this for us
 testing = skip
 
@@ -225,7 +217,7 @@
 path = subversion/tests/libsvn_fs
 sources = skel-test.c
 install = fs-test
-libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # run-fs-tests.sh will run this for us
 testing = skip
 
@@ -235,7 +227,7 @@
 path = subversion/tests/libsvn_fs
 sources = key-test.c
 install = fs-test
-libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # run-fs-tests.sh will run this for us
 testing = skip
 
@@ -246,7 +238,7 @@
 sources = strings-reps-test.c
 install = fs-test
 libs = libsvn_test libsvn_test_fs libsvn_fs libsvn_delta libsvn_subr
- $(SVN_APR_LIBS) libexpat
+ $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # run-fs-tests.sh will run this for us
 testing = skip
 
@@ -256,7 +248,7 @@
 path = subversion/tests/libsvn_repos
 sources = md5args.c
 install = test
-libs = libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # run-repos-tests.sh will run this for us
 testing = skip
 
@@ -267,7 +259,7 @@
 sources = repos-test.c dir-delta-editor.c
 install = fs-test
 libs = libsvn_test libsvn_test_fs libsvn_repos libsvn_fs libsvn_delta
- libsvn_subr $(SVN_APR_LIBS) libexpat
+ libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # run-repos-tests.sh will run this for us
 testing = skip
 
@@ -277,7 +269,7 @@
 path = subversion/tests/libsvn_subr
 sources = hashdump-test.c
 install = test
-libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # test svn_stringbuf_t utilities
 [stringtest]
@@ -285,7 +277,7 @@
 path = subversion/tests/libsvn_subr
 sources = stringtest.c
 install = test
-libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # test path library
 [path-test]
@@ -293,7 +285,7 @@
 path = subversion/tests/libsvn_subr
 sources = path-test.c
 install = test
-libs = libsvn_test libsvn_subr $(SVN_APR_LIBS)
+libs = libsvn_test libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # test eol conversion and keyword substitution routines
 [translate-test]
@@ -301,7 +293,7 @@
 path = subversion/tests/libsvn_wc
 sources = translate-test.c
 install = test
-libs = libsvn_test libsvn_delta libsvn_wc libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_wc libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 # use random data to test delta processing
 [random-test]
@@ -309,7 +301,7 @@
 path = subversion/tests/libsvn_delta
 sources = random-test.c
 install = test
-libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 
 
 ### Tests that are simply broken (fix?) ----------
@@ -320,7 +312,7 @@
 path = subversion/tests/libsvn_delta
 sources = delta-combine-test.c
 install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # disabled for now -- the delta combiner isn't written, and we
 # don't really have any idea if the interface would be compatible
 # with this test, anyway.
@@ -333,7 +325,7 @@
 sources = ra-local-test.c
 install = fs-test
 libs = libsvn_test libsvn_ra libsvn_fs libsvn_delta libsvn_subr
- $(SVN_APR_LIBS) libexpat
+ $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # disabled for now, BROKEN.
 testing = skip
 
@@ -346,7 +338,7 @@
 path = subversion/tests/libsvn_subr
 sources = target-test.c
 install = test
-libs = libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # target-test.sh will run this for us
 testing = skip
 
@@ -356,7 +348,7 @@
 path = subversion/tests/libsvn_delta
 sources = xml-output-test.c
 install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # this is really redundant with our XML svn-test*.sh tests.
 testing = skip
 
@@ -366,7 +358,7 @@
 path = subversion/tests/libsvn_wc
 sources = checkout-test.c
 install = test
-libs = libsvn_wc libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_wc libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 # this is really redundant with our XML svn-test*.sh tests.
 testing = skip
 
@@ -378,7 +370,7 @@
 path = subversion/tests/libsvn_delta
 sources = deltaparse-test.c
 install = test
-libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_test libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 testing = skip
 
 
@@ -391,7 +383,7 @@
 path = subversion/tests/libsvn_delta
 sources = svndiff-test.c
 install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 testing = skip
 
 # compare two files, print txdelta windows
@@ -400,7 +392,7 @@
 path = subversion/tests/libsvn_delta
 sources = vdelta-test.c
 install = test
-libs = libsvn_delta libsvn_subr $(SVN_APR_LIBS) libexpat
+libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
 testing = skip
 
 
Index: ./configure.in
===================================================================
--- ./configure.in
+++ ./configure.in Tue Apr 16 00:33:59 2002
@@ -90,9 +90,10 @@
 
 dnl Set include dir and module library lists for Makefiles -----------------
 
-dnl Expat
-SVN_EXPAT_INCLUDES='-I$(top_srcdir)/expat-lite'
-AC_SUBST(SVN_EXPAT_INCLUDES)
+APU_HAVE_OLD_EXPAT="`$apu_config --old-expat`"
+if test "$APU_HAVE_OLD_EXPAT" = "yes"; then
+ AC_DEFINE(SVN_HAVE_OLD_EXPAT, 1, [Defined if Expat 1.0 or 1.1 was found])
+fi
 
 dnl Check for programs ---------------------
 
Index: ./subversion/include/svn_xml.h
===================================================================
--- ./subversion/include/svn_xml.h
+++ ./subversion/include/svn_xml.h Tue Apr 16 00:11:12 2002
@@ -24,7 +24,11 @@
 #include <apr_pools.h>
 #include <apr_hash.h>
 
+#ifdef SVN_HAVE_OLD_EXPAT
 #include "xmlparse.h"
+#else
+#include "expat.h"
+#endif
 
 #include "svn_error.h"
 #include "svn_delta.h"
Index: ./subversion/libsvn_delta/xml_parse.c
===================================================================
--- ./subversion/libsvn_delta/xml_parse.c
+++ ./subversion/libsvn_delta/xml_parse.c Tue Apr 16 00:13:14 2002
@@ -47,7 +47,11 @@
 #include "svn_base64.h"
 #include "svn_quoprint.h"
 #include "apr_strings.h"
+#ifdef SVN_HAVE_OLD_EXPAT
 #include "xmlparse.h"
+#else
+#include "expat.h"
+#endif
 #include "delta.h"
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 16 09:49: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.