Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60516fc

Browse files
meson: Fix linking using old OpenSSL lib names
Before OpenSSL 1.1.0 the legacy names ssleay32 and libeay32 werestill used on Windows, and while we have support for this auto-conf the meson buildsystem only used the new names on all plat-forms. This adds support for the old name scheme when buildingon Windows.This patch only applies to 17 and 16 as master no longer supportOpenSSL 1.0.2.Author: Darek Ślusarczyk <dslusarczyk@splunk.com>Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Discussion:https://postgr.es/m/CAN55FZ1Nk8wqY=mTrN78H026TuGV50h2H6uq1PwxhTauPYi3ug@mail.gmail.comBackpatch-through: 16
1 parentb26a3bc commit60516fc

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

‎meson.build

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,14 +1339,37 @@ if sslopt in ['auto', 'openssl']
13391339

13401340
# via library + headers
13411341
ifnot ssl.found()
1342+
is_windows= host_system=='windows'
1343+
1344+
ssl_lib_common_params= {
1345+
'dirs': test_lib_d,
1346+
'header_include_directories': postgres_inc,
1347+
'has_headers': ['openssl/ssl.h','openssl/err.h'],
1348+
}
13421349
ssl_lib= cc.find_library('ssl',
1343-
dirs: test_lib_d,
1344-
header_include_directories: postgres_inc,
1345-
has_headers: ['openssl/ssl.h','openssl/err.h'],
1346-
required: openssl_required)
1350+
kwargs: ssl_lib_common_params,
1351+
required: openssl_requiredandnot is_windows
1352+
)
1353+
# Before OpenSSL 1.1.0, there was a different naming convention for
1354+
# libraries on Windows, so try the alternative name if ssl wasn't found
1355+
ifnot ssl_lib.found()and is_windows
1356+
ssl_lib= cc.find_library('ssleay32',
1357+
kwargs: ssl_lib_common_params,
1358+
required: openssl_required
1359+
)
1360+
endif
1361+
13471362
crypto_lib= cc.find_library('crypto',
13481363
dirs: test_lib_d,
1349-
required: openssl_required)
1364+
required: openssl_requiredandnot is_windows)
1365+
# Before OpenSSL 1.1.0, there was a different naming convention for
1366+
# libraries on Windows, so try the alternatve name if crypto wasn't found
1367+
ifnot crypto_lib.found()and is_windows
1368+
crypto_lib= cc.find_library('libeay32',
1369+
dirs: test_lib_d,
1370+
required: openssl_required)
1371+
endif
1372+
13501373
if ssl_lib.found()and crypto_lib.found()
13511374
ssl_int= [ssl_lib, crypto_lib]
13521375
ssl=declare_dependency(dependencies: ssl_int,include_directories: postgres_inc)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp