meson: Make avahi optional
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Fri, 19 Oct 2018 10:04:01 +0000 (17:04 +0700)
committerArun Raghavan <arun@arunraghavan.net>
Thu, 27 Dec 2018 11:55:55 +0000 (17:25 +0530)
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
meson.build
meson_options.txt

index ab1ea25..03f872a 100644 (file)
@@ -261,7 +261,7 @@ if cc.has_header('sys/soundcard.h')
   cdata.set_quoted('PULSEDSP_LOCATION',        pulsedspdir)
 endif
 
-avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : false)
+avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'))
 if avahi_dep.found()
   cdata.set('HAVE_AVAHI', 1)
 endif
index 683d258..3bd4b94 100644 (file)
@@ -20,6 +20,9 @@ option('pulsedspdir',
 option('alsa',
        type : 'feature', value : 'auto',
        description : 'Optional ALSA support')
+option('avahi',
+       type : 'feature', value : 'auto',
+       description : 'Optional Avahi support')
 option('dbus',
        type : 'feature', value : 'auto',
        description : 'Optional D-Bus support')