Getting at Libs.private from autoconf

David Evans David.Evans at
Wed Feb 11 01:39:27 PST 2009

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?

> 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

  Well, something less ugly than

AC_SUBST([SWI_STATICLIBS], [`pkg-config --libs --static pl`])

would be nice.

David Evans                                     David.Evans at
Research Associate              
Computer Laboratory, University of Cambridge

More information about the pkg-config mailing list