No, I just forgotten to report it.
However, this is the full wscript of my module:
def configure(conf):
lib = conf.create_library_configurator()
lib.mandatory = False
lib.name = 'xml2'
lib.define = 'XML2'
lib.uselib = 'XML2'
haxXml2 = lib.run()
if not haxXml2:
message = 'library xml2 not installed'
conf.env['XML2'] = False
else:
message = 'ok'
conf.env['XML2'] = True
conf.report_optional_feature("libxml2", "arigtt-agent, needing
libxml2",
conf.env['XML2'],
message)
def build(bld):
module = bld.create_ns3_module('arigtt-agent', ['internet-stack'])
if bld.env()['XML2']:
module.source = [
'arigtt-packets.cc',
'arigtt-agent.cc',
'arigtt-directory.cc',
]
module.uselib = 'XML2'
headers = bld.create_obj('ns3header')
headers.module = 'arigtt-agent'
headers.source = [
'arigtt-agent.h',
'arigtt-packets.h',
'arigtt-directory.h',
]
(by the way, is there a more elegant way that putting the whole thing
into an "if" to tell waf not even to try to compile the module if a
certain library is not available?)