Description
This issue was originally created at: 2009-07-16 05:10:31.
This issue was reported by: bms
.
bms said at 2009-07-16 05:10:31
The CheckHeader()
and other checks allow Autoconf to be replaced.
However, whilst the configuration context is documented to contain context.headerfilename
, there doesn't appear to be any way of setting this variable when the configuration context is created, and it probably needs changes to SCons itself.
It is explicitly set to None
when the context is created, and that's it.
Therefore, confdefs.h
is never created, so SCons configuration tests never actually get to see HAVE_FOO_H
defines.
gregnoel said at 2009-11-10 18:02:04
Bug party triage.
gregnoel said at 2010-07-21 17:00:31
Bug party triage. Bump the priority of this issue.
garyo said at 2010-07-25 13:27:27
I've looked into this a little. It's a bit convoluted. At first I thought this bug was referring to config.h
generation. You can specify a config.h
file name when creating the context (via the config_h
arg); what happens is the SConf code builds a set of #define
strings based on user's calls to sconf.Define()
and those end up in config.h
. However config.h
is never created during the configuration tests; there's a builder that is set up in Main.py
(where it calls SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment())
, which builds config.h
from the strings) that makes sure config.h
is up-to-date before any source file needs it. That part seems to work OK.
But this bug is really about confdefs.h
, which is (according to the code) supposed to be created and updated during the tests. Most of the logic there is in Conftest.py
. That code seems to me to be incomplete. There's no way to specify it when creating a Configure context, and even if I do it manually it doesn't get into the individual CheckContext
instance, which is where it's needed. And if I do pass it all the way through, there are errors in the configure tests due to the file being missing. I think basically it was never finished. At least that's what it looks like to me from Conftest.py
.
We should figure out what's needed to finish it so it works. At least:
- an arg to
Configure()
to specify thatconfdefs.h
should be used (or default it on?) - pass that name to
CheckContext
when creating those - create the file if it doesn't exist, before running tests
- make it actually work in
Conftest.py
(_Have
, etc.) - write tests
- update doc
Votes for this issue: 1.