meson: fix logic for gnutls check
PATCH 1/1 meson: fix logic for gnutls check
The logic before was
if not get_option('gnutls').auto() or have_system
Which is equivalent to
if get_option('gnutls').enabled() or get_option('gnutls').disabled() or have_system
This means that the check for gnutls is performed even if gnutls is disabled, which means that the build system will insist on having libtasn1 if gnutls is found, even if gnutls support is disabled.
When gnutls is disabled, the check for gnutls shouldn't be performed, to ensure that further build system logic (like the check for libtasn1) doesn't make decisions based on the presence of gnutls, rather than the gnutls option.
After making this change, I can successfully ./configure --disable-gnutls on my system with gnutls installed, but not libtasn1.
--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
@@ -824,7 +824,7 @@ endif gnutls = not_found gnutls_crypto = not_found -if not get_option('gnutls').auto() or have_system +if get_option('gnutls').enabled() or (get_option('gnutls').auto() and have_system) # For general TLS support our min gnutls matches # that implied by our platform support matrix #
Signature · 1 line
2.32.0
Quoted 31 lines · Alyssa Ross
The logic before was
if not get_option('gnutls').auto() or
have_systemWhich is equivalent to
if get_option('gnutls').enabled() or get_option('gnutls').disabled() or
have_systemThis means that the check for gnutls is performed even if gnutls is disabled, which means that the build system will insist on having libtasn1 if gnutls is found, even if gnutls support is disabled.
When gnutls is disabled, the check for gnutls shouldn't be performed, to ensure that further build system logic (like the check for libtasn1) doesn't make decisions based on the presence of gnutls, rather than the gnutls option.
After making this change, I can successfully ./configure --disable-gnutls on my system with gnutls installed, but not libtasn1.
Signed-off-by Alyssa Ross <[email protected]>--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meson.build +0
-0
meson.build endif · line 830
Quoted 8 lines
meson.build +1
-1@@ -824,7 +824,7 @@ endif gnutls = not_found gnutls_crypto = not_found -if not get_option('gnutls').auto() or have_system +if get_option('gnutls').enabled() or (get_option('gnutls').auto() and have_system) # For general TLS support our min gnutls matches # that implied by our platform support matrix #
Right now I am not planning to send another pull request for -rc3, but the patch certainly has to be included.
Thanks,
Paolo