From 050a51aab3767eae808d0b8ca0df31025b47ff7f Mon Sep 17 00:00:00 2001 From: Jonas Holmberg Date: Mon, 7 Nov 2022 15:35:01 +0100 Subject: [PATCH] meson_options: Add readline option Make it possible to disable code that depends on readline even if readline is pulled in by another dependency, like bluez. --- meson.build | 4 ++-- meson_options.txt | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index eeed0b686..528d210ad 100644 --- a/meson.build +++ b/meson.build @@ -260,10 +260,10 @@ cdata.set('HAVE_DBUS', dbus_dep.found()) sdl_dep = dependency('sdl2', required : get_option('sdl2')) summary({'SDL2 (video examples)': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies') drm_dep = dependency('libdrm', required : false) -readline_dep = dependency('readline', required : false) +readline_dep = dependency('readline', required : get_option('readline')) if not readline_dep.found() - readline_dep = cc.find_library('readline', required: false) + readline_dep = cc.find_library('readline', required : get_option('readline')) endif summary({'readline (for pw-cli)': readline_dep.found()}, bool_yn: true, section: 'Misc dependencies') diff --git a/meson_options.txt b/meson_options.txt index 9beb55a96..f306ecbf9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -265,3 +265,7 @@ option('flatpak', description: 'Enable Flatpak support', type: 'feature', value: 'enabled') +option('readline', + description: 'Enable code that depends on libreadline', + type: 'feature', + value: 'auto')