Boost logo

Boost-Build :

From: Ian Fasel (ianfasel_at_[hidden])
Date: 2004-09-09 18:13:28


A lot of projects built with the GNU automake, etc.
come with a program which outputs the necessary
CFLAGS, LIBS, etc. one would need to compile a program
using it. It is called XXX-config, where XXX is the
project name, e..g., xml2-config or gtk-config.

The output would be like:
$ xml2-config --libs
-L/sw/lib -lxml2 -lz -lpthread -L/sw/lib -liconv -lm

So on the command line, I could use it like this:
$ g++ a.cpp `xml2-config --cflags` `xml2-config
--libs`

I'm wondering if there's any way to easily use these
kinds of tools in a Boost.Build project. I'm
thinking I could write an action that assigns the
output of a shell command to a variable so I could use
it like:

exe a : a.cpp : <cflags>$(LIBXMLSTUFF) ;

But I'm not sure how to do this.

Thanks,
Ian Fasel

==========================
Usage: xml2-config [OPTION]

Known values for OPTION are:

--prefix=DIR change libxml prefix [default
/sw]
--exec-prefix=DIR change libxml exec prefix
[default /sw]
--libs print library linking
information
--libtool-libs print linking information for
use with libtool
--cflags print pre-processor and
compiler flags
--help display this help and exit
--version output version information

__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk