# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
top = '../..'

ATTRIBUTE_CHECK='''
#include <stdlib.h>

static void foo(void) __attribute__ ((noreturn));

static void
foo(void)
{
  exit(1);
}

int
main(int argc, char** argv)
{
  foo();
}
'''

def configure(conf):
    conf.check(header_name="inttypes.h", mandatory=False)
    conf.check(header_name="stdint.h", mandatory=False)
    conf.check(header_name="sys/bitypes.h", mandatory=False)
    conf.check(fragment=ATTRIBUTE_CHECK, msg="Checking for __attribute__", mandatory=False)

    conf.check(header_name=["sys/types.h", "sys/time.h", "time.h"], define="TIME_WITH_SYS_TIME",
               mandatory=False)

    conf.check_cfg(path='pcap-config',
                   package="libpcap", args=['--libs', '--cflags'],
                   uselib_store='PCAP', mandatory=True)

def build(bld):
    bld(features='cxx',
        name='dump-objects',
        source=bld.path.ant_glob('*.cpp', excl='main.cpp'),
        includes='.',
        export_includes='.',
        use='core-objects BOOST PCAP',
        )

    bld(features='cxx cxxprogram',
        target='../../bin/ndndump',
        source='main.cpp',
        use='dump-objects')
