[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/26] configure, meson: convert pam detection to meson
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 05/26] configure, meson: convert pam detection to meson |
Date: |
Tue, 15 Jun 2021 15:58:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 09/06/21 18:47, Richard Henderson wrote:
feature==disabled does not map to required: false
https://mesonbuild.com/Build-options.html#features
[quote]
enabled is the same as passing required : true.
auto is the same as passing required : false.
disabled do not look for the dependency and always return
'not-found'.
[/quote]
Ah, thanks. Documentation is all over the place with meson. Anyway, I
would very much prefer the "if have_system" test above.
The more complicated one was done to cover two cases:
* "not get_option('xyz').auto() makes --enable-xyz fail even if the
library is otherwise unused. This matches what configure does and I
think it makes sense.
* have_system makes --disable-user without any --enable-* option not
warn if a library is only used by system emulation and only has a shared
library version available. Here, configure used not to warn even though
the configuration is bad, while meson does.
With Meson 0.59 there will be another way to write all of this:
pam = cc.find_library('pam', has_headers: ['security/pam_appl.h'],
required: get_option('auth_pam').disable_auto_if(not have_system),
kwargs: static_kwargs)
Also, for something like
if targetos != 'linux' and get_option('mpath').enabled()
error('Multipath is supported only on Linux')
endif
It will be possible to write
get_option('mpath').require(targetos == 'linux',
error_message: 'Multipath is supported only on Linux')
However, that's a few months away in QEMU.
Paolo
- Re: [PATCH 11/26] configure, meson: convert libdaxctl detection to meson, (continued)
- [PATCH 07/26] configure, meson: convert libcacard detection to meson, Paolo Bonzini, 2021/06/08
- [PATCH 05/26] configure, meson: convert pam detection to meson, Paolo Bonzini, 2021/06/08
- Re: [PATCH 05/26] configure, meson: convert pam detection to meson, Richard Henderson, 2021/06/08
- Re: [PATCH 05/26] configure, meson: convert pam detection to meson, Richard Henderson, 2021/06/08
- Re: [PATCH 05/26] configure, meson: convert pam detection to meson, Daniel P . Berrangé, 2021/06/08
- Re: [PATCH 05/26] configure, meson: convert pam detection to meson, Richard Henderson, 2021/06/09
- Re: [PATCH 05/26] configure, meson: convert pam detection to meson, Daniel P . Berrangé, 2021/06/09
- Re: [PATCH 05/26] configure, meson: convert pam detection to meson, Richard Henderson, 2021/06/09
- Re: [PATCH 05/26] configure, meson: convert pam detection to meson,
Paolo Bonzini <=
Re: [PATCH 05/26] configure, meson: convert pam detection to meson, Daniel P . Berrangé, 2021/06/15
[PATCH 09/26] configure, meson: convert vte detection to meson, Paolo Bonzini, 2021/06/08
[PATCH 14/26] configure, meson: convert libxml2 detection to meson, Paolo Bonzini, 2021/06/08
[PATCH 16/26] meson: remove preadv from summary, Paolo Bonzini, 2021/06/08
[PATCH 18/26] configure: convert HAVE_BROKEN_SIZE_MAX to meson, Paolo Bonzini, 2021/06/08