diff -up ardour-2.4/SConstruct.orig ardour-2.4/SConstruct
--- ardour-2.4/SConstruct.orig	2008-03-31 23:53:54.000000000 +0200
+++ ardour-2.4/SConstruct	2008-04-07 10:05:55.000000000 +0200
@@ -45,6 +45,7 @@ opts.AddOptions(
     BoolOption('LIBLO', 'Compile with support for liblo library', 1),
     BoolOption('NLS', 'Set to turn on i18n support', 1),
     PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
+    ('LIBDIR', 'Set librarydir (lib/lib64)', 'lib'),
     BoolOption('SURFACES', 'Build support for control surfaces', 1),
     BoolOption('SYSLIBS', 'USE AT YOUR OWN RISK: CANCELS ALL SUPPORT FROM ARDOUR AUTHORS: Use existing system versions of various libraries instead of internal ones', 0),
     BoolOption('UNIVERSAL', 'Compile as universal binary.  Requires that external libraries are already universal.', 0),
@@ -735,13 +736,6 @@ if env['FPU_OPTIMIZATION']:
             print "\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)"
 # end optimization section
 
-# handle x86/x86_64 libdir properly
-
-if env['DIST_TARGET'] == 'x86_64':
-    env['LIBDIR']='lib64'
-else:
-    env['LIBDIR']='lib'
-
 #
 # a single way to test if we're on OS X
 #
@@ -767,18 +761,6 @@ env.Append(CONFIG_ARCH=config[config_arc
 if env['ARCH'] != '':
     opt_flags = env['ARCH'].split()
 
-#
-# prepend boiler plate optimization flags
-#
-
-opt_flags[:0] = [
-    "-O3",
-    "-fomit-frame-pointer",
-    "-ffast-math",
-    "-fstrength-reduce",
-    "-pipe"
-    ]
-
 if env['DEBUG'] == 1:
     env.Append(CCFLAGS=" ".join (debug_flags))
     env.Append(LINKFLAGS=" ".join (debug_flags))
@@ -1031,10 +1031,12 @@ if env['SYSLIBS']:
 #    libraries['libglademm'].ParseConfig ('pkg-config --cflags --libs libglademm-2.4')
 
 #    libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas')
+
     libraries['soundtouch'] = LibraryInfo()
-    #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
-    # Comment the previous line and uncomment this for Debian:
-    libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch')
+    if env['VST'] or not env['RUBBERBAND']:
+        #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
+        # Comment the previous line and uncomment this for Debian:
+        libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch')
 
     libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
                                             LIBPATH='#libs/appleutility',
@@ -1177,7 +1177,11 @@ else:
 # timestretch libraries
 #
 
-timefx_subdirs = ['libs/soundtouch']
+if not env['SYSLIBS'] and (env['VST'] or not env['RUBBERBAND']):
+  timefx_subdirs = ['libs/soundtouch']
+else:
+  timefx_subdirs = [ ]
+
 if env['RUBBERBAND']:
     timefx_subdirs += ['libs/rubberband']
 
