diff --git a/SConstruct b/SConstruct
index 5a1440c619..0ac4322a12 100644
--- a/SConstruct
+++ b/SConstruct
@@ -29,13 +29,16 @@ opts.AddOptions(
PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'),
BoolOption('DEVBUILD', 'Use shared libardour (developers only)', 0),
BoolOption('SIGCCVSBUILD', 'Use if building sigc++ with a new configure.ac (developers only)', 0),
+ BoolOption('GTK', 'Build the GTK (graphical) version of Ardour', 1),
+ BoolOption('KSI', 'Build the KSI (text) version of Ardour', 0),
BoolOption('NLS', 'Set to turn on i18n support', 1),
BoolOption('NOARCH', 'Do not use architecture-specific compilation flags', 0),
PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
BoolOption('VST', 'Compile with support for VST', 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('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)
)
@@ -365,25 +368,19 @@ libraries['jack'].ParseConfig('pkg-config --cflags --libs jack')
libraries['xml'] = LibraryInfo()
libraries['xml'].ParseConfig('pkg-config --cflags --libs libxml-2.0')
-libraries['glib2'] = LibraryInfo()
-libraries['glib2'].ParseConfig ('pkg-config --cflags --libs glib-2.0')
-libraries['glib2'].ParseConfig ('pkg-config --cflags --libs gobject-2.0')
-libraries['glib2'].ParseConfig ('pkg-config --cflags --libs gmodule-2.0')
+libraries['libart'] = LibraryInfo()
+libraries['libart'].ParseConfig('pkg-config --cflags --libs libart-2.0')
-libraries['gtk2'] = LibraryInfo()
-libraries['gtk2'].ParseConfig ('pkg-config --cflags --libs gtk+-2.0')
+libraries['gtk'] = LibraryInfo()
+libraries['gtk'].ParseConfig ('gtk-config --cflags --libs')
-libraries['pango'] = LibraryInfo()
-libraries['pango'].ParseConfig ('pkg-config --cflags --libs pango')
-
-libraries['libgnomecanvas2'] = LibraryInfo()
-libraries['libgnomecanvas2'].ParseConfig ('pkg-config --cflags --libs libgnomecanvas-2.0')
+libraries['glib'] = LibraryInfo()
+libraries['glib'].ParseConfig ('glib-config --cflags --libs')
libraries['ardour'] = LibraryInfo (LIBS='ardour', LIBPATH='#libs/ardour', CPPPATH='#libs/ardour')
-libraries['midi++2'] = LibraryInfo (LIBS='midi++', LIBPATH='#libs/midi++2', CPPPATH='#libs/midi++2')
-libraries['pbd3'] = LibraryInfo (LIBS='pbd', LIBPATH='#libs/pbd3', CPPPATH='#libs/pbd3')
-libraries['gtkmm2ext'] = LibraryInfo (LIBS='gtkmm2ext', LIBPATH='#libs/gtkmm2ext', CPPPATH='#libs/gtkmm2ext')
-#libraries['cassowary'] = LibraryInfo(LIBS='cassowary', LIBPATH='#libs/cassowary', CPPPATH='#libs/cassowary')
+libraries['midi++'] = LibraryInfo (LIBS='midi++', LIBPATH='#libs/midi++', CPPPATH='#libs/midi++')
+libraries['pbd'] = LibraryInfo (LIBS='pbd', LIBPATH='#libs/pbd', CPPPATH='#libs/pbd')
+libraries['gtkmmext'] = LibraryInfo (LIBS='gtkmmext', LIBPATH='#libs/gtkmmext', CPPPATH='#libs/gtkmmext')
libraries['fst'] = LibraryInfo()
if env['VST']:
@@ -411,57 +408,44 @@ env = conf.Finish()
if env['SYSLIBS']:
- libraries['sigc2'] = LibraryInfo()
- libraries['sigc2'].ParseConfig('pkg-config --cflags --libs sigc++-2.0')
+ libraries['sigc'] = LibraryInfo()
+ libraries['sigc'].ParseConfig('sigc-config --cflags --libs')
- libraries['gtkmm2'] = LibraryInfo()
- libraries['gtkmm2'].ParseConfig ('pkg-config --cflags --libs gtkmm-2.0')
+ libraries['gtkmm'] = LibraryInfo()
+ libraries['gtkmm'].ParseConfig ('gtkmm-config --cflags --libs')
libraries['soundtouch'] = LibraryInfo(LIBS='SoundTouch')
+ libraries['gtk-canvas'] = LibraryInfo(LIBS='gtk-canvas')
coredirs = [
'templates'
]
subdirs = [
-# 'libs/cassowary',
- 'libs/pbd3',
- 'libs/midi++2',
+ 'libs/pbd',
+ 'libs/midi++',
'libs/ardour',
'templates'
]
gtk_subdirs = [
- 'libs/gtkmm2ext',
- 'gtk2_ardour',
+ 'libs/gtkmmext',
+ 'gtk_ardour',
]
else:
- libraries['sigc2'] = LibraryInfo(LIBS='sigc++2',
- LIBPATH='#libs/sigc++2',
- CPPPATH='#libs/sigc++2')
- libraries['glibmm2'] = LibraryInfo(LIBS='glibmm2',
- LIBPATH='#libs/glibmm2',
- CPPPATH='#libs/glibmm2')
- libraries['pangomm'] = LibraryInfo(LIBS='pangomm',
- LIBPATH='#libs/gtkmm2/pango',
- CPPPATH='#libs/gtkmm2/pango')
- libraries['atkmm'] = LibraryInfo(LIBS='atkmm',
- LIBPATH='#libs/gtkmm2/atk',
- CPPPATH='#libs/gtkmm2/atk')
- libraries['gdkmm2'] = LibraryInfo(LIBS='gdkmm2',
- LIBPATH='#libs/gtkmm2/gdk',
- CPPPATH='#libs/gtkmm2/gdk')
- libraries['gtkmm2'] = LibraryInfo(LIBS='gtkmm2',
- LIBPATH="#libs/gtkmm2/gtk",
- CPPPATH='#libs/gtkmm2/gtk/')
- libraries['libgnomecanvasmm'] = LibraryInfo(LIBS='libgnomecanvasmm',
- LIBPATH='#libs/libgnomecanvasmm',
- CPPPATH='#libs/libgnomecanvasmm')
-
+ libraries['sigc'] = LibraryInfo(LIBS='sigc++',
+ LIBPATH='#libs/sigc++',
+ CPPPATH=['#libs/sigc++', '#libs/sigc++/sigc++/config'])
+ libraries['gtkmm'] = LibraryInfo(LIBS='gtkmm',
+ LIBPATH="#libs/gtkmm",
+ CPPPATH=[ '#libs/gtkmm', '#libs/gtkmm/gdk--', '#libs/gtkmm/src'])
libraries['soundtouch'] = LibraryInfo(LIBS='soundtouch',
LIBPATH='#libs/soundtouch',
CPPPATH=['#libs', '#libs/soundtouch'])
+ libraries['gtk-canvas'] = LibraryInfo(LIBS='gtk-canvas',
+ LIBPATH='#libs/gtk-canvas',
+ CPPPATH='#libs/gtk-canvas')
coredirs = [
'libs/soundtouch',
@@ -469,22 +453,17 @@ else:
]
subdirs = [
-# 'libs/cassowary',
- 'libs/sigc++2',
- 'libs/pbd3',
- 'libs/midi++2',
+ 'libs/sigc++',
+ 'libs/pbd',
+ 'libs/midi++',
'libs/ardour'
]
gtk_subdirs = [
- 'libs/glibmm2',
- 'libs/gtkmm2/pango',
- 'libs/gtkmm2/atk',
- 'libs/gtkmm2/gdk',
- 'libs/gtkmm2/gtk',
- 'libs/libgnomecanvasmm',
- 'libs/gtkmm2ext',
- 'gtk2_ardour',
+ 'libs/gtkmm',
+ 'libs/gtkmmext',
+ 'libs/gtk-canvas',
+ 'gtk_ardour',
]
opts.Save('scache.conf', env)
@@ -541,6 +520,13 @@ if config[config_arch] == 'apple':
libraries['core'].Append (LIBPATH = [ '/opt/local/lib' ])
if os.path.isdir('/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':
#
# Apple/PowerPC optimization options
@@ -656,7 +642,7 @@ if env['NLS'] == 1:
env.Append(CCFLAGS="-DENABLE_NLS")
-Export('env install_prefix final_prefix config_prefix final_config_prefix libraries i18n version')
+Export('env install_prefix final_prefix config_prefix final_config_prefix libraries i18n version subst_dict')
#
# the configuration file may be system dependent
@@ -665,9 +651,11 @@ Export('env install_prefix final_prefix config_prefix final_config_prefix librar
conf = env.Configure ()
if conf.CheckCHeader('/System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/CoreAudio.h'):
- subst_dict['%JACK_BACKEND%'] = "coreaudio:Built-in Audio:in"
+ subst_dict['%JACK_INPUT%'] = "coreaudio:Built-in Audio:in"
+ subst_dict['%JACK_OUTPUT%'] = "coreaudio:Built-in Audio:out"
else:
- subst_dict['%JACK_BACKEND%'] = "alsa_pcm:playback_"
+ subst_dict['%JACK_INPUT%'] = "alsa_pcm:playback_"
+ subst_dict['%JACK_OUTPUT%'] = "alsa_pcm:capture_"
# posix_memalign available
if not conf.CheckFunc('posix_memalign'):
@@ -723,9 +711,16 @@ env.AddPostAction (srcdist, Action ('rm -rf ' + str (File (env['DISTTREE']))))
for subdir in coredirs:
SConscript (subdir + '/SConscript')
-for sublistdir in [subdirs, gtk_subdirs]:
- for subdir in sublistdir:
- SConscript (subdir + '/SConscript')
+if env['GTK'] or env['KSI']:
+ for subdir in subdirs:
+ SConscript (subdir + '/SConscript')
+
+if env['GTK'] or 'tarball' in COMMAND_LINE_TARGETS:
+ for subdir in gtk_subdirs:
+ SConscript (subdir + '/SConscript')
+
+if env['KSI'] or 'tarball' in COMMAND_LINE_TARGETS:
+ SConscript ('ksi_ardour/SConscript')
# cleanup
env.Clean ('scrub', [ 'scache.conf', '.sconf_temp', '.sconsign.dblite', 'config.log'])
diff --git a/templates/16 Tracks.template b/templates/16 Tracks.template.in
similarity index 80%
rename from templates/16 Tracks.template
rename to templates/16 Tracks.template.in
index 50d21cdd24..1873f57e7f 100644
--- a/templates/16 Tracks.template
+++ b/templates/16 Tracks.template.in
@@ -58,7 +58,7 @@
-
+
@@ -69,7 +69,7 @@
-
+
@@ -80,7 +80,7 @@
-
+
@@ -91,7 +91,7 @@
-
+
@@ -102,7 +102,7 @@
-
+
@@ -113,7 +113,7 @@
-
+
@@ -124,7 +124,7 @@
-
+
@@ -135,7 +135,7 @@
-
+
@@ -146,7 +146,7 @@
-
+
@@ -157,7 +157,7 @@
-
+
@@ -168,7 +168,7 @@
-
+
@@ -179,7 +179,7 @@
-
+
@@ -190,7 +190,7 @@
-
+
@@ -201,7 +201,7 @@
-
+
@@ -212,7 +212,7 @@
-
+
@@ -223,7 +223,7 @@
-
+
@@ -234,7 +234,7 @@
-
+
@@ -249,7 +249,7 @@
-
+
diff --git a/templates/2 Track.template b/templates/2 Track.template.in
similarity index 84%
rename from templates/2 Track.template
rename to templates/2 Track.template.in
index 11f35d7183..ffe37e9c83 100644
--- a/templates/2 Track.template
+++ b/templates/2 Track.template.in
@@ -44,7 +44,7 @@
-
+
@@ -55,7 +55,7 @@
-
+
@@ -66,7 +66,7 @@
-
+
@@ -81,7 +81,7 @@
-
+
diff --git a/templates/32 Tracks.template b/templates/32 Tracks.template.in
similarity index 80%
rename from templates/32 Tracks.template
rename to templates/32 Tracks.template.in
index dfedeaa7e9..334bd2e6d5 100644
--- a/templates/32 Tracks.template
+++ b/templates/32 Tracks.template.in
@@ -66,7 +66,7 @@
-
+
@@ -77,7 +77,7 @@
-
+
@@ -88,7 +88,7 @@
-
+
@@ -99,7 +99,7 @@
-
+
@@ -110,7 +110,7 @@
-
+
@@ -121,7 +121,7 @@
-
+
@@ -132,7 +132,7 @@
-
+
@@ -143,7 +143,7 @@
-
+
@@ -154,7 +154,7 @@
-
+
@@ -165,7 +165,7 @@
-
+
@@ -176,7 +176,7 @@
-
+
@@ -187,7 +187,7 @@
-
+
@@ -198,7 +198,7 @@
-
+
@@ -209,7 +209,7 @@
-
+
@@ -220,7 +220,7 @@
-
+
@@ -231,7 +231,7 @@
-
+
@@ -242,7 +242,7 @@
-
+
@@ -253,7 +253,7 @@
-
+
@@ -264,7 +264,7 @@
-
+
@@ -275,7 +275,7 @@
-
+
@@ -286,7 +286,7 @@
-
+
@@ -297,7 +297,7 @@
-
+
@@ -308,7 +308,7 @@
-
+
@@ -319,7 +319,7 @@
-
+
@@ -330,7 +330,7 @@
-
+
@@ -345,7 +345,7 @@
-
+
diff --git a/templates/4 Tracks.template b/templates/4 Tracks.template.in
similarity index 82%
rename from templates/4 Tracks.template
rename to templates/4 Tracks.template.in
index 692c0403e4..aacb495986 100644
--- a/templates/4 Tracks.template
+++ b/templates/4 Tracks.template.in
@@ -46,7 +46,7 @@
-
+
@@ -57,7 +57,7 @@
-
+
@@ -68,7 +68,7 @@
-
+
@@ -79,7 +79,7 @@
-
+
@@ -90,7 +90,7 @@
-
+
@@ -105,7 +105,7 @@
-
+
diff --git a/templates/8 Tracks.template b/templates/8 Tracks.template.in
similarity index 81%
rename from templates/8 Tracks.template
rename to templates/8 Tracks.template.in
index 5c1ddb827a..4c9b1aa8ba 100644
--- a/templates/8 Tracks.template
+++ b/templates/8 Tracks.template.in
@@ -50,7 +50,7 @@
-
+
@@ -61,7 +61,7 @@
-
+
@@ -72,7 +72,7 @@
-
+
@@ -83,7 +83,7 @@
-
+
@@ -94,7 +94,7 @@
-
+
@@ -105,7 +105,7 @@
-
+
@@ -116,7 +116,7 @@
-
+
@@ -127,7 +127,7 @@
-
+
@@ -138,7 +138,7 @@
-
+
@@ -153,7 +153,7 @@
-
+
diff --git a/templates/SConscript b/templates/SConscript
index 4269a1b988..2ec3442f48 100644
--- a/templates/SConscript
+++ b/templates/SConscript
@@ -2,8 +2,16 @@
import os
import glob
-template_files = glob.glob('*.template')
+template_files = glob.glob('*.template.in')
+
+Import('env install_prefix subst_dict')
+
+template_build = []
+
+for template in template_files:
+ template_build = template_build + [env.SubstInFile (template[:-3], template, SUBST_DICT = subst_dict)]
+
+Default(template_build)
-Import('env install_prefix')
env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour/templates'), template_files))
env.Alias('tarball', env.Distribute (env['DISTTREE'], [ 'SConscript' ] + template_files))