summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Chappell <jesse@essej.net>2007-07-03 02:16:55 +0000
committerJesse Chappell <jesse@essej.net>2007-07-03 02:16:55 +0000
commit3239d42bdfa5278bce3b9eeab3cb3f20426cd685 (patch)
treea34c380fab5ac6a5d85333b6a5ba91acda36bc70
parentb5c8f14271f55a1bef078c6eeeee1fd32f6cd305 (diff)
updated scons to make powermate optional and defaults to off when not on linux
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2096 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--SConstruct13
-rw-r--r--libs/surfaces/powermate/SConscript9
2 files changed, 18 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index ad24a75ec0..c2db8547d5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -726,6 +726,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 ()
#
@@ -996,6 +1002,13 @@ 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' ]
diff --git a/libs/surfaces/powermate/SConscript b/libs/surfaces/powermate/SConscript
index e6f7e251df..7c023949b1 100644
--- a/libs/surfaces/powermate/SConscript
+++ b/libs/surfaces/powermate/SConscript
@@ -44,12 +44,13 @@ powermate.Merge ([
libardour_powermate = powermate.SharedLibrary('ardour_powermate', powermate_files)
-Default(libardour_powermate)
+if powermate['POWERMATE']:
+ Default(libardour_powermate)
-if env['NLS']:
- i18n (powermate, powermate_files, env)
+ if env['NLS']:
+ i18n (powermate, powermate_files, env)
-env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2/surfaces'), libardour_powermate))
+ env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2/surfaces'), libardour_powermate))
env.Alias('tarball', env.Distribute (env['DISTTREE'],
[ 'SConscript' ] +