very basic SConfigure support available

Stephan Kulow coolo at kde.org
Sun Oct 23 09:16:33 CEST 2005


On Sunday 23 October 2005 02:01, Ralf Habacker wrote:
> conf.cheaders += "unistd.h"

This shows clearly that it will suck as you need to know very well about
white spaces. I think strings are a dead end here.

conf should be a obj that has functions you need to call to append something.
And before you implement parsers, you should make a design what is supposed
to be in the files.

And you also need to put some extra functions in the conf obj that e.g. 
control in what config.h the results are written to.

So I picturing:

conf.setConfigHeader("dcop/config-dcop.h")
conf.checkFunction("setenv")
conf.checkHeaders(['sys/time.h', ['unistd.h'])

if conf.checkWithArg('dpms', conf.HelpString('without-dpms','disable DPMS 
power saving'):
   have_dpms=no
else:
  conf.checkLink(.....

With other words: I don't think the API of autoconf's macros was bad and we 
should stick to an API also for configure checks. Still you want tons of 
helper functions and you want them to spread in subfiles.

What will be interesting though is:
   a) to gather the help options (the "without-dpms" in the above example) for
       scons help. You don't want to evaluate the tests on help, so I guess we
       need eiter a simple parser that greps HelpString out of the SConfigure
       files or something fancy.
   b) when to do the walk. The configure.py you commited takes 2s on my
       kdelibs tree on second run - just for the walk. If you would want to do
       that on every scons run, you won't find many fans. So once again, we 
       need to come up with a solution to cache the file list with their  
       mtimes. 

Greetings, Stephan


More information about the Kde-buildsystem mailing list