Skip to content

build: make OpenSSL pkg-config flags drive header checks and link flags#2686

Open
twz123 wants to merge 1 commit into
acassen:masterfrom
twz123:pkg-config-openssl
Open

build: make OpenSSL pkg-config flags drive header checks and link flags#2686
twz123 wants to merge 1 commit into
acassen:masterfrom
twz123:pkg-config-openssl

Conversation

@twz123
Copy link
Copy Markdown

@twz123 twz123 commented Jan 26, 2026

The OpenSSL detection in configure.ac performed header probes before pkg-config and only propagated the transient LIBS from AC_CHECK_LIB to KA_LIBS. This causes OpenSSL auto-detection to fail when it is in a nonstandard prefix, even though pkg-config knows the correct paths.

Run pkg-config before the OpenSSL probes. For the header checks, temporarily add OPENSSL_CPPFLAGS to CPPFLAGS and record OPENSSL_CFLAGS in KA_CFLAGS. For linking, use OPENSSL_LIBS directly in KA_LIBS. When only EVP is needed, add OPENSSL_LIBS without -lssl.

The OpenSSL detection in configure.ac performed header probes before
pkg-config and only propagated the transient LIBS from AC_CHECK_LIB
to KA_LIBS. This causes OpenSSL auto-detection to fail when it is in a
nonstandard prefix, even though pkg-config knows the correct paths.

Run pkg-config before the OpenSSL probes. For the header checks,
temporarily add OPENSSL_CPPFLAGS to CPPFLAGS and record OPENSSL_CFLAGS
in KA_CFLAGS. For linking, use OPENSSL_LIBS directly in KA_LIBS. When
only EVP is needed, add OPENSSL_LIBS without -lssl.

Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant