$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Build/make tools] My strong interest in some 'boost-config' script...
From: Esben Mose Hansen (boost_at_[hidden])
Date: 2009-03-11 10:26:41
On Wednesday 11 March 2009 11:54:24 François Mauger wrote:
> As a  programmer under Unix-like  systems, I really appreciate  when a
> library (say  `mylib') provides some `mylib-config'  script that helps
> its  users  to  build  compiler flags.   Several  industrial  strength
> libraries have such  a tool: GSL, MySQL and, in  the field of particle
> physics software I work: CLHEP, ROOT, CERNLIB...
[...]
> So I have a few questions:
> - Is there such a script hidden in the Boost source tree?
I am not an expert in Boost, but I do not believe there is such a script, or 
even a pkg-config file. From the archives, the post 
http://listarchives.boost.org/Archives/boost/2007/02/116513.php
which is essentially identical to yours, received no replies. It seems most 
people use either the GNU autotools or the CMake build system to automatically 
find and use Boost headers and libraries. Of these, CMake is what I would 
recommend, unless you plan to deploy or compile on obscure Unix platforms. 
CMake provides the FindBoost.cmake, which in recent versions is quite decent.
> - If not, is there any plan to provide one?
Not that I can see. It is not so easy to do as it first appears, though. 
Essentially, you would need to generate a pkg-config file containing the base 
include for boost, the path to the library install dir and the names of all 
the relevant libraries for the boost installation. However
 * such a file would need to be generated by the build system 
 ** The build system in Boost is the little-known or used bjam system. 
 ** Also, I think the system would also have to work with CMake, as I believe 
that boost can or soon will be able to build with CMake.
 * The system would need to be able to handle several parallel installs in 
different versions.
 * The system would have to somehow handle the several components that 
comprises boost.
These difficulties might be large enough that it is beyond the scope of pkg-
config or a utility script such as you describe. So perhaps simply using CMake 
(or GNU autotools) would be the simplest solution. Such a solution would also 
be able to automatically handle most or all or your configuration, 
dependencies, and installation needs. Personally, I think that Makefiles are 
only useful for small scripts or as an intermediate language.
> - Is someone else interested with it?
Quite likely, though I think most people just goes with auto* or CMake.
Hope this helps.
-- Kind regards, Esben