summaryrefslogtreecommitdiff
path: root/source4/lib/netif/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/netif/SConscript')
-rw-r--r--source4/lib/netif/SConscript22
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/lib/netif/SConscript b/source4/lib/netif/SConscript
new file mode 100644
index 0000000000..3e36fc55fe
--- /dev/null
+++ b/source4/lib/netif/SConscript
@@ -0,0 +1,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'])