[Gambas-devel] xml.libxml 0.0.4
Benoit Minisini
gambas at ...1...
Sun Oct 10 17:08:00 CEST 2004
On Sunday 10 October 2004 02:22, Daniel Campos wrote:
> Hi all:
>
> Here's the 0.0.4 alpha version from the gb.xml.libxml component. I've
> added DTD support to XmlWriter. A new class, XSLT, allows to easily
> convert XML documents to XHTML documents (and other formats) using the
> XSLT style sheets.
>
> A new component, gb.xml.libxml.rpc, allows to perform XML-RPC calls to
> remote servers.
>
> By now, I didn't had time to write the compilation tutorial, I can't
> find the way to properly modify configure.in for these two classes, even
> if I've read the brief tutorial at binara. Benoit, please, help me! I
> would like to add flags to specify where the right libraries are
> placed, so people using SUSE can compile the newer libxml2 libraries and
> put it at /usr/local, to not conflict with the evil SAX2.
>
> http://gambas.gnulinex.org/libxml/libxml-0.0.4.tar.bz2
>
> Regards,
>
> Daniel Campos
>
>
I'm going to try to insert your component in the main source.
But what are your problems exactly ?
You must:
Create a Makefile.am file in each directory and subdirectory:
./src/lib/xml
./src/lib/xml/libxml
./src/lib/xml/libxml/rpc
Adds a call to GB_COMPONENT() macro for each component in configure.in.
NEVER use subdirectory includes like #include <libxml/tree.h>, but #include
<tree.h> instead. The GB_COMPONENT macro will find the correct path.
NEVER use include paths and linker flags directly in the Makefile.am files,
but use the variables declared by GB_COMPONENT.
The GB_COMPONENT macro for gb.xml.libxml looks like the GB_COMPONENT macro for
SDL library, something like that:
GB_COMPONENT(
libxml,
LIBXML,
[libxml-based XML parser component],
[GB_FIND(parser.h, /usr/local /usr, include/libxml/libxml* include/libxml*
include)],
[GB_FIND(libxml2.$SHLIBEXT, /usr/local /usr, lib)],
[$C_LIB $THREAD_LIB -lxml2 -lxslt -lz -lm]
[$THREAD_INC])
I didn't test it yet, so maybe there are errors... :-/
Don't forget to tell AC_OUTPUT() to generate the makefile in configure.in.
A remark: do you have to include libxslt in the xml component ? Can't you make
another component for libxslt ? I say that because I think libxslt should be
a heavy library, so having to link to it just for reading xml files may not
be a good idea.
As soon as I succeed in compiling your component, I will send my configure.in
and Makefile.am files.
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the Devel
mailing list