use weak-jack's jack_port_rename wrapper
authorRobin Gareus <robin@gareus.org>
Wed, 28 Oct 2015 00:19:44 +0000 (01:19 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 28 Oct 2015 00:21:24 +0000 (01:21 +0100)
This avoids "[ERROR]: JACK: jack_port_set_name: deprecated".

if libjack does not have jack_port_rename(), weak_libjack.def provides
a fallback using jack_port_set_name().

libs/backends/jack/wscript

index b2a12b5f66b9013797559835f5dd93047672660e..09a7c227f728b9177aeb1badad97032e8f03f346 100644 (file)
@@ -49,7 +49,8 @@ def configure(conf):
                    uselib = 'JACK')
 
     # Check to see if jack_port_rename() is available and working
-    conf.check_cxx(fragment = "#include <jack/jack.h>\nint main(void) { jack_client_t* c; jack_port_t* p; jack_port_rename (c, p, \"foo\"); return 0; }\n",
+    if Options.options.libjack_link == 'link':
+            conf.check_cxx(fragment = "#include <jack/jack.h>\nint main(void) { jack_client_t* c; jack_port_t* p; jack_port_rename (c, p, \"foo\"); return 0; }\n",
                    mandatory = False,
                    execute = False,
                    features = ['cxx'],
@@ -101,7 +102,7 @@ def build(bld):
     if bld.env['libjack_link'] == 'link':
         obj.uselib   += [ 'JACK' ]
     else:
-        obj.defines += [ 'USE_WEAK_JACK' ]
+        obj.defines += [ 'USE_WEAK_JACK', 'HAVE_JACK_PORT_RENAME' ]
         obj.deps = [ 'weak_libjack.def' ]
 
     #