blob: 3e36fc55fee02adf9cff4dac1280dc2b44c85a2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Import('hostenv defines')
if hostenv['configure']:
conf = Configure(hostenv)
for h in ['arpa/inet.h','net/if.h','netdb.h','netinet/in.h','netinet/ip.h','netinet/tcp.h','netinet/in_systm.h','netinet/in_ip.h']:
if conf.CheckCHeader(h):
defines['HAVE_' + h.upper().replace('.','_').replace('/','_')] = 1
for d in ['HAVE_IFACE_IFCONF','HAVE_IFACE_AIX','HAVE_IFACE_IFREQ']:
if conf.TryRun("""
#define %s 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
#include "netif.c"
""" % d, '.c'):
defines[d] = 1
break
conf.Finish()
hostenv.StaticLibrary('netif', ['interface.c', 'netif.c'])
|