Use LV2_SUPPORT define instead of HAVE_SLV2.
authorDavid Robillard <d@drobilla.net>
Sat, 14 May 2011 17:59:16 +0000 (17:59 +0000)
committerDavid Robillard <d@drobilla.net>
Sat, 14 May 2011 17:59:16 +0000 (17:59 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9510 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/plugin_ui.cc
libs/ardour/ardour/buffer_set.h
libs/ardour/ardour/plugin_manager.h
libs/ardour/buffer_set.cc
libs/ardour/plugin.cc
libs/ardour/plugin_insert.cc
libs/ardour/plugin_manager.cc
libs/ardour/wscript
wscript

index a549cfa975eecbad7b9a65dffa3b036ab0be8d08..7d9323995205e965800c081b8ea5b2a83a27747b 100644 (file)
@@ -50,7 +50,7 @@
 #include "ardour/vst_plugin.h"
 #include "vst_pluginui.h"
 #endif
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 #include "ardour/lv2_plugin.h"
 #include "lv2_plugin_ui.h"
 #endif
@@ -317,7 +317,7 @@ PluginUIWindow::app_activated (bool)
 bool
 PluginUIWindow::create_lv2_editor(boost::shared_ptr<PluginInsert> insert)
 {
-#ifndef HAVE_SLV2
+#ifndef LV2_SUPPORT
        return false;
 #else
 
index 9ba44e9481863c6b57103abe0dd47dd64ae5231c..05e0e42d1f142a8a7eb65dd8a7419f79ad1068e2 100644 (file)
@@ -41,7 +41,7 @@ class Buffer;
 class AudioBuffer;
 class MidiBuffer;
 class PortSet;
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 class LV2EventBuffer;
 #endif
 
@@ -108,7 +108,7 @@ public:
                return (const MidiBuffer&)get(DataType::MIDI, i);
        }
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        /** Get a MIDI buffer translated into an LV2 MIDI buffer for use with plugins.
         * The index here corresponds directly to MIDI buffer numbers (i.e. the index
         * passed to get_midi), translation back and forth will happen as needed */
@@ -170,7 +170,7 @@ private:
        /// Vector of vectors, indexed by DataType
        std::vector<BufferVec> _buffers;
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        /// LV2 MIDI buffers (for conversion to/from MIDI buffers)
        typedef std::vector< std::pair<bool, LV2EventBuffer*> > LV2Buffers;
        LV2Buffers _lv2_buffers;
index b7385ad0aa289f682cccad0f41f522dc8cf087d6..2d60bf53f6134d45875d6b6c0f14d68af40092ae 100644 (file)
@@ -33,7 +33,7 @@
 #include "ardour/types.h"
 #include "ardour/plugin.h"
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 #include "ardour/lv2_plugin.h"
 #endif
 
@@ -56,7 +56,7 @@ class PluginManager : public boost::noncopyable {
        int add_ladspa_directory (std::string dirpath);
        int add_vst_directory (std::string dirpath);
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        LV2World* lv2_world() { return _lv2_world; }
 #endif
 
@@ -107,7 +107,7 @@ class PluginManager : public boost::noncopyable {
        ARDOUR::PluginInfoList* _lv2_plugin_info;
        ARDOUR::PluginInfoList* _au_plugin_info;
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        LV2World* _lv2_world;
 #endif
 
index 281e6303fa8db30d8faff8494630a1770670adce..46069e83b41d1bd67f3ee43ffa967fb12a9a7efc 100644 (file)
@@ -31,7 +31,7 @@
 #include "ardour/port.h"
 #include "ardour/port_set.h"
 #include "ardour/audioengine.h"
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 #include "ardour/lv2_plugin.h"
 #include "ardour/lv2_event_buffer.h"
 #endif
@@ -178,7 +178,7 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
                _count.set (type, num_buffers);
        }
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        // Ensure enough low level MIDI format buffers are available for conversion
        // in both directions (input & output, out-of-place)
        if (type == DataType::MIDI && _lv2_buffers.size() < _buffers[type].size() * 2 + 1) {
@@ -240,7 +240,7 @@ BufferSet::get(DataType type, size_t i) const
        return *_buffers[type][i];
 }
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 
 LV2EventBuffer&
 BufferSet::get_lv2_midi(bool input, size_t i)
@@ -293,7 +293,7 @@ BufferSet::flush_lv2_midi(bool input, size_t i)
        }
 }
 
-#endif /* HAVE_SLV2 */
+#endif /* LV2_SUPPORT */
 
 #ifdef VST_SUPPORT
 
index 04db01889bf6b081e675f6bcb9c545eaa64c2074..b6e433c0b003bd8a63b0e69e13565c9e2b0f2a03 100644 (file)
@@ -49,7 +49,7 @@
 #include "ardour/audio_unit.h"
 #endif
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 #include "ardour/lv2_plugin.h"
 #endif
 
