[Gambas-devel] xml.libxml 0.0.4

ron ronstk at ...124...
Sun Oct 10 18:50:49 CEST 2004


Thanks reply Benoit.


On Sunday 10 October 2004 17:53, Benoit Minisini wrote:
> On Sunday 10 October 2004 17:16, ron wrote:
> >

---8<-----

> >  A file to find to detect the -devel part is installed
> >  Set by creator of component, what he find an appropiate file for it.
> 
> You can put several include files there. All them must be found in the 
> following search paths.
> 
> >
> > <2> /usr/local /usr
> >  The paths to search in order to find, The /usr/local prefer if it is
> >  done like I did, to not break SuSE compiled stuff.
> >  By look first in the '/usr/local' the handle to use updated libraries
> >  by user above the distribution pre compiled binaries problems like
> >  I have withe SuSEs curl and xml should be solved.
> >
> >  This Search place can be done for curl with the shell function
> >     `curl-config --prefix 2> /dev/null`
> >
> > <3> include include/libxml* include/libxml*/*
> >   look in/for the 'include' directory
> >     (or does it means it's count for the 'include' stuff)
> >   for additional places 'include/libxml*' and 'include/libxml*/*'
> >   to find the given *.h file.
> >
> 
> Actually, the search path is a combination of <2> and <3>. <3> is a list of 
> subdirectories.
> 
> For example, if <2> is "/usr /usr/local", and <3> is "include include/SDL*", 
> then the includes will be search 
> in /usr/include, /usr/include/SDL*, /usr/local/include 
> and /usr/local/include/SDL*.
> 
> In other words, The search path is the product of <2> by <3>.
> 

In short I'm right with my view?make

> > -------------
> >   [GB_FIND(<1> libxml2.$SHLIBEXT, <2> /usr/local /usr, <3> lib)],
> >

---8<-----

> >
> >
> > I do not get the libxml.info and libxml.list files ?
> > After done a 'gbi gb.xml.libxml' add it to ???
> >
> >
> > Ron
> >
> 
> There is a problem with the libxml component that prevent it to being 
> "compilable" with gambas: the includes for the two different libraries libxml 
> and libxslt are not in the same place. 
> 
> This is a case not managed by GB_COMPONENT() ! 
> 
> This was not a problem with the SDL component (that uses libsdl and 
> libsdl_mixer), because all SDL includes are in the same directory.
> 
> As I said before, maybe Daniel could remove xslt things from libxml to put 
> them in another component (gb.xml.libxml.xslt ?). So the problem will be 
> fixed, and I will be able to compile it cleanly.
> 
> But if there is an explicit need for libxslt in the component, the problem 
> will remain...
> 
> I have another problem on Mandrake:
> 
> xml2-config returns the correct information, but not xslt-config! It tells me 
> that the xslt includes are in /usr/include/libxml2, and they are actually 
> in /usr/include/libxslt! Maybe a Mandrake bug ?
> 
> Waiting for your answer, Daniel ! :-)
> 
> Regards,
> 

For SuSE 8.2 there is also a xslt-config
--------------------
# xml-config --version
1.8.17

# xml-config --prefix
/usr

# xml-config --libs
-L/usr/lib -lxml -lz -L/usr/X11R6/lib -L/usr/X11R6/lib

# xml-config --cflags
-I/usr/include/gnome-xml

---------------------------
# xml2-config --version
2.6.13

# xml2-config --prefix
/usr/local

# xml2-config --libs
-L/usr/local/lib -lxml2 -lz -lpthread -lm

# xml2-config --cflags
-I/usr/local/include/libxml2

---------------------------
# xslt-config --version
1.0.33

# xslt-config --prefix
/usr

# xslt-config --libs
-L/usr/lib -lxslt -lxml2 -lz -lpthread -lm

# xslt-config --cflags
-I/usr/local/include/libxml2

---------------------------



I do have now src/lib/libxml (not src/lib/xml/libxml!!)
============================
configure.in part for the components
---------------

dnl ---- Check for libxml library

GB_COMPONENT(
  libxml,
  LIBXML,
  [LIBXML component],
  [GB_FIND(xmlversion.h, `xml2-config --prefix 2> /dev/null`, include)],
  [GB_FIND(libxml2.$SHLIBEXT, `xml2-config --prefix 2> /dev/null`, lib)], 
  [$C_LIB `xml2-config --libs 2> /dev/null`])

GB_COMPONENT(
  rpc,
  RPC,
  [RPC component],
  [GB_FIND(xmlwriter.h, `xml2-config --prefix 2> /dev/null`, include)],
  [GB_FIND(libxml2.$SHLIBEXT, `xml2-config --prefix 2> /dev/null`, lib)], 
  [$C_LIB `xml2-config --libs 2> /dev/null`])


============================
configure.in for last part for AC_OUTPUT(
------------

......
src/lib/compress/bzlib2/Makefile \
src/lib/libxml/Makefile \
src/lib/libxml/rpc/Makefile \
)


============================
src/lib/Makefile.am
------------

SUBDIRS = debug eval db compress @QT_DIR@ @NET_DIR@ @SDL_DIR@ @VB_DIR@ @LIBXML_DIR@ 
EXTRA_DIST = *.component example

install-exec-local:
 @cp -f *.component $(pkglibdir)

============================
src/lib/libxml/Makefile.am
------------

SUBDIRS = rpc
INCLUDES = -I$(top_srcdir)/src/share -I/usr/local/include/libxml2

EXTRA_DIST = *.component

pkglib_LTLIBRARIES = lib.gb.libxml.la

lib_gb_libxml_la_LIBADD =
lib_gb_libxml_la_LDFLAGS = @LD_FLAGS@ -lxml2 -lpthread -lz -lm -lxslt 

lib_gb_libxml_la_SOURCES = main.h main.c CXMLNode.h CXMLNode.c CXMLReader.h CXMLReader.c \
                           CXMLWriter.h CXMLWriter.c CXMLDocument.h CXMLDocument.c \
      CXSLT.h CXSLT.c

 install-exec-local:
 @cp -f *.component $(pkglibdir)


============================
src/lib/libxml/rpc/Makefile.am
------------

INCLUDES = -I$(top_srcdir)/src/share -I/usr/local/include/libxml2

EXTRA_DIST = *.component

pkglib_LTLIBRARIES = lib.gb.libxml.rpc.la

lib_gb_libxml_rpc_la_LIBADD =
lib_gb_libxml_rpc_la_LDFLAGS = @LD_FLAGS@ -lxml2 -lpthread -lz -lm -lxslt 

lib_gb_libxml_rpc_la_SOURCES = main.h main.c CXxmlRpc.h CXmlRpc.c 

 install-exec-local:
 @cp -f *.component $(pkglibdir)

*******************************
  --------------
   note: I can't use @LIBXML_INC@ in first line for xml!
  --------------


This compiles without a error
The make install does install the libraries in the runtime place
Still do not have the *.list and *.info files
And the libxml is also not in the help.


What can be wrong???

>>Create a Makefile.am file in each directory and subdirectory:
>> ./src/lib/xml
>> ./src/lib/xml/libxml
>> ./src/lib/xml/libxml/rpc

Nice, but what must be in /src/lib/xml/Makefile.am ?
Something like in then/src/lib/Makefile.am or ./src/lib/net/Makefile.am 
sounds realistic but I cant get it working with the src/lib/xml/libxml


Ron





More information about the Devel mailing list