emu depends on netpacket/packet.h
authorCraig Dowell <craigdo@ee.washington.edu>
Fri, 06 Feb 2009 14:53:55 -0800
changeset 4187 900966cabdc6
parent 4186 f1d57182d491
child 4188 e03522d77b63
emu depends on netpacket/packet.h
src/devices/emu/wscript
--- a/src/devices/emu/wscript	Fri Feb 06 14:49:11 2009 -0800
+++ b/src/devices/emu/wscript	Fri Feb 06 14:53:55 2009 -0800
@@ -2,11 +2,14 @@
 
 def configure(conf):
     if conf.env['ENABLE_THREADING']:
-        conf.env['ENABLE_EMU'] = True
-        conf.report_optional_feature("EmuNetDevice", "Emulated Net Device", True, 
-                                     "")
+        conf.env['ENABLE_EMU'] = conf.check(header_name='netpacket/packet.h',
+                                            define_name='HAVE_PACKET_H')
+        conf.report_optional_feature("EmuNetDevice", "Emulated Net Device",
+                                     conf.env['ENABLE_EMU'],
+                                     "<netpacket/packet.h> include not detected")
     else:
-        conf.report_optional_feature("EmuNetDevice", "Emulated Net Device", False,
+        conf.report_optional_feature("EmuNetDevice", "Emulated Net Device",
+                                     False,
                                      "needs threading support which is not available")
 
 def build(bld):