[Ns-developers] fixing src/contrib/wscript for xml-gtkconfig store

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Thu Mar 19 23:57:58 PDT 2009


just define module.uselib separately to '' before both ifs: the gtk
config store and the xml backend of the config store are independent.

Mathieu

On Thu, 2009-03-19 at 23:11 -0400, Raj Bhattacharjea wrote:
> On systems without GTK+, but on which libxml is found by waf, the xml
> config store (which has been merged to ns-3-dev) wscript code screws
> things up:
> 
>     if bld.env['ENABLE_GTK_CONFIG_STORE']:
>         headers.source.append ('gtk-config-store.h')
>         module.source.append ('gtk-config-store.cc')
>         module.uselib = 'GTK_CONFIG_STORE'
> 
>     if bld.env['ENABLE_LIBXML2']:
>         module.source.append ('xml-config.cc')
>         module.uselib = module.uselib + ' LIBXML2'
> 
> The issue is that module.uselib won't not exist as an rvalue in the
> second "if" block if the first one didn't execute.  The first thing I
> think of is:
> 
>      if bld.env['ENABLE_LIBXML2']:
>          module.source.append ('xml-config.cc')
> -        module.uselib = module.uselib + ' LIBXML2'
> +        if bld.env['ENABLE_GTK_CONFIG_STORE']:
> +            module.uselib = module.uselib + ' LIBXML2'
> +        else:
> +            module.uselib =' LIBXML2'
> 
> But I'm not sure this is right.  Mathieu, what is the desired behavior
> if GTK is not present but libxml is?  How can we fix this?
> 



More information about the Ns-developers mailing list