Fixed veclib support on OSX.

git-svn-id: svn://localhost/trunk/ardour2@150 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Taybin Rutkin 2005-11-29 18:02:29 +00:00
parent 4a19b4732f
commit 0f5dc81541
6 changed files with 16 additions and 8 deletions

View file

@ -7,6 +7,7 @@ import shutil
import glob import glob
import errno import errno
import time import time
from sets import Set
import SCons.Node.FS import SCons.Node.FS
SConsignFile() SConsignFile()
@ -34,7 +35,8 @@ opts.AddOptions(
BoolOption('VST', 'Compile with support for VST', 0), BoolOption('VST', 'Compile with support for VST', 0),
BoolOption('VERSIONED', 'Add version information to ardour/gtk executable name inside the build directory', 0), BoolOption('VERSIONED', 'Add version information to ardour/gtk executable name inside the build directory', 0),
BoolOption('USE_SSE_EVERYWHERE', 'Ask the compiler to use x86/SSE instructions and also our hand-written x86/SSE optimizations when possible (off by default)', 0), BoolOption('USE_SSE_EVERYWHERE', 'Ask the compiler to use x86/SSE instructions and also our hand-written x86/SSE optimizations when possible (off by default)', 0),
BoolOption('BUILD_SSE_OPTIMIZATIONS', 'Use our hand-written x86/SSE optimizations when possible (off by default)', 0) BoolOption('BUILD_SSE_OPTIMIZATIONS', 'Use our hand-written x86/SSE optimizations when possible (off by default)', 0),
BoolOption('BUILD_VECLIB_OPTIMIZATIONS', 'Build with Apple Accelerate/vecLib optimizations when possible (off by default)', 0)
) )
#---------------------------------------------------------------------- #----------------------------------------------------------------------
@ -52,6 +54,10 @@ class LibraryInfo(Environment):
self.Append (LIBPATH = other.get ('LIBPATH', [])) self.Append (LIBPATH = other.get ('LIBPATH', []))
self.Append (CPPPATH = other.get('CPPPATH', [])) self.Append (CPPPATH = other.get('CPPPATH', []))
self.Append (LINKFLAGS = other.get('LINKFLAGS', [])) self.Append (LINKFLAGS = other.get('LINKFLAGS', []))
self.Replace(LIBS = list(Set(self.get('LIBS', []))))
self.Replace(LIBPATH = list(Set(self.get('LIBPATH', []))))
self.Replace(CPPPATH = list(Set(self.get('CPPPATH',[]))))
#doing LINKFLAGS breaks -framework
env = LibraryInfo (options = opts, env = LibraryInfo (options = opts,
@ -566,6 +572,12 @@ if config[config_arch] == 'apple':
libraries['core'].Append (LIBPATH = [ '/opt/local/lib' ]) libraries['core'].Append (LIBPATH = [ '/opt/local/lib' ])
if os.path.isdir('/opt/local/include'): if os.path.isdir('/opt/local/include'):
libraries['core'].Append (CPPPATH = [ '/opt/local/include' ]) libraries['core'].Append (CPPPATH = [ '/opt/local/include' ])
if env['BUILD_VECLIB_OPTIMIZATIONS'] == 1:
opt_flags.append ("-DBUILD_VECLIB_OPTIMIZATIONS")
debug_flags.append ("-DBUILD_VECLIB_OPTIMIZATIONS")
libraries['core'].Append(LINKFLAGS= '-framework Accelerate')
if config[config_cpu] == 'powerpc': if config[config_cpu] == 'powerpc':
# #
# Apple/PowerPC optimization options # Apple/PowerPC optimization options

View file

@ -482,14 +482,11 @@ ExportDialog::set_state()
if (nchns == 2) { if (nchns == 2) {
if (r % 2) { if (r % 2) {
rows[r][exp_cols.right] = true; rows[r][exp_cols.right] = true;
// master_selector.cell (r, 2).set_pixmap (check_pixmap, check_mask);
} else { } else {
rows[r][exp_cols.left] = true; rows[r][exp_cols.left] = true;
// master_selector.cell (r, 1).set_pixmap (check_pixmap, check_mask);
} }
} else { } else {
rows[r][exp_cols.left] = true; rows[r][exp_cols.left] = true;
// master_selector.cell (r, 1).set_pixmap (check_pixmap, check_mask);
} }
} }

View file

@ -22,7 +22,6 @@
#define __ardour_gtk_utils_h__ #define __ardour_gtk_utils_h__
#include <string> #include <string>
#include <vector>
#include <cmath> #include <cmath>
#include <ardour/types.h> #include <ardour/types.h>
#include <libgnomecanvasmm/line.h> #include <libgnomecanvasmm/line.h>

View file

@ -216,7 +216,7 @@ ARDOUR::init (AudioEngine& engine, bool use_vst, bool try_optimization, void (*s
} }
#elif defined (__APPLE__) #elif defined (__APPLE__) && defined (BUILD_VECLIB_OPTIMIZATIONS)
long sysVersion = 0; long sysVersion = 0;
if (noErr != Gestalt(gestaltSystemVersion, &sysVersion)) if (noErr != Gestalt(gestaltSystemVersion, &sysVersion))

View file

@ -114,7 +114,7 @@ mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, jack_nframes_t nf
} }
} }
#if defined (__APPLE__) #if defined (__APPLE__) && defined (BUILD_VECLIB_OPTIMIZATIONS)
#include <Accelerate/Accelerate.h> #include <Accelerate/Accelerate.h>
float float

View file

@ -417,7 +417,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories # directories like "/usr/src/myproject". Separate the files or directories
# with spaces. # with spaces.
INPUT = src include INPUT = src flowcanvas
# If the value of the INPUT tag contains directories, you can use the # If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp