diff --git a/meson.build b/meson.build index 70ff5be61..c3fe18977 100644 --- a/meson.build +++ b/meson.build @@ -228,6 +228,11 @@ cdata.set('DISABLE_ORC', 1) # Module dependencies +avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : false) +if avahi_dep.found() + cdata.set('HAVE_AVAHI', 1) +endif + jack_dep = dependency('jack', version : '>= 0.117.0', required : false) if jack_dep.found() cdata.set('HAVE_JACK', 1) diff --git a/src/modules/meson.build b/src/modules/meson.build index 463aae5e3..14f7f80f6 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -119,9 +119,13 @@ endif if openssl_dep.found() all_modules += [ -# [ 'module-raop-discover', 'raop/module-raop-discover.c' ], [ 'module-raop-sink', 'raop/module-raop-sink.c', [], [], [], libraop ], ] + if avahi_dep.found() + all_modules += [ + [ 'module-raop-discover', 'raop/module-raop-discover.c', [], [], [avahi_dep], libavahi_wrap ], + ] + endif endif if systemd_dep.found() diff --git a/src/pulsecore/meson.build b/src/pulsecore/meson.build index c6f39b6f0..60b9b9aa8 100644 --- a/src/pulsecore/meson.build +++ b/src/pulsecore/meson.build @@ -162,6 +162,16 @@ libpulsecore_dep = declare_dependency(link_with: libpulsecore) # Internal libraries for modules # TODO: understand 'c_args' and 'dependencies' better, maybe we can remove some +libavahi_wrap = shared_library('avahi_wrap', + 'avahi-wrap.c', + 'avahi-wrap.h', + c_args : [pa_c_args, server_c_args, database_c_args], + include_directories : [configinc, topinc], + dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, avahi_dep], + implicit_include_directories : false, # pulsecore/poll.h /usr/include/poll.h + install : true +) + libcli = shared_library('cli', 'cli.c', 'cli.h',