summaryrefslogtreecommitdiff
path: root/source4/lib/netif/SConscript
blob: 7630d132368c122db2d239a3bfd3d18fde62c4a2 (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.Library('netif', ['interface.c', 'netif.c'])