[Scons-users] Library configuration

Evan Driscoll driscoll at cs.wisc.edu
Wed Jun 20 12:45:33 EDT 2012


On 06/20/2012 12:51 AM, Brady Johnson wrote:

> Additionally, SCons has

> integrated support for functionality similar to autoconf, as can be

> found here: http://www.scons.org/doc/production/HTML/scons-user/c4132.html


Unfortunately, having read over that chapter of the user's guide, the
corresponding section of the man page, and some wiki pages, I don't
think that provides the functionality that I'm looking for. It lets you
test for the presence of a library, but unless I'm missing something, it
doesn't help with finding it in the first place.

(This means that in the case where the library is required for a build,
it seems like the principle thing it accomplishes is to give a nice
"you're missing libthingy" error instead of having the compiler emit a
"you're missing thingy.h, oh and by the way, here are 200 other error
messages." Does this sound like a fair characterization?)


Part of the reason I'm asking is because I'm contemplating trying to
write some standard support for this, because it feels like I keep
writing the same thing over and over again. (My Boost example is only
contrived in the way that it fails. :-))

What I'm thinking is changing 'conf.CheckLibrary('boost')' (or adding a
new function) so that it will automagically check command line flags for
with-boost-incdir/with-boost-libdir or something similar, and adding
those to LIBPATH/CPPPATH if present. And I'm trying to feel out the
waters to find out what people are doing right now. The benefit would be
that (1) it would be a lot easier for someone writing an SConscript to
offer this functionality, as opposed to now where it's easy to be lazy
and make it so you have to edit the SConscripts if you have things in
weird paths and (2) it would hopefully give some uniformity in how those
features are accessed.

And while I'm at it, I might as well ask now: does this feature sound
(a) awesome, (b) meh, (c) stupid?

Evan


More information about the Scons-users mailing list