set powermate env keys in SConstruct, so that POWERMATE is set even if SURFACES=false
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 3 Jul 2007 22:22:04 +0000 (22:22 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 3 Jul 2007 22:22:04 +0000 (22:22 +0000)
git-svn-id: svn://localhost/ardour2/trunk@2101 d708f5d6-7413-0410-9779-e7cbd77b26cf

SConstruct

index 93be1e9b478d5ba4b6927ce5c38a553c76eb9e02..d88e8989cbb4faae96e0ef46362e392952ee0d25 100644 (file)
@@ -727,6 +727,12 @@ if conf.CheckLib ('usb', 'usb_interrupt_write'):
 else:
     have_libusb = False
 
+# check for linux/input.h while we're at it for powermate
+if conf.CheckHeader('linux/input.h'):
+    have_linux_input = True
+else:
+    have_linux_input = False
+
 libraries['usb'] = conf.Finish ()
 
 #
@@ -1002,8 +1008,18 @@ if env['SURFACES']:
     else:
         env['TRANZPORT'] = 0
         print 'Disabled building Tranzport code because libusb could not be found'
+
+    if have_linux_input:
+        env['POWERMATE'] = 1
+    else:
+        env['POWERMATE'] = 0
+        print 'Disabled building Powermate code because linux/input.h could not be found'
+
     if os.access ('libs/surfaces/sony9pin', os.F_OK):
         surface_subdirs += [ 'libs/surfaces/sony9pin' ]
+else:
+    env['POWERMATE'] = 0
+    env['TRANZPORT'] = 0
 
 opts.Save('scache.conf', env)
 Help(opts.GenerateHelpText(env))