[Zlib-devel] [PATCH] mingw zlib import library name

Enrico Weigelt weigelt at metux.de
Sun May 2 16:53:40 EDT 2010


* John Bowler <jbowler at frontiernet.net> schrieb:

Hi,

> Generally there is only one .pc file, and inventing a new one 
> has exactly the same problems as inventing a new name for 
> the dynamic library.  (I.e. build scripts assume they know 
> the name of the zlib .pc file - it's zlib.pc - and don't 
> have support for other names.)

Exactly. That's just for those packages which _explicitly_ 
want static linking.

> -config files support static linking, because -config files 
> have a '--static' option, but it doesn't necessarily do 
> what you might expect; I just checked:
> 
> libpng-config --libs
> 	-lpng15
> 
> libpng-config --static --libs
> 	-lpng15 -lz

Well, looks funny ;-o

BTW: i'd consider the *-config scripts deprecated over pkg-config,
since they're harder to masquerade (eg. for crosscompiling). 
w/ pkg-config you have a generic mechanism, so the build machinery
has only one central point to cut into.
 
> (The change is because a static link needs to explicitly add -lz 
> to the command line, whereas the DLL of libpng is explicitly linked itself to zlib.)

Well, IMHO, there are platforms which require this even on shared
linking, since dll's dont have explicit dependency information there.

> In general on UNIX systems the choice is all or nothing - it's 
> not possible to cherry pick static libraries.  

Yep. For that we'd need some formal dependency description which
includes these different cases. I've done some planning for that
in the treebuild project ... but nothing usable yet ;-O
(that would also involve things like namespacing, etc, ... tricky)

cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------




More information about the Zlib-devel mailing list