meson: simplify logic for -Dfdt
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 May 2023 15:29:04 +0000 (17:29 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 May 2023 10:34:17 +0000 (12:34 +0200)
commit577bdbcf85d4c491da3271d99526b66c576d90e5
treed538cc91f3f418a39a78c0895b503b97eed0a600
parent0bfd14149b248e8097ea4da1f9d53beb5c5b0cca
meson: simplify logic for -Dfdt

fdt_opt == 'disabled' is going to give an error if libfdt is required
by any target, so catch that immediately.  For fdt_opt == 'enabled',
instead, do not check immediately whether the internal libfdt is present.
Instead do the check after ascertaining that libfdt is absent or too old.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
meson.build