summaryrefslogtreecommitdiff
path: root/libs/surfaces/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'libs/surfaces/wscript')
-rw-r--r--libs/surfaces/wscript14
1 files changed, 9 insertions, 5 deletions
diff --git a/libs/surfaces/wscript b/libs/surfaces/wscript
index 1b9d5c7091..9f5c4749e7 100644
--- a/libs/surfaces/wscript
+++ b/libs/surfaces/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import Options
# Version of this package (even if built as a child)
@@ -16,8 +16,8 @@ APPNAME = 'libsurfaces'
VERSION = LIBSURFACES_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
children = [
'control_protocol',
@@ -30,7 +30,7 @@ children = [
'wiimote'
]
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def sub_config_and_use(conf, name, has_objects = True):
@@ -44,7 +44,11 @@ def configure(conf):
for i in children:
sub_config_and_use(conf, i)
- conf.check_cc (lib='libusb', header_name='libusb.h', function_name='usb_interrupt_write', define_name='BUILD_TRANZPORT')
+ autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False)
+ if conf.env['HAVE_USB']:
+ conf.define('BUILD_TRANZPORT', 1)
+
+ #conf.check_cc (lib='libusb', header_name='libusb.h', function_name='usb_interrupt_write', define_name='BUILD_TRANZPORT')
conf.check_cc (header_name='linux/input.h', define_name='BUILD_POWERMATE')
conf.check_cc (lib='lo', header_name='lo/lo.h', function_name='lo_server_new', define_name='BUILD_OSC')