[Scons-dev] SConf description

Gary Oberbrunner garyo at oberbrunner.com
Wed Jun 4 11:00:41 EDT 2014


On Sun, Jun 1, 2014 at 5:56 AM, anatoly techtonik <techtonik at gmail.com>
wrote:

> Hi,
>
> While looking at the SConf code I've tried to explain what does
> "Autoconf-like configuration support" means. It would be nice if you can
> check that description is accurate:
>
>
> """SCons.SConf
>
> Autoconf-like configuration support.
>
> In other words, this package allows to run series of tests to detect
> capabilities of current system and generate config files (header files
> in C/C++) that turn on system-specific options and optimizations.
>
> For example, it is possible to detect if optional libraries are present
> on current system and generate config that makes compiler include them.
> C compilers do not have ability to catch ImportError if some library is
> not found, so these checks should be done externally.
> """
>
> Actually it can do two kinds of things with the test results: create a
header file, like autoconf, and update variables in the Environment.  Often
that's all you need.  Here's a hopefully simpler paragraph:

The SConf subsystem allows SCons to run tests on the build system to detect
various things: header files, libraries, symbol definitions, supported
compiler options, and more.  Based on those results, it can create an
autoconf-style config header and/or update SCons variables in an
Environment (such as LIBS, LIBPATH, CPPPATH or anything else).  Those
variables can then be used to direct the build appropriately.

I'd leave out the last sentence because it's not particularly relevant and
could be confusing.  SConf is just as useful in building LaTeX or Fortran
or SWIG as it is for C.

-- 
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140604/409349c5/attachment.html>


More information about the Scons-dev mailing list