1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
diff --git a/meson.build b/meson.build
index 87d65edb2..70031faf7 100644
--- a/meson.build
+++ b/meson.build
@@ -432,6 +432,13 @@ summary({'lilv (for lv2 plugins)': lilv_lib.found()}, bool_yn: true)
libffado_dep = dependency('libffado', required: get_option('libffado'))
summary({'ffado': libffado_dep.found()}, bool_yn: true)
+
+jack_dep = dependency('', required: false)
+if not get_option('jack-link-pipewire-jack').allowed()
+ jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack'))
+ summary({'JACK2': jack_dep.found()}, bool_yn: true, section: 'Backend')
+endif
+
check_functions = [
['gettid', '#include <unistd.h>', ['-D_GNU_SOURCE'], []],
['memfd_create', '#include <sys/mman.h>', ['-D_GNU_SOURCE'], []],
@@ -476,6 +483,11 @@ configure_file(output : 'config.h',
if get_option('pipewire-jack').allowed()
subdir('pipewire-jack')
endif
+
+if jack_dep.found()
+ subdir('spa/plugins/jack')
+endif
+
if get_option('pipewire-v4l2').allowed()
subdir('pipewire-v4l2')
endif
diff --git a/meson_options.txt b/meson_options.txt
index 3344b6244..8c3567d29 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -148,6 +148,10 @@ option('jack',
description: 'Enable jack spa plugin integration',
type: 'feature',
value: 'auto')
+option('jack-link-pipewire-jack',
+ description: 'Link jack spa plugin against pipewire-jack',
+ type: 'feature',
+ value: 'disabled')
option('support',
description: 'Enable support spa plugin integration',
type: 'feature',
diff --git a/pipewire-jack/src/meson.build b/pipewire-jack/src/meson.build
index def7746af..69a076e02 100644
--- a/pipewire-jack/src/meson.build
+++ b/pipewire-jack/src/meson.build
@@ -51,6 +51,13 @@ pipewire_jack = shared_library('jack',
install_dir : libjack_path,
)
+if get_option('jack-link-pipewire-jack').allowed()
+ jack_dep = declare_dependency(
+ include_directories: [jack_inc],
+ link_with: [pipewire_jack],
+ )
+endif
+
pipewire_jackserver = shared_library('jackserver',
pipewire_jackserver_sources,
soversion : soversion,
diff --git a/spa/meson.build b/spa/meson.build
index 27cdd2113..ee4266324 100644
--- a/spa/meson.build
+++ b/spa/meson.build
@@ -85,8 +85,6 @@ if get_option('spa-plugins').allowed()
summary({'ModemManager': mm_dep.found()}, bool_yn: true, section: 'Bluetooth backends')
endif
endif
- jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack'))
- summary({'JACK2': jack_dep.found()}, bool_yn: true, section: 'Backend')
have_vulkan = false
vulkan_dep = dependency('vulkan', version : '>= 1.2.170', required: get_option('vulkan'))
diff --git a/spa/plugins/meson.build b/spa/plugins/meson.build
index 210004691..a879ae715 100644
--- a/spa/plugins/meson.build
+++ b/spa/plugins/meson.build
@@ -22,9 +22,6 @@ endif
if avcodec_dep.found()
subdir('ffmpeg')
endif
-if jack_dep.found()
- subdir('jack')
-endif
if get_option('support').allowed()
subdir('support')
endif
diff --git a/src/modules/meson.build b/src/modules/meson.build
index a60b85eee..e74e30c98 100644
--- a/src/modules/meson.build
+++ b/src/modules/meson.build
@@ -178,7 +178,7 @@ pipewire_module_echo_cancel = shared_library('pipewire-module-echo-cancel',
dependencies : [mathlib, dl_lib, pipewire_dep, audioconvert_dep],
)
-build_module_jack_tunnel = jack_dep.found()
+build_module_jack_tunnel = get_option('jack').allowed()
if build_module_jack_tunnel
pipewire_module_jack_tunnel = shared_library('pipewire-module-jack-tunnel',
[ 'module-jack-tunnel.c' ],
|