r10509: Some more sconscript fixes. Now getting to link stage for smbclient
[bbaumbach/samba-autobuild/.git] / source4 / lib / netif / SConscript
1 Import('hostenv defines')
2
3 if hostenv['configure']:
4         conf = Configure(hostenv)
5
6         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']:
7                 if conf.CheckCHeader(h):
8                         defines['HAVE_' + h.upper().replace('.','_').replace('/','_')] = 1
9         
10         for d in ['HAVE_IFACE_IFCONF','HAVE_IFACE_AIX','HAVE_IFACE_IFREQ']:
11                 if conf.TryRun("""
12 #define %s 1
13 #define AUTOCONF_TEST 1
14 #include "confdefs.h"
15 #include "netif.c"
16 """ % d, '.c'):
17                         defines[d] = 1
18                         break
19
20         conf.Finish()
21
22 hostenv.StaticLibrary('netif', ['interface.c', 'netif.c'])