Getting at Libs.private from autoconf

Tollef Fog Heen tfheen at err.no
Wed Feb 11 13:21:39 PST 2009


]] David Evans 

| On Wed, Feb 11, 2009 at 07:33:14AM +0100, Tollef Fog Heen wrote:
| > ]] David Evans 
| > 
| > |   Libs.private is nice but there doesn't seem to b a clean way of
| > | getting at --libs --shared from autoconf.  How about defining
| > | foo_STATICLIBS to do this?  Something like
| > 
| > The problem with this (and particularly this approach) is that you end
| > up always calling pkg-config --static on all invocations.
| 
|   True,. although you already call pkg-config twice (for --cflags and
| --libs).  Is --statiuc expeced to be expensive or is it just that it's
| silly to call it evvery time if it's rarely used?

The problem is it'll break if you don't have all the recursive
dependencies installed, not the cost of calling pkg-config.

| > This is
| > something we don't want to: in the general case, you don't need all
| > recursive private dependencies of your requirements.  I guess we could
| > add a fifth parameter to PKG_CHECK_MODULES, or add an
| > PKG_CHECK_MODULES_STATIC.
| 
|   Well, something less ugly than
| 
| AC_SUBST([SWI_STATICLIBS], [`pkg-config --libs --static pl`])
| 
| would be nice.

Indeed.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


More information about the pkg-config mailing list