build: detect support for ethtool
authorMichael Adam <obnox@samba.org>
Mon, 25 Jan 2016 02:30:39 +0000 (03:30 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 26 Jan 2016 06:33:16 +0000 (07:33 +0100)
Pair-Programmed-With: Anoop C S <anoopcs@redhat.com>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/socket/wscript [new file with mode: 0644]
wscript

diff --git a/lib/socket/wscript b/lib/socket/wscript
new file mode 100644 (file)
index 0000000..d8c269a
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+
+def configure(conf):
+    conf.CHECK_HEADERS('linux/sockios.h linux/ethtool.h')
+    if (conf.CONFIG_SET('HAVE_LINUX_SOCKIOS_H') and \
+                    conf.CONFIG_SET('HAVE_LINUX_ETHTOOL_H')):
+        conf.DEFINE('HAVE_ETHTOOL', 1)
diff --git a/wscript b/wscript
index c3c3cfd..41ed5da 100644 (file)
--- a/wscript
+++ b/wscript
@@ -180,6 +180,7 @@ def configure(conf):
     conf.RECURSE('lib/texpect')
     if conf.env.with_ctdb:
         conf.RECURSE('ctdb')
+    conf.RECURSE('lib/socket')
 
     conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()