Re: [xml] Generating a correct xml2-config for use with --libs

On Thu, Jun 13, 2002 at 12:02:17PM +0100, Gary Pennington wrote:

Patches which removes the unnecessary declaration of dependencies on 
libraries which libxml2 depends upon itself, when generating the 
xml2-config script.


Applications should only depend on those libraries which they need to 
link to.


xml2-config lists all the libraries which libxml2 itself depends on, 
when xml2-config is invoked:


$ xml2-config --libs
-L/usr/local/libxml/sparc/lib -R/usr/local/libxml/sparc/lib -lxml2 -lz 
-lpthread -lm -lsocket -lnsl

This is wrong, the following is correct:

$ xml2-config --libs
-L/usr/local/libxml/sparc/lib -R/usr/local/libxml/sparc/lib -lxml2

  Hum, I don't see why !

If libxml2 requires -lsocket, then I want it on the linker command line.

I want 
  $(CC) `xml2-config --cflags` foo.c -o foo `xml2-config --libs`

to be a working command to compile and link foo.c if it depends on libxml2
and this independantly of the (unix-like) system it's ran on. I don't really
care about extra dependancies, but I really want it to work everywhere.

Maybe Solaris doesn't need this, but then please make the patch conditional
to Solaris first (unless I misunderstood something).



Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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