[Scons-dev] SConf description

anatoly techtonik techtonik at gmail.com
Sat Jun 21 04:01:07 EDT 2014


Thanks for reviews.

On Wed, Jun 4, 2014 at 6:00 PM, Gary Oberbrunner <garyo at oberbrunner.com>
wrote:

> 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:
>

Just to clarify. Does SConf generate header automatically? Does it update
variables in environment itself as well?

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.
>

It is SCons running tests implicitly during DAG processing phase or user in
SConstruct during DAG build phase?

I tried to get rid of any apriori knowledge about legacy systems and you
put back "autoconf" again. =) I'd also remove the last sentence, because it
adds uncertainty back - I don't understand how to use variables to direct
the build.

Also, can you show some code examples? My 5 minute attempt failed to find
any.


> 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.
>


Here is the edited revision.

"""SCons.SConf

Autoconf-like configuration support.

In other words, SConf is used to run tests on the build system to detect
various things: if compiler sees header files, if libraries are installed,
if
some symbols are defined, compiler options supported, and more. Based
on those results, SConf can generate config files and update variables in
environment."""

-- 
anatoly t.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140621/0c5c9f01/attachment.html>


More information about the Scons-dev mailing list