meson: Make alsa optional
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Fri, 19 Oct 2018 09:37:05 +0000 (16:37 +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 0d9a566..45eca20 100644 (file)
@@ -237,7 +237,7 @@ if x11_dep.found()
   cdata.set('HAVE_X11', 1)
 endif
 
-alsa_dep = dependency('alsa', version : '>= 1.0.24', required : false)
+alsa_dep = dependency('alsa', version : '>= 1.0.24', required : get_option('alsa'))
 if alsa_dep.found()
   cdata.set('HAVE_ALSA_UCM', 1)
 endif
index ab9d673..ba58b0b 100644 (file)
@@ -17,6 +17,9 @@ option('pulsedspdir',
 
 # Optional features
 
+option('alsa',
+       type : 'feature', value : 'auto',
+       description : 'Optional ALSA support')
 option('dbus',
        type : 'feature', value : 'auto',
        description : 'Optional D-Bus support')