[xml] Simultaneous use of libxml and libxml2



As Gnome relies on libxml and most of the code that I write uses xml2,
there is an obvious need to run both simultaneously.  The use of
xml2-config definitely helps in this regard.  I discovered however that
xml2 will install its include files to ${includedir}/libxml which more
often than not overwrites the original libxml header files.

There does not appear to be an option to change this in the configure
file, but simply the hard-coded declaration:

XML_INCLUDEDIR='-I${includedir}/libxml -I${includedir}'

In keeping with the other namespace changes, I would recommend the option
of storing the files in ${includedir}/libxml2, perhaps even as default.
A symbolic link from libxml to libxml2 would be appropriate for systems
running only one of the two libraries.

Anyway, here's the patch...  I only tested that the xml2-config file
successfully returned the correct cflags option.  I did not check whether
it actually installs to the correct directory  (I'm behind on my work here
as it is).  Patch applies to libxml2-2.3.12.

--- old/configure.in    Thu Jun 28 12:11:49 2001
+++ configure.in        Thu Jun 28 12:15:17 2001
@@ -157,6 +157,15 @@
 XML_INCLUDEDIR='-I${includedir}/libxml -I${includedir}'

 dnl
+dnl Override default include directory
+dnl
+AC_ARG_WITH(libxml2-include, [  --with-libxml2-include  Change the include directory to libxml2 instead of 
libxml (off)])
+if test "$with_libxml2_include" = "yes" ; then
+    echo Enabling libxml2 include directory
+       XML_INCLUDEDIR='-I${includedir}/libxml2 -I${includedir}'
+fi
+
+dnl
 dnl Extra flags
 dnl
 XML_CFLAGS=""


Thanks, and good luck.

John Joganic




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]