From d285b00a168e830c1e837513b7442a48c69d9937 Mon Sep 17 00:00:00 2001 From: "Igor V. Kovalenko" Date: Mon, 14 Dec 2020 08:48:11 +0300 Subject: [PATCH] build-sys: meson: change oss-output boolean to Meson feature Part-of: --- meson.build | 7 +++---- meson_options.txt | 2 +- src/modules/meson.build | 2 +- src/utils/meson.build | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 3adb876..437fc80 100644 --- a/meson.build +++ b/meson.build @@ -616,8 +616,7 @@ if x11_dep.found() endif # Module dependencies -if get_option('oss-output') - assert(cc.has_header('sys/soundcard.h'), 'Need header file for OSS support') +if cc.has_header('sys/soundcard.h', required: get_option('oss-output')) cdata.set('HAVE_OSS_OUTPUT', 1) cdata.set('HAVE_OSS_WRAPPER', 1) cdata.set('PULSEDSP_LOCATION', pulsedsp_location) @@ -811,8 +810,8 @@ summary = [ '', 'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')), 'Enable X11: @0@'.format(x11_dep.found()), - 'Enable OSS Output: @0@'.format(get_option('oss-output')), -# 'Enable OSS Wrapper: @0@'.format(${ENABLE_OSS_WRAPPER}), + 'Enable OSS Output: @0@'.format(cdata.has('HAVE_OSS_OUTPUT')), + 'Enable OSS Wrapper: @0@'.format(cdata.has('HAVE_OSS_WRAPPER')), # 'Enable EsounD: @0@'.format(${ENABLE_ESOUND}), 'Enable Alsa: @0@'.format(alsa_dep.found()), # 'Enable CoreAudio: @0@'.format(${ENABLE_COREAUDIO}), diff --git a/meson_options.txt b/meson_options.txt index 247f26a..ccfa2f7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -124,7 +124,7 @@ option('orc', type : 'feature', value : 'auto', description : 'Optimized Inner Loop Runtime Compiler') option('oss-output', - type : 'boolean', + type : 'feature', value : 'auto', description : 'Optional OSS output support') option('samplerate', type : 'feature', value : 'disabled', diff --git a/src/modules/meson.build b/src/modules/meson.build index 9df6d0e..a4da633 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -73,7 +73,7 @@ if cc.has_header('linux/input.h') ] endif -if get_option('oss-output') +if cdata.has('HAVE_OSS_OUTPUT') subdir('oss') all_modules += [ [ 'module-oss', 'oss/module-oss.c', [], [], [], liboss_util ], diff --git a/src/utils/meson.build b/src/utils/meson.build index 934abb8..a070198 100644 --- a/src/utils/meson.build +++ b/src/utils/meson.build @@ -84,7 +84,7 @@ if x11_dep.found() ) endif -if get_option('oss-output') +if cdata.has('HAVE_OSS_WRAPPER') libpulsecommon_sources = [ 'padsp.c', ] -- 2.7.4