Making pkgconfig easier to use with autoconf

Malcolm Tredinnick malcolm at commsecure.com.au
Wed Nov 5 01:57:01 EET 2003


On Wed, 2003-11-05 at 04:17, Carl Worth wrote:
> (I didn't see a more relevant list for pkgconfig feature requests, so
> please let me know if I missed something.)
> 
> First, I have to say I'm delighted with pkgconfig. It actually makes
> doing some of the autotools-based build management almost bearable.
> 
> But, I am exceedingly lazy, and I'd like it to be one step
> easier. Currently, in my configure.in, I have a list of package
> dependencies, something like:
> 
> 	PKG_CHECK_MODULES(CAIRO, slim >= 0.2.0 libic >= 0.1.3 xft xrender >= 0.6)
> 
> Then, I have a parallel list in my cairo.pc.in file:
> 
> 	Requires: slim libic xft xrender
> 
> And I don't want to have to maintain both lists. Is there already a
> way to do this, and I'm doing something wrong? Otherwise, how hard
> would it be for the PKG_CHECK_MODULES macro to set a variable that I
> could drop into my .pc.in file, something like:
> 
> 	Requires: @PKG_CHECK_REQUIRES@

If you are one of the people who likes hacking on m4, you can possibly
modify this macro

http://www.gnu.org/software/ac-archive/htmldoc/ac_config_pkgconfig_in.html

to do what you want (that macro purports to create the entire .pc.in
file, but I have my doubts about its appropriateness in many
circumstances).

Cheers,
Malcolm




More information about the xdg mailing list