# -*- 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.program(
        features='cxx',
        target='../../bin/ndndump',
        source=bld.path.ant_glob(['*.cpp']),
        includes='.',
        use='core-objects BOOST PCAP',
        )
