From 3239d42bdfa5278bce3b9eeab3cb3f20426cd685 Mon Sep 17 00:00:00 2001 From: Jesse Chappell Date: Tue, 3 Jul 2007 02:16:55 +0000 Subject: 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 --- SConstruct | 13 +++++++++++++ libs/surfaces/powermate/SConscript | 9 +++++---- 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' ] + -- cgit v1.2.3