@@ -127,7 +127,7 @@ ARDOUR::find_plugin(Session& session, string identifier, PluginType type)
                plugs = mgr->ladspa_plugin_info();
                break;
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        case ARDOUR::LV2:
                plugs = mgr->lv2_plugin_info();
                break;
index 48ffb9bf0cb9eedb1a0e8e3a836998c23cb19bfd..4ba82eb4d2f52b069ae60beeeb3035395041215b 100644 (file)
@@ -37,7 +37,7 @@
 #include "ardour/port.h"
 #include "ardour/route.h"
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 #include "ardour/lv2_plugin.h"
 #endif
 
@@ -549,7 +549,7 @@ boost::shared_ptr<Plugin>
 PluginInsert::plugin_factory (boost::shared_ptr<Plugin> other)
 {
        boost::shared_ptr<LadspaPlugin> lp;
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        boost::shared_ptr<LV2Plugin> lv2p;
 #endif
 #ifdef VST_SUPPORT
@@ -561,7 +561,7 @@ PluginInsert::plugin_factory (boost::shared_ptr<Plugin> other)
 
        if ((lp = boost::dynamic_pointer_cast<LadspaPlugin> (other)) != 0) {
                return boost::shared_ptr<Plugin> (new LadspaPlugin (*lp));
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        } else if ((lv2p = boost::dynamic_pointer_cast<LV2Plugin> (other)) != 0) {
                return boost::shared_ptr<Plugin> (new LV2Plugin (*lv2p));
 #endif
index 5f01d49a6444360357b7656b6bdc421f2ffd9326..be588dcdb22f942a1d7189b9e9a5a0fb510b233b 100644 (file)
@@ -48,8 +48,7 @@
 #include "ardour/ladspa_plugin.h"
 #include "ardour/filesystem_paths.h"
 
-#ifdef HAVE_SLV2
-#include <slv2/slv2.h>
+#ifdef LV2_SUPPORT
 #include "ardour/lv2_plugin.h"
 #endif
 
@@ -134,7 +133,7 @@ PluginManager::PluginManager ()
                ladspa_plugin_whitelist.push_back (2150); // tap pitch shifter
        }
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        _lv2_world = new LV2World();
 #endif
 
@@ -144,7 +143,7 @@ PluginManager::PluginManager ()
 
 PluginManager::~PluginManager()
 {
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        delete _lv2_world;
 #endif
 }
@@ -154,7 +153,7 @@ void
 PluginManager::refresh ()
 {
        ladspa_refresh ();
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        lv2_refresh ();
 #endif
 #ifdef VST_SUPPORT
@@ -471,7 +470,7 @@ PluginManager::get_ladspa_category (uint32_t plugin_id)
        }
 }
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 void
 PluginManager::lv2_refresh ()
 {
@@ -768,7 +767,7 @@ PluginManager::ladspa_plugin_info ()
 ARDOUR::PluginInfoList&
 PluginManager::lv2_plugin_info ()
 {
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        if (!_lv2_plugin_info)
                lv2_refresh();
        return *_lv2_plugin_info;
index 7fd189b86d5093fc5135fa73216fa13de691e09d..b81e0c6b75357defa76971c85c8172d1c9a5f95d 100644 (file)
@@ -295,6 +295,9 @@ def configure(conf):
     if ogg_supported():
         conf.define ('HAVE_OGG', 1)
 
+    if conf.env['HAVE_SLV2']:
+        conf.define ('LV2_SUPPORT', 1)
+    
     conf.write_config_header('libardour-config.h')
 
     # Boost headers
diff --git a/wscript b/wscript
index 8ae4ccbe206101ffb31f7623e499e3c617bb32cd..9f1ecb9802e92a84a6f9acb6c408e4464467c9d4 100644 (file)
--- a/wscript
+++ b/wscript
@@ -533,7 +533,7 @@ def configure(conf):
     autowaf.display_msg(conf, 'Freesound', opts.freesound)
     if opts.freesound:
         conf.define('FREESOUND',1)
-    autowaf.display_msg(conf, 'LV2 Support', bool(conf.env['HAVE_SLV2']))
+    autowaf.display_msg(conf, 'LV2 Support', bool(conf.env['LV2_SUPPORT']))
     autowaf.display_msg(conf, 'LV2 UI Embedding', bool(conf.env['HAVE_SUIL']))
     autowaf.display_msg(conf, 'OGG', bool(conf.env['HAVE_OGG']))
     autowaf.display_msg(conf, 'Rubberband', bool(conf.env['HAVE_RUBBERBAND']))