qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/26] configure, meson: convert pam detection to meson


From: Richard Henderson
Subject: Re: [PATCH 05/26] configure, meson: convert pam detection to meson
Date: Wed, 9 Jun 2021 09:47:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 6/9/21 8:57 AM, Daniel P. Berrangé wrote:
On Wed, Jun 09, 2021 at 08:46:22AM -0700, Richard Henderson wrote:
If not have_system, there's no point in looking for pam *at all* regardless
of get_option().

In theory we can simplify to

    if have_system
       pam = cc.find_library('pam', has_headers: ['security/pam_appl.h'],
                             required: get_option('auth_pam'),
                          ...)

and this will be fine for builds with system emulators. The only
caveat is that if someone disables system emulators while also
passing  -Dpam=enabled, we won't check for pam. That is a
nonsense combination of course, so probably doesn't matter
...
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.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]