Re: meson: Non-feature feature options
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-03-01T15:52:18Z
Lists: pgsql-hackers
On 24.02.23 14:01, Nazir Bilal Yavuz wrote:
> Thanks for the feedback. I updated the ssl patch and if you like
> changes, I can apply the same logic to uuid.
Maybe we can make some of the logic less nested. Right now there is
if sslopt != 'none'
if not ssl.found() and sslopt in ['auto', 'openssl']
I think at that point, ssl.found() is never true, so it can be removed.
And the two checks for sslopt are nearly redundant.
At the end of the block, there is
# At least one SSL library must be found, otherwise throw an error
if sslopt == 'auto' and auto_features.enabled()
error('SSL Library could not be found')
endif
endif
which also implies sslopt != 'none'. So I think the whole thing could be
if sslopt in ['auto', 'openssl']
...
endif
if sslopt == 'auto' and auto_features.enabled()
error('SSL Library could not be found')
endif
both at the top level.
Another issue, I think this is incorrect:
+ openssl_required ? error('openssl function @0@ is
required'.format(func)) : \
+ message('openssl function @0@ is
required'.format(func))
We don't want to issue a message like this when a non-required function
is missing.
Commits
-
meson: fix openssl detection issues in 6a30027
- 727400994d5a 16.0 landed
-
meson: Make auto the default of the ssl option
- 6a3002715eca 16.0 landed