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

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.

Ian Fasel

Usage: xml2-config [OPTION]

Known values for OPTION are:

--prefix=DIR change libxml prefix [default
--exec-prefix=DIR change libxml exec prefix
[default /sw]
--libs print library linking
--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.


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at