Boost logo

Boost :

From: Mathew Robertson (mathew.robertson_at_[hidden])
Date: 2004-06-24 20:44:59


> I'm finally ready to start working towards the next release, which as
> some of you might remember I volunteered to manage.

Can a make a few small suggestions... I could find much mention of these in the list archives, so I apologise in advance if these suggestion offend anyone... Note that this is my first post to the list, and its from a library users' point of view (ie not the library developers POV). And that I'm focusing on Posix'y systems...

To allow the autoconf tools (ie configure) to detect the presence of the various Boost libs and header file versions, would it be possible to add a C-linkage function to each libraries' source file(s). This would allow users to add a configure check which detects if a particular library instance is installed. For example, we add the following code to each library instance:

   extern "C" boost_autoconf() {}

This allows autoconf users to add a test to their configure.in script:

  AC_CHECK_LIB(boost_regex,boost_autoconf,...,[Boost::Regex library not found])

The extern simply needs to be added to one of the top cpp files in each library.

Note that I have only focused on Boost::Regex I am unsure if other libraries implement such functionality (the complete Boost API is huge... :)

Would it be possible to get bjam to detect the system installed compiler, then if it matched the "-sTOOLS=xxx" name, then it would install a version of the target libraries which doesn't include the compiler name? eg installing Boost results in libraries names like "libboost_signals-gcc.so" - it would be useful to install a library names like "libboost_signals.so". The main reason is that when you build your application, 'make' will use the $(CC) value (which is often 'gcc', 'aCC', 'cc', etc) automatically dependant on the platform - the application doesn't care which compiler it is built with, it only cares that it is the 'default system compiler'.

Boost installs its include files in $PREFIX/include/boost-<version>/boost (where prefix is something like /usr/local). Would it be possible to install a symlink which effestively implements:

   cd $PREFIX/include
   ln -s boost-<version>/boost boost

but only if the symlink didn't already exist. This would allow users to do a default/generic install of Boost, without them need to specify the specific version of the libraries within their build/make system.

Finally (if there isn't a technique to do this already), would it be possible for the main boost/config.hpp to include a version number as a #define (or something similar), so the the application build tools could detect the whether the installed version is sufficient.

Any comments welcome...
Mathew Robertson


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk