meson: Enable raop-discover module, add avahi dependency
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Thu, 20 Sep 2018 10:37:12 +0000 (17:37 +0700)
committerArun Raghavan <arun@arunraghavan.net>
Thu, 4 Oct 2018 03:14:18 +0000 (08:44 +0530)
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
meson.build
src/modules/meson.build
src/pulsecore/meson.build

index 70ff5be..c3fe189 100644 (file)
@@ -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)
index 463aae5..14f7f80 100644 (file)
@@ -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()
index c6f39b6..60b9b9a 100644 (file)
@@ -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 <vs> /usr/include/poll.h
+  install : true
+)
+
 libcli = shared_library('cli',
   'cli.c',
   'cli.h',