Merged revisions 6293,6296-6306,6308 via svnmerge from
svn+ssh://ardoursvn@subversion.ardour.org/ardour2/branches/build_fixes ........ r6293 | trutkin | 2009-12-05 08:49:37 -0500 (Sat, 05 Dec 2009) | 2 lines fix if-statement in build script ........ r6296 | trutkin | 2009-12-05 09:30:19 -0500 (Sat, 05 Dec 2009) | 5 lines rearrange GTKOSX and darwin dependencies - moved some GTKOSX include paths to generic darwin - made GTKOSX dependent on being on darwin anyways ........ r6297 | trutkin | 2009-12-05 09:35:09 -0500 (Sat, 05 Dec 2009) | 2 lines move coreaudio and audiounit handling to darwin section ........ r6298 | trutkin | 2009-12-05 09:53:40 -0500 (Sat, 05 Dec 2009) | 3 lines use True/False instead of 1/0 fix another if-statement where it should be an elif-statement ........ r6299 | trutkin | 2009-12-05 14:11:09 -0500 (Sat, 05 Dec 2009) | 10 lines fixes to get libardour building - can't cast away volatile, so copy _transport_frame before emitting it. - const_reverse_iterator::operator!=() isn't defined in this version of gcc. - removed annoying HERE WE ARE CAAudioFile.h #warning. - removed unnecessary include of sndfile.h in session.h. - we don't want to set -march=i686 on the mac, so indent this if-statement so it's only run on linux. - DEBUG_STR() fails in the NDEBUG case, so wrap its use in an #ifndef NDEBUG ........ r6300 | trutkin | 2009-12-05 15:48:29 -0500 (Sat, 05 Dec 2009) | 2 lines remove old scons-style CXXFLAGS_FOO in favor of just CXXFLAGS ........ r6301 | trutkin | 2009-12-05 16:01:10 -0500 (Sat, 05 Dec 2009) | 8 lines clean up configure flags - removed useless --aubio and --syslibs flags. The syslibs value is ignored as we don't bring our own libraries with us anymoreand we use aubio automatically if it's available - added ways to turn off fpu_optimization and NLS - fixed compiling on the mac without fpu_optimization ........ r6302 | trutkin | 2009-12-05 18:12:46 -0500 (Sat, 05 Dec 2009) | 5 lines go back to prior uselib method for COREAUDIO, AUDIOUNIT, and GTKOSX - fixed compile of CoreAudioSource - re-did inclusion of coremidi_midiport.cc to depend on COREAUDIO presence ........ r6303 | trutkin | 2009-12-05 18:59:02 -0500 (Sat, 05 Dec 2009) | 5 lines fixed compiler warnings about classes with virtual member functions, but no virtual destructor. - Changed Metering to not use foo() = 0; to indicate it shouldn't be instantiated, but private: Metering(), which is more idiomatic. ........ r6304 | trutkin | 2009-12-05 19:25:41 -0500 (Sat, 05 Dec 2009) | 2 lines TOP_MENUBAR isn't used when building ardour.menus. Removed. ........ r6305 | trutkin | 2009-12-05 19:46:11 -0500 (Sat, 05 Dec 2009) | 5 lines fix some AudioUnit compile errors - update AudioUnit to use ChanCount - fix some namespacing issues in audio_unit.h ........ r6306 | trutkin | 2009-12-05 20:08:48 -0500 (Sat, 05 Dec 2009) | 2 lines make --extra-warn useful ........ r6308 | trutkin | 2009-12-05 22:59:42 -0500 (Sat, 05 Dec 2009) | 10 lines fix compiling/linking with --coreaudio - rearrange ardour_ui.h header in editor.cc to avoid conflict - midi++ depends on OSX as well as COREAUDIO - fixed including frameworks - tweaked --extra-warn again. it's kinda redundent with --strict - improved indentation in wscript - use #ifdef HAVE_COREMIDI, not #if HAVE_COREMIDI. #if isn't interchangable with #ifdef and won't work if HAVE_COREMIDI is defined with no value. ........ git-svn-id: svn://localhost/ardour2/branches/3.0@6310 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4a8baf26f1
commit
3fdcba1859
|
@ -28,6 +28,13 @@
|
|||
#include <algorithm>
|
||||
#include <map>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
/*
|
||||
* ardour_ui.h include was moved to the top of the list
|
||||
* due to a conflicting definition of 'Style' between
|
||||
* Apple's MacTypes.h and BarController.
|
||||
*/
|
||||
|
||||
#include <boost/none.hpp>
|
||||
|
||||
#include <sigc++/bind.h>
|
||||
|
@ -69,7 +76,6 @@
|
|||
|
||||
#include "control_protocol/control_protocol.h"
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "editor.h"
|
||||
#include "keyboard.h"
|
||||
#include "marker.h"
|
||||
|
|
|
@ -33,6 +33,7 @@ class EditorComponent
|
|||
{
|
||||
public:
|
||||
EditorComponent (Editor *);
|
||||
virtual ~EditorComponent() {}
|
||||
|
||||
virtual void connect_to_session (ARDOUR::Session *);
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ namespace Canvas {
|
|||
*/
|
||||
class InteractiveItem {
|
||||
public:
|
||||
virtual ~InteractiveItem() {}
|
||||
|
||||
virtual bool on_event(GdkEvent* ev) = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -53,6 +53,8 @@ class OptionEditorPage;
|
|||
class OptionEditorComponent
|
||||
{
|
||||
public:
|
||||
virtual ~OptionEditorComponent() {}
|
||||
|
||||
/** Called when a configuration parameter's value has changed.
|
||||
* @param p parameter name
|
||||
*/
|
||||
|
|
|
@ -371,7 +371,7 @@ def build(bld):
|
|||
# Menus
|
||||
menus_argv = []
|
||||
if bld.env['GTKOSX']:
|
||||
menus_argv = [ '-E', '-P', '-DGTKOSX', '-DTOP_MENUBAR' ]
|
||||
menus_argv = [ '-E', '-P', '-DGTKOSX' ]
|
||||
else:
|
||||
menus_argv = [ '-E', '-P' ]
|
||||
obj = bld.new_task_gen('command-output')
|
||||
|
|
|
@ -114,7 +114,6 @@ public:
|
|||
// or the file's sample rate is 0 (unknown)
|
||||
|
||||
#if CAAF_USE_EXTAUDIOFILE
|
||||
#warning HERE WE ARE
|
||||
public:
|
||||
CAAudioFile() : mExtAF(NULL) { std::cerr << "Constructing CAAudioFile\n"; }
|
||||
virtual ~CAAudioFile() { std::cerr << "Destroying CAAudiofile @ " << this << std::endl; if (mExtAF) Close(); }
|
||||
|
|
|
@ -65,7 +65,7 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
AUPlugin (const AUPlugin& other);
|
||||
virtual ~AUPlugin ();
|
||||
|
||||
std::string unique_id () const;
|
||||
std::string unique_id () const;
|
||||
const char * label () const;
|
||||
const char * name () const { return _info->name.c_str(); }
|
||||
const char * maker () const { return _info->creator.c_str(); }
|
||||
|
@ -81,10 +81,10 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
void deactivate ();
|
||||
void set_block_size (nframes_t nframes);
|
||||
|
||||
int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
|
||||
int connect_and_run (std::vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
|
||||
std::set<uint32_t> automatable() const;
|
||||
string describe_parameter (uint32_t);
|
||||
string state_node_name () const { return "audiounit"; }
|
||||
std::string describe_parameter (uint32_t);
|
||||
std::string state_node_name () const { return "audiounit"; }
|
||||
void print_parameter (uint32_t, char*, uint32_t len) const;
|
||||
|
||||
bool parameter_is_audio (uint32_t) const;
|
||||
|
@ -95,16 +95,16 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
XMLNode& get_state();
|
||||
int set_state(const XMLNode& node);
|
||||
|
||||
bool save_preset (string name);
|
||||
bool load_preset (const string preset_label);
|
||||
bool save_preset (std::string name);
|
||||
bool load_preset (const std::string preset_label);
|
||||
std::vector<std::string> get_presets ();
|
||||
std::string current_preset() const;
|
||||
|
||||
bool has_editor () const;
|
||||
|
||||
int32_t can_do (int32_t in, int32_t& out);
|
||||
uint32_t output_streams() const;
|
||||
uint32_t input_streams() const;
|
||||
ChanCount output_streams() const;
|
||||
ChanCount input_streams() const;
|
||||
int32_t configure_io (int32_t in, int32_t out);
|
||||
|
||||
boost::shared_ptr<CAAudioUnit> get_au () { return unit; }
|
||||
|
@ -120,8 +120,8 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
boost::shared_ptr<CAAudioUnit> unit;
|
||||
|
||||
bool initialized;
|
||||
int32_t input_channels;
|
||||
int32_t output_channels;
|
||||
ChanCount input_channels;
|
||||
ChanCount output_channels;
|
||||
std::vector<std::pair<int,int> > io_configs;
|
||||
AudioBufferList* buffers;
|
||||
|
||||
|
@ -144,7 +144,7 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
uint32_t current_maxbuf;
|
||||
nframes_t current_offset;
|
||||
nframes_t cb_offset;
|
||||
vector<Sample*>* current_buffers;
|
||||
std::vector<Sample*>* current_buffers;
|
||||
nframes_t frames_processed;
|
||||
|
||||
std::vector<AUParameterDescriptor> descriptors;
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace ARDOUR {
|
|||
class CoreAudioSource : public AudioFileSource {
|
||||
public:
|
||||
CoreAudioSource (ARDOUR::Session&, const XMLNode&);
|
||||
CoreAudioSource (ARDOUR::Session&, const string& path, bool, int chn, Flag);
|
||||
CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag);
|
||||
~CoreAudioSource ();
|
||||
|
||||
float sample_rate() const;
|
||||
|
|
|
@ -41,7 +41,7 @@ class Metering {
|
|||
|
||||
private:
|
||||
/* this object is not meant to be instantiated */
|
||||
virtual void foo() = 0;
|
||||
Metering();
|
||||
|
||||
static Glib::StaticMutex m_meter_signal_lock;
|
||||
};
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
#include <boost/weak_ptr.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
#include <glibmm/thread.h>
|
||||
|
||||
#include "pbd/error.h"
|
||||
|
|
|
@ -171,6 +171,7 @@ class Slave {
|
|||
/// We need this wrapper for testability, it's just too hard to mock up a session class
|
||||
class ISlaveSessionProxy {
|
||||
public:
|
||||
virtual ~ISlaveSessionProxy() {}
|
||||
virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
|
||||
virtual nframes_t frame_rate() const { return 0; }
|
||||
virtual nframes64_t audible_frame () const { return 0; }
|
||||
|
|
|
@ -364,8 +364,8 @@ AUPlugin::init ()
|
|||
not potential set ups.
|
||||
*/
|
||||
|
||||
input_channels = -1;
|
||||
output_channels = -1;
|
||||
input_channels = ChanCount::ZERO;
|
||||
output_channels = ChanCount::ZERO;
|
||||
|
||||
if (_set_block_size (_session.get_block_size())) {
|
||||
error << _("AUPlugin: cannot set processing block size") << endmsg;
|
||||
|
@ -848,15 +848,15 @@ AUPlugin::set_stream_format (int scope, uint32_t cnt, AudioStreamBasicDescriptio
|
|||
}
|
||||
|
||||
if (scope == kAudioUnitScope_Input) {
|
||||
input_channels = fmt.mChannelsPerFrame;
|
||||
input_channels.setAudio( fmt.mChannelsPerFrame );
|
||||
} else {
|
||||
output_channels = fmt.mChannelsPerFrame;
|
||||
output_channels.setAudio( fmt.mChannelsPerFrame );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
ChanCount
|
||||
AUPlugin::input_streams() const
|
||||
{
|
||||
if (input_channels < 0) {
|
||||
|
@ -867,7 +867,7 @@ AUPlugin::input_streams() const
|
|||
}
|
||||
|
||||
|
||||
uint32_t
|
||||
ChanCount
|
||||
AUPlugin::output_streams() const
|
||||
{
|
||||
if (output_channels < 0) {
|
||||
|
|
|
@ -44,7 +44,7 @@ CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node)
|
|||
init_cafile ();
|
||||
}
|
||||
|
||||
CoreAudioSource::CoreAudioSource (Session& s, const string& path, bool, int chn, Flag flags)
|
||||
CoreAudioSource::CoreAudioSource (Session& s, const string& path, int chn, Flag flags)
|
||||
/* files created this way are never writable or removable */
|
||||
: Source (s, DataType::AUDIO, path, Source::Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy))),
|
||||
AudioFileSource (s, path,
|
||||
|
|
|
@ -891,10 +891,12 @@ Session::send_midi_time_code_for_cycle(nframes_t nframes)
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
DEBUG_STR_SET(foo,"sending ");
|
||||
DEBUG_STR(foo) << transmitting_timecode_time;
|
||||
DEBUG_TRACE (DEBUG::MTC, string_compose ("%1 qfm = %2, stamp = %3\n", DEBUG_STR(foo).str(), next_quarter_frame_to_send,
|
||||
out_stamp));
|
||||
#endif
|
||||
|
||||
// Increment quarter frame counter
|
||||
next_quarter_frame_to_send++;
|
||||
|
@ -1252,9 +1254,11 @@ Session::midi_thread_work ()
|
|||
|
||||
for (int p = 1; p < nfds; ++p) {
|
||||
|
||||
#ifndef NDEBUG
|
||||
DEBUG_STR_SET(foo, "port #%1 revents = ");
|
||||
DEBUG_STR(foo) << hex << pfd[p].revents << dec << endl;
|
||||
DEBUG_TRACE (DEBUG::MidiIO, string_compose (DEBUG_STR(foo).str(), p));
|
||||
#endif
|
||||
|
||||
if ((pfd[p].revents & ~POLLIN)) {
|
||||
// error << string_compose(_("Transport: error polling MIDI port %1 (revents =%2%3%4"), p, &hex, pfd[p].revents, &dec) << endmsg;
|
||||
|
|
|
@ -576,7 +576,9 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
|
|||
play_loop = false;
|
||||
}
|
||||
|
||||
PositionChanged ((nframes64_t) _transport_frame); /* EMIT SIGNAL */
|
||||
// can't cast away volatile so copy and emit that
|
||||
nframes64_t tframe = _transport_frame;
|
||||
PositionChanged (tframe); /* EMIT SIGNAL */
|
||||
TransportStateChange (); /* EMIT SIGNAL */
|
||||
|
||||
/* and start it up again if relevant */
|
||||
|
@ -1402,7 +1404,9 @@ Session::engine_halted ()
|
|||
void
|
||||
Session::xrun_recovery ()
|
||||
{
|
||||
Xrun ((nframes64_t)_transport_frame); //EMIT SIGNAL
|
||||
// can't cast away volatile so copy and emit that
|
||||
nframes64_t tframe = _transport_frame;
|
||||
Xrun (tframe); //EMIT SIGNAL
|
||||
|
||||
if (Config->get_stop_recording_on_xrun() && actively_recording()) {
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
|
|||
|
||||
/* this is allowed to throw */
|
||||
|
||||
Source *s = new CoreAudioSource (s, node);
|
||||
Source *src = new CoreAudioSource (s, node);
|
||||
// boost_debug_shared_ptr_mark_interesting (src, typeid(src).name());
|
||||
boost::shared_ptr<Source> ret (src);
|
||||
|
||||
|
|
|
@ -1823,7 +1823,8 @@ TempoMap::bbt_subtract (const BBT_Time& start, const BBT_Time& decrement) const
|
|||
*/
|
||||
|
||||
const MeterSection* meter = 0;
|
||||
list<const MeterSection*>::const_reverse_iterator next_meter;
|
||||
list<const MeterSection*>::reverse_iterator next_meter; // older versions of GCC don't
|
||||
// support const_reverse_iterator::operator!=()
|
||||
|
||||
for (next_meter = meter_sections.rbegin(); next_meter != meter_sections.rend(); ++next_meter) {
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ def build(bld):
|
|||
obj.includes = ['.', '../surfaces/control_protocol', '..']
|
||||
obj.name = 'libardour'
|
||||
obj.target = 'ardour'
|
||||
obj.uselib = 'GLIBMM GTHREAD AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF OSX'
|
||||
obj.uselib = 'GLIBMM GTHREAD AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF OSX COREAUDIO'
|
||||
obj.uselib_local = 'libpbd libmidipp libevoral libvamphost libvampplugin libtaglib librubberband'
|
||||
obj.vnum = LIBARDOUR_LIB_VERSION
|
||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
||||
|
@ -324,7 +324,7 @@ def build(bld):
|
|||
test/testrunner.cpp
|
||||
'''.split()
|
||||
testobj.includes = obj.includes + ['../pbd/']
|
||||
testobj.uselib = 'CPPUNIT SIGCPP JACK GLIBMM GTHREAD SAMPLERATE XML LRDF'
|
||||
testobj.uselib = 'CPPUNIT SIGCPP JACK GLIBMM GTHREAD SAMPLERATE XML LRDF COREAUDIO'
|
||||
testobj.uselib_local = 'libpbd libmidipp libardour'
|
||||
testobj.name = 'libardour-tests'
|
||||
testobj.target = 'run-tests'
|
||||
|
|
|
@ -81,7 +81,7 @@ PortFactory::create_port (const XMLNode& node, void* data)
|
|||
break;
|
||||
#endif // WITH_ALSA
|
||||
|
||||
#if WITH_COREMIDI
|
||||
#ifdef WITH_COREMIDI
|
||||
case Port::CoreMidi_MidiPort:
|
||||
port = new CoreMidi_MidiPort (node);
|
||||
break;
|
||||
|
@ -116,7 +116,7 @@ PortFactory::ignore_duplicate_devices (Port::Type type)
|
|||
break;
|
||||
#endif // WITH_JACK_MIDI
|
||||
|
||||
#if WITH_COREMIDI
|
||||
#ifdef WITH_COREMIDI
|
||||
case Port::CoreMidi_MidiPort:
|
||||
ret = true;
|
||||
break;
|
||||
|
@ -141,7 +141,7 @@ PortFactory::get_known_ports (vector<PortSet>&)
|
|||
n += ALSA_SequencerMidiPort::discover (ports);
|
||||
#endif // WITH_ALSA
|
||||
|
||||
#if WITH_COREMIDI
|
||||
#ifdef WITH_COREMIDI
|
||||
n += CoreMidi_MidiPort::discover (ports);
|
||||
#endif // WITH_COREMIDI
|
||||
|
||||
|
|
|
@ -61,11 +61,11 @@ def build(bld):
|
|||
# everybody loves JACK
|
||||
obj.source += ' jack_midiport.cc '
|
||||
obj.cxxflags = [ '-DWITH_JACK_MIDI' ]
|
||||
if sys.platform == 'darwin':
|
||||
if bld.env['HAVE_COREAUDIO'] and bld.env['COREAUDIO']:
|
||||
# OS X
|
||||
obj.source += ' coremidi_midiport.cc '
|
||||
obj.cxxflags += [ '-DWITH_COREMIDI' ]
|
||||
else :
|
||||
elif sys.platform == 'linux':
|
||||
# linux
|
||||
obj.source += ' alsa_sequencer_midiport.cc '
|
||||
obj.cxxflags += [ '-DWITH_ALSA' ]
|
||||
|
@ -73,7 +73,7 @@ def build(bld):
|
|||
obj.includes = ['.']
|
||||
obj.name = 'libmidipp'
|
||||
obj.target = 'midipp'
|
||||
obj.uselib = 'GLIBMM SIGCPP XML JACK'
|
||||
obj.uselib = 'GLIBMM SIGCPP XML JACK OSX COREAUDIO'
|
||||
obj.uselib_local = 'libpbd libevoral'
|
||||
obj.vnum = LIBMIDIPP_LIB_VERSION
|
||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
||||
|
|
156
wscript
156
wscript
|
@ -96,7 +96,7 @@ def set_compiler_flags (conf,opt):
|
|||
# Compiler flags and other system-dependent stuff
|
||||
#
|
||||
|
||||
build_host_supports_sse = 0
|
||||
build_host_supports_sse = False
|
||||
optimization_flags = []
|
||||
if opt.gprofile:
|
||||
debug_flags = [ '-pg' ]
|
||||
|
@ -121,7 +121,7 @@ def set_compiler_flags (conf,opt):
|
|||
# The [.] matches to the dot after the major version, "." would match any character
|
||||
if re.search ("darwin[0-7][.]", config[config_kernel]) != None:
|
||||
conf.define ('build_target', 'panther')
|
||||
if re.search ("darwin8[.]", config[config_kernel]) != None:
|
||||
elif re.search ("darwin8[.]", config[config_kernel]) != None:
|
||||
conf.define ('build_target', 'tiger')
|
||||
else:
|
||||
conf.define ('build_target', 'leopard')
|
||||
|
@ -181,14 +181,14 @@ def set_compiler_flags (conf,opt):
|
|||
if "mmx" in x86_flags:
|
||||
optimization_flags.append ("-mmmx")
|
||||
if "sse" in x86_flags:
|
||||
build_host_supports_sse = 1
|
||||
build_host_supports_sse = True
|
||||
if "3dnow" in x86_flags:
|
||||
optimization_flags.append ("-m3dnow")
|
||||
|
||||
if config[config_cpu] == "i586":
|
||||
optimization_flags.append ("-march=i586")
|
||||
elif config[config_cpu] == "i686":
|
||||
optimization_flags.append ("-march=i686")
|
||||
if config[config_cpu] == "i586":
|
||||
optimization_flags.append ("-march=i586")
|
||||
elif config[config_cpu] == "i686":
|
||||
optimization_flags.append ("-march=i686")
|
||||
|
||||
if ((conf.env['build_target'] == 'i686') or (conf.env['build_target'] == 'x86_64')) and build_host_supports_sse:
|
||||
optimization_flags.extend (["-msse", "-mfpmath=sse", "-DUSE_XMMINTRIN"])
|
||||
|
@ -205,13 +205,15 @@ def set_compiler_flags (conf,opt):
|
|||
elif conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64':
|
||||
optimization_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
|
||||
debug_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
|
||||
if conf.env['build_target'] == 'x86_64':
|
||||
elif conf.env['build_target'] == 'x86_64':
|
||||
optimization_flags.append ("-DUSE_X86_64_ASM")
|
||||
debug_flags.append ("-DUSE_X86_64_ASM")
|
||||
if build_host_supports_sse != 1:
|
||||
if not build_host_supports_sse:
|
||||
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)"
|
||||
if conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', ccflags='-D_XOPEN_SOURCE=600') == False:
|
||||
optimization_flags.append("-DNO_POSIX_MEMALIGN")
|
||||
|
||||
# check this even if we aren't using FPU optimization
|
||||
if conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', ccflags='-D_XOPEN_SOURCE=600') == False:
|
||||
optimization_flags.append("-DNO_POSIX_MEMALIGN")
|
||||
|
||||
# end optimization section
|
||||
|
||||
|
@ -288,9 +290,9 @@ def set_compiler_flags (conf,opt):
|
|||
conf.env.append_value('CXXFLAGS', [ '-Wall', '-Woverloaded-virtual'])
|
||||
|
||||
if opt.extra_warn:
|
||||
conf.env.append_value('CCFLAGS', [ '-Wextra', '-pedantic', '-ansi' ])
|
||||
conf.env.append_value('CXXFLAGS', [ '-Wextra', '-pedantic', '-ansi' ])
|
||||
#conf.env.append_value('CFLAGS', "-iso")
|
||||
flags = [ '-Wextra' ]
|
||||
conf.env.append_value('CCFLAGS', flags )
|
||||
conf.env.append_value('CXXFLAGS', flags )
|
||||
|
||||
|
||||
#
|
||||
|
@ -312,8 +314,6 @@ def set_options(opt):
|
|||
autowaf.set_options(opt)
|
||||
opt.add_option('--arch', type='string', action='store', dest='arch',
|
||||
help='Architecture-specific compiler flags')
|
||||
opt.add_option('--aubio', action='store_true', default=True, dest='aubio',
|
||||
help="Use Paul Brossier's aubio library for feature detection (if available)")
|
||||
opt.add_option('--boost-sp-debug', action='store_true', default=False, dest='boost_sp_debug',
|
||||
help='Compile with Boost shared pointer debugging')
|
||||
opt.add_option('--audiounits', action='store_true', default=False, dest='audiounits',
|
||||
|
@ -325,7 +325,8 @@ def set_options(opt):
|
|||
opt.add_option('--extra-warn', action='store_true', default=False, dest='extra_warn',
|
||||
help='Build with even more compiler warning flags')
|
||||
opt.add_option('--fpu-optimization', action='store_true', default=True, dest='fpu_optimization',
|
||||
help='Build runtime checked assembler code')
|
||||
help='Build runtime checked assembler code (default)')
|
||||
opt.add_option('--no-fpu-optimization', action='store_false', dest='fpu_optimization')
|
||||
opt.add_option('--freedesktop', action='store_true', default=False, dest='freedesktop',
|
||||
help='Install MIME type, icons and .desktop file as per freedesktop.org standards')
|
||||
opt.add_option('--freesound', action='store_true', default=False, dest='freesound',
|
||||
|
@ -337,11 +338,10 @@ def set_options(opt):
|
|||
opt.add_option('--lv2', action='store_true', default=False, dest='lv2',
|
||||
help='Compile with support for LV2 (if slv2 is available)')
|
||||
opt.add_option('--nls', action='store_true', default=True, dest='nls',
|
||||
help='Enable i18n (native language support)')
|
||||
help='Enable i18n (native language support) (default)')
|
||||
opt.add_option('--no-nls', action='store_false', dest='nls')
|
||||
opt.add_option('--stl-debug', action='store_true', default=False, dest='stl_debug',
|
||||
help='Build with debugging for the STL')
|
||||
opt.add_option('--syslibs', action='store_true', default=True, dest='syslibs',
|
||||
help='Use existing system versions of various libraries instead of internal ones')
|
||||
opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport',
|
||||
help='Compile with support for Frontier Designs Tranzport (if libusb is available)')
|
||||
opt.add_option('--universal', action='store_true', default=False, dest='universal',
|
||||
|
@ -379,7 +379,7 @@ def configure(conf):
|
|||
conf.env.append_value('CCFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
|
||||
conf.env.append_value('LINKFLAGS_OSX', "-mmacosx-version-min=10.4")
|
||||
conf.env.append_value('LINKFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
|
||||
|
||||
|
||||
conf.env.append_value('LINKFLAGS_OSX', "-sysroot /Developer/SDKs/MacOSX10.4u.sdk")
|
||||
conf.env.append_value('LINKFLAGS_OSX', "-F/System/Library/Frameworks")
|
||||
|
||||
|
@ -392,7 +392,25 @@ def configure(conf):
|
|||
# off processor type. Need to add in a check
|
||||
# for that.
|
||||
#
|
||||
|
||||
|
||||
conf.env.append_value('CPPPATH_OSX', "/System/Library/Frameworks/")
|
||||
conf.env.append_value('CPPPATH_OSX', "/usr/include/")
|
||||
conf.env.append_value('CPPPATH_OSX', "/usr/include/c++/4.0.0")
|
||||
conf.env.append_value('CPPPATH_OSX', "/usr/include/c++/4.0.0/i686-apple-darwin8/")
|
||||
#
|
||||
# TODO: Fix the above include path, it needs to be
|
||||
# defined based off what is read in the configuration
|
||||
# stage about the machine(PPC, X86, X86_64, etc.)
|
||||
#
|
||||
conf.env.append_value('CPPPATH_OSX', "/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/")
|
||||
#
|
||||
# TODO: Likewise this needs to be defined not only
|
||||
# based off the machine characteristics, but also
|
||||
# based off the version of GCC being used.
|
||||
#
|
||||
|
||||
conf.env.append_value('FRAMEWORK_OSX', ['CoreFoundation'])
|
||||
|
||||
conf.env.append_value('LINKFLAGS_OSX', ['-undefined', 'suppress'])
|
||||
conf.env.append_value('LINKFLAGS_OSX', "-flat_namespace")
|
||||
#
|
||||
|
@ -403,67 +421,39 @@ def configure(conf):
|
|||
#
|
||||
conf.env.append_value('CXXFLAGS_OSX', "-F/System/Library/Frameworks")
|
||||
conf.env.append_value('CCFLAGS_OSX', "-F/System/Library/Frameworks")
|
||||
|
||||
|
||||
# GTKOSX only builds on darwin anyways
|
||||
if Options.options.gtkosx:
|
||||
#
|
||||
# Define Include Paths for GTKOSX
|
||||
#
|
||||
conf.env.append_value('CXXFLAGS_GTKOSX', '-DTOP_MENUBAR')
|
||||
conf.env.append_value('CXXFLAGS_GTKOSX', '-DGTKOSX')
|
||||
conf.env.append_value('LINKFLAGS_GTKOSX', "-framework AppKit")
|
||||
conf.env.append_value('LINKFLAGS_GTKOSX', "-Xlinker -headerpad")
|
||||
conf.env.append_value('LINKFLAGS_GTKOSX', "-Xlinker 2048")
|
||||
conf.env.append_value('CPPPATH_GTKOSX', "/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/")
|
||||
|
||||
if Options.options.coreaudio:
|
||||
conf.check_cc (header_name = '/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h',
|
||||
define_name = 'HAVE_COREAUDIO', linkflags = ['-framework CoreAudio'],
|
||||
uselib_store="COREAUDIO")
|
||||
conf.check_cxx (header_name = '/System/Library/Frameworks/AudioToolbox.framework/Headers/ExtendedAudioFile.h',
|
||||
linkflags = [ '-framework AudioToolbox' ], uselib_store="COREAUDIO")
|
||||
conf.check_cc (header_name = '/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h',
|
||||
linkflags = ['-framework CoreServices'], uselib_store="COREAUDIO")
|
||||
|
||||
if Options.options.audiounits:
|
||||
#conf.env.append_value('CXXFLAGS_AUDIOUNIT', "-DHAVE_AUDIOUNITS")
|
||||
conf.env.append_value('FRAMEWORK_AUDIOUNIT', ['AudioToolbox'])
|
||||
conf.env.append_value('FRAMEWORK_AUDIOUNIT', ['CoreServices'])
|
||||
conf.check_cc (header_name = '/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.h',
|
||||
define_name = 'HAVE_AUDIOUNITS', linkflags = [ '-framework AudioUnit' ],
|
||||
uselib_store="AUDIOUNIT")
|
||||
|
||||
if Options.options.boost_sp_debug:
|
||||
conf.env.append_value('CXXFLAGS', '-DBOOST_SP_ENABLE_DEBUG_HOOKS')
|
||||
|
||||
if Options.options.gtkosx:
|
||||
#
|
||||
# Define Include Paths for GTKOSX
|
||||
#
|
||||
conf.env.append_value('CPPPATH_GTKOSX', "/usr/include/")
|
||||
conf.env.append_value('CPPPATH_GTKOSX', "/usr/include/c++/4.0.0")
|
||||
conf.env.append_value('CPPPATH_GTKOSX', "/usr/include/c++/4.0.0/i686-apple-darwin8/")
|
||||
#
|
||||
# TODO: Fix the above include path, it needs to be
|
||||
# defined based off what is read in the configuration
|
||||
# stage about the machine(PPC, X86, X86_64, etc.)
|
||||
#
|
||||
conf.env.append_value('CPPPATH_GTKOSX', "/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/")
|
||||
#
|
||||
# TODO: Likewise this needs to be defined not only
|
||||
# based off the machine characteristics, but also
|
||||
# based off the version of GCC being used.
|
||||
#
|
||||
conf.env.append_value('CPPPATH_GTKOSX', "/System/Library/Frameworks/")
|
||||
conf.env.append_value('CXXFLAGS_GTKOSX', '-DTOP_MENUBAR')
|
||||
conf.env.append_value('CXXFLAGS_GTKOSX', '-DGTKOSX')
|
||||
conf.env.append_value('LINKFLAGS_GTKOSX', "-framework AppKit")
|
||||
conf.env.append_value('LINKFLAGS_GTKOSX', "-Xlinker -headerpad")
|
||||
conf.env.append_value('LINKFLAGS_GTKOSX', "-Xlinker 2048")
|
||||
conf.env.append_value('CPPPATH_GTKOSX', "/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/")
|
||||
#
|
||||
# I had a note the previous was for MacTypes.h
|
||||
#
|
||||
|
||||
if Options.options.coreaudio:
|
||||
#conf.env.append_value('LINKFLAGS_COREAUDIO', "-framework CoreAudioKit")
|
||||
#conf.env.append_value('LINKFLAGS_COREAUDIO', "-framework AudioToolbox")
|
||||
#conf.env.append_value('LINKFLAGS_COREAUDIO', "-framework CoreServices")
|
||||
conf.check_cc (header_name = '/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h',
|
||||
define_name = 'HAVE_COREAUDIO', linkflags = ['-framework', 'CoreAudio'])
|
||||
conf.check_cxx (header_name = '/System/Library/Frameworks/AudioToolbox.framework/Headers/ExtendedAudioFile.h',
|
||||
linkflags = [ '-framework', 'AudioToolbox' ])
|
||||
conf.check_cc (header_name = '/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h',
|
||||
linkflags = ['-framework', 'CoreFoundation'])
|
||||
conf.check_cc (header_name = '/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h',
|
||||
linkflags = ['-framework', 'CoreServices'])
|
||||
#
|
||||
# TODO: For some reason the above doesn't seem to be correctly adding the
|
||||
# the link flags, so we will add them manually.
|
||||
#
|
||||
conf.env.append_value('LINKFLAGS_COREAUDIO', ['-framework', 'CoreServices'])
|
||||
conf.env.append_value('LINKFLAGS_COREAUDIO', ['-framework', 'CoreFoundation'])
|
||||
conf.env.append_value('LINKFLAGS_COREAUDIO', ['-framework', 'AudioToolbox'])
|
||||
conf.env.append_value('LINKFLAGS_COREAUDIO', ['-framework', 'CoreAudio'])
|
||||
|
||||
if Options.options.audiounits:
|
||||
#conf.env.append_value('CXXFLAGS_AUDIOUNITS', "-DHAVE_AUDIOUNITS")
|
||||
conf.env.append_value('LINKFLAGS_AUDIOUNITS', "-framework AudioToolbox")
|
||||
conf.env.append_value('LINKFLAGS_AUDIOUNITS', "-framework CoreServices")
|
||||
conf.check_cc (header_name = '/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.h',
|
||||
define_name = 'HAVE_AUDIOUNITS', linkflags = [ '-framework', 'AudioUnit' ])
|
||||
|
||||
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
|
||||
autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.2')
|
||||
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
|
||||
|
@ -487,6 +477,9 @@ def configure(conf):
|
|||
autowaf.display_msg(conf, 'Architecture flags', opts.arch)
|
||||
autowaf.display_msg(conf, 'Aubio', bool(conf.env['HAVE_AUBIO']))
|
||||
autowaf.display_msg(conf, 'AudioUnits', opts.audiounits)
|
||||
autowaf.display_msg(conf, 'CoreAudio', bool(conf.env['HAVE_COREAUDIO']))
|
||||
if bool(conf.env['HAVE_COREAUDIO']):
|
||||
conf.define ('COREAUDIO', 1)
|
||||
if opts.audiounits:
|
||||
conf.define('AUDIOUNITS',1)
|
||||
autowaf.display_msg(conf, 'FPU Optimization', opts.fpu_optimization)
|
||||
|
@ -499,8 +492,6 @@ def configure(conf):
|
|||
autowaf.display_msg(conf, 'GtkOSX', opts.gtkosx)
|
||||
if opts.gtkosx:
|
||||
conf.define ('GTKOSX', 1)
|
||||
if opts.coreaudio:
|
||||
conf.define ('COREAUDIO', 1)
|
||||
autowaf.display_msg(conf, 'LV2 Support', bool(conf.env['HAVE_SLV2']))
|
||||
autowaf.display_msg(conf, 'Rubberband', bool(conf.env['HAVE_RUBBERBAND']))
|
||||
autowaf.display_msg(conf, 'Samplerate', bool(conf.env['HAVE_SAMPLERATE']))
|
||||
|
@ -508,7 +499,6 @@ def configure(conf):
|
|||
autowaf.display_msg(conf, 'Translation', opts.nls)
|
||||
if opts.nls:
|
||||
conf.define ('ENABLE_NLS', 1)
|
||||
autowaf.display_msg(conf, 'System Libraries', opts.syslibs)
|
||||
autowaf.display_msg(conf, 'Tranzport', opts.tranzport)
|
||||
if opts.tranzport:
|
||||
conf.define('TRANZPORT', 1)
|
||||
|
|
Loading…
Reference in New Issue