>> The second patches the init file as above. It also adds an argument >> extraroot which adds to the include search path and the lib path >> (and to >> the runtime link path since it is needed to make the boost tests pass >> currently). > > I can't apply this patch because it would break builds for everything > except gcc and Python 2.5 on Linux. But I can certainly put in an > equivalent feature which works everywhere if you can briefly explain > the > use case. I didn't know how to add the required bits for other compilers (and, in fact, my solution doesn't really work for 64 bit machines).
The idea is to have a general mechanism to add a path to the compiler search paths for libraries and include files. The standard mechanisms are either to use CPPFLAGS and LIBFLAGS environment variables or add libname=path_to_lib for each libname. Ben doesn't like the former and I don't like the latter since we actually add it to the search path for all libraries. This bit me when trying to use the salilab svn modeller since imp is placed there and the compiler would mix the diva and local versions of IMP.
What I really want is an "add this path to the include search path" and "add this path to the lib search path" option that can be passed multiple times to scons so we can add more than one thing. i.e.
scons addlibpath=$HOME/fs/ib addlibpath=/opt/local/lib addincludepath= $HOME/fs/include
obviously, those names suck.
Anyone have a good idea for an interface which can be done easily in scons?