From: Viktor Szakats Date: Fri, 7 Jun 2024 22:41:24 +0000 (+0200) Subject: libcurl.pc: add `Requires.private`, `Requires` for static linking X-Git-Tag: curl-8_9_0~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f057de5a1a950a90d1920021db152a4b695f1a8a;p=thirdparty%2Fcurl.git libcurl.pc: add `Requires.private`, `Requires` for static linking - cmake: populate for dependencies. - autotools: populate for dependencies. (including mbedtls, though the script does not detect mbedtls through pkgconfig. mbedtls 3.6.0 now supports it.) Skip dealing with gssapi in this patch. Fixes #864 Closes #13911 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c939df914c..2fccc550f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,11 +159,13 @@ endif() # initialize CURL_LIBS set(CURL_LIBS "") +set(LIBCURL_PC_REQUIRES_PRIVATE "") if(ENABLE_ARES) set(USE_ARES 1) find_package(CARES REQUIRED) list(APPEND CURL_LIBS ${CARES_LIBRARY}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libcares") endif() include(CurlSymbolHiding) @@ -480,6 +482,7 @@ if(CURL_USE_OPENSSL) list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) include_directories(${OPENSSL_INCLUDE_DIR}) endif() + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "openssl") if(CURL_DEFAULT_SSL_BACKEND AND CURL_DEFAULT_SSL_BACKEND STREQUAL "openssl") set(valid_default_ssl_backend TRUE) @@ -499,6 +502,7 @@ if(CURL_USE_MBEDTLS) set(SSL_ENABLED ON) set(USE_MBEDTLS ON) list(APPEND CURL_LIBS ${MBEDTLS_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "mbedtls") include_directories(${MBEDTLS_INCLUDE_DIRS}) if(CURL_DEFAULT_SSL_BACKEND AND CURL_DEFAULT_SSL_BACKEND STREQUAL "mbedtls") @@ -523,6 +527,7 @@ if(CURL_USE_WOLFSSL) set(SSL_ENABLED ON) set(USE_WOLFSSL ON) list(APPEND CURL_LIBS ${WolfSSL_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "wolfssl") include_directories(${WolfSSL_INCLUDE_DIRS}) if(CURL_DEFAULT_SSL_BACKEND AND CURL_DEFAULT_SSL_BACKEND STREQUAL "wolfssl") @@ -535,6 +540,7 @@ if(CURL_USE_GNUTLS) set(SSL_ENABLED ON) set(USE_GNUTLS ON) list(APPEND CURL_LIBS ${GNUTLS_LIBRARIES} "nettle") + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "gnutls") include_directories(${GNUTLS_INCLUDE_DIRS}) if(CURL_DEFAULT_SSL_BACKEND AND CURL_DEFAULT_SSL_BACKEND STREQUAL "gnutls") @@ -573,6 +579,7 @@ if(ZLIB_FOUND) list(APPEND CURL_LIBS ${ZLIB_LIBRARIES}) include_directories(${ZLIB_INCLUDE_DIRS}) endif() + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "zlib") list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) endif() @@ -583,6 +590,7 @@ if(CURL_BROTLI) if(BROTLI_FOUND) set(HAVE_BROTLI ON) list(APPEND CURL_LIBS ${BROTLI_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libbrotlidec") include_directories(${BROTLI_INCLUDE_DIRS}) list(APPEND CMAKE_REQUIRED_INCLUDES ${BROTLI_INCLUDE_DIRS}) endif() @@ -595,6 +603,7 @@ if(CURL_ZSTD) if(Zstd_FOUND AND NOT Zstd_VERSION VERSION_LESS "1.0.0") set(HAVE_ZSTD ON) list(APPEND CURL_LIBS ${Zstd_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libzstd") include_directories(${Zstd_INCLUDE_DIRS}) else() message(WARNING "zstd v1.0.0 or newer is required, disabling zstd support.") @@ -685,6 +694,7 @@ if(USE_NGHTTP2) find_package(NGHTTP2 REQUIRED) include_directories(${NGHTTP2_INCLUDE_DIRS}) list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libnghttp2") endif() option(USE_NGTCP2 "Use ngtcp2 and nghttp3 libraries for HTTP/3 support" OFF) @@ -692,25 +702,31 @@ if(USE_NGTCP2) if(USE_OPENSSL OR USE_WOLFSSL) if(USE_WOLFSSL) find_package(NGTCP2 REQUIRED wolfSSL) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libngtcp2_crypto_wolfssl") elseif(HAVE_BORINGSSL OR HAVE_AWSLC) find_package(NGTCP2 REQUIRED BoringSSL) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libngtcp2_crypto_boringssl") else() find_package(NGTCP2 REQUIRED quictls) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libngtcp2_crypto_quictls") endif() openssl_check_quic() elseif(USE_GNUTLS) find_package(NGTCP2 REQUIRED GnuTLS) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libngtcp2_crypto_gnutls") else() message(FATAL_ERROR "ngtcp2 requires OpenSSL, wolfSSL or GnuTLS") endif() set(USE_NGTCP2 ON) include_directories(${NGTCP2_INCLUDE_DIRS}) list(APPEND CURL_LIBS ${NGTCP2_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libngtcp2") find_package(NGHTTP3 REQUIRED) set(USE_NGHTTP3 ON) include_directories(${NGHTTP3_INCLUDE_DIRS}) list(APPEND CURL_LIBS ${NGHTTP3_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libnghttp3") endif() option(USE_QUICHE "Use quiche library for HTTP/3 support" OFF) @@ -726,6 +742,7 @@ if(USE_QUICHE) set(USE_QUICHE ON) include_directories(${QUICHE_INCLUDE_DIRS}) list(APPEND CURL_LIBS ${QUICHE_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "quiche") if(NOT DEFINED HAVE_QUICHE_CONN_SET_QLOG_FD) cmake_push_check_state() set(CMAKE_REQUIRED_INCLUDES "${QUICHE_INCLUDE_DIRS}") @@ -756,6 +773,7 @@ if(USE_OPENSSL_QUIC) set(USE_NGHTTP3 ON) include_directories(${NGHTTP3_INCLUDE_DIRS}) list(APPEND CURL_LIBS ${NGHTTP3_LIBRARIES}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libnghttp3") endif() if(USE_MBEDTLS OR @@ -887,6 +905,7 @@ if(USE_LIBIDN2) check_library_exists("idn2" "idn2_lookup_ul" "" HAVE_LIBIDN2) if(HAVE_LIBIDN2) set(CURL_LIBS "idn2;${CURL_LIBS}") + set(LIBCURL_PC_REQUIRES_PRIVATE "libidn2;${LIBCURL_PC_REQUIRES_PRIVATE}") check_include_file_concat("idn2.h" HAVE_IDN2_H) endif() else() @@ -924,6 +943,7 @@ if(CURL_USE_LIBPSL) find_package(LibPSL) if(LIBPSL_FOUND) list(APPEND CURL_LIBS ${LIBPSL_LIBRARY}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libpsl") list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBPSL_INCLUDE_DIR}") include_directories("${LIBPSL_INCLUDE_DIR}") set(USE_LIBPSL ON) @@ -939,6 +959,7 @@ if(CURL_USE_LIBSSH2) find_package(LibSSH2) if(LIBSSH2_FOUND) list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libssh2") list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}") include_directories("${LIBSSH2_INCLUDE_DIR}") set(USE_LIBSSH2 ON) @@ -954,6 +975,7 @@ if(NOT USE_LIBSSH2 AND CURL_USE_LIBSSH) message(STATUS "Found libssh ${libssh_VERSION}") # Use imported target for include and library paths. list(APPEND CURL_LIBS ssh) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libssh") set(USE_LIBSSH ON) endif() endif() @@ -1028,6 +1050,7 @@ if(USE_LIBRTMP) cmake_pop_check_state() if(HAVE_LIBRTMP) list(APPEND CURL_LIBS "rtmp") + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "librtmp") if(WIN32) list(APPEND CURL_LIBS "winmm") endif() @@ -1786,12 +1809,21 @@ if(NOT CURL_DISABLE_INSTALL) set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}") endif() endforeach() + + # Export a .pc file for client projects not using CMake + if(LIBCURL_PC_REQUIRES_PRIVATE) + string(REPLACE ";" "," LIBCURL_PC_REQUIRES_PRIVATE "${LIBCURL_PC_REQUIRES_PRIVATE}") + endif() + + # Merge pkg-config private fields into public ones when static-only if(BUILD_SHARED_LIBS) set(ENABLE_SHARED "yes") + set(LIBCURL_PC_REQUIRES "") set(LIBCURL_NO_SHARED "") set(CPPFLAG_CURL_STATICLIB "") else() set(ENABLE_SHARED "no") + set(LIBCURL_PC_REQUIRES "${LIBCURL_PC_REQUIRES_PRIVATE}") set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}") set(CPPFLAG_CURL_STATICLIB "-DCURL_STATICLIB") endif() diff --git a/configure.ac b/configure.ac index c89c73bb8d..8e23ca6fdb 100644 --- a/configure.ac +++ b/configure.ac @@ -799,7 +799,8 @@ if test X"$want_hyper" != Xno; then AC_SUBST(USE_HYPER, [1]) CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER" export CURL_LIBRARY_PATH - AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH]), + AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE hyper" ) ], for d in `echo $DIR_HYPER | $SED -e 's/:/ /'`; do @@ -1381,6 +1382,7 @@ else dnl replace 'HAVE_LIBZ' in the automake makefile.ams AMFIXLIB="1" AC_MSG_NOTICE([found both libz and libz.h header]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE zlib" curl_zlib_msg="enabled" fi fi @@ -1469,6 +1471,7 @@ if test X"$OPT_BROTLI" != Xno; then AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH]) fi fi + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libbrotlidec" else dnl no brotli, revert back to clean variables LDFLAGS=$CLEANLDFLAGS @@ -1556,6 +1559,7 @@ if test X"$OPT_ZSTD" != Xno; then AC_MSG_NOTICE([Added $DIR_ZSTD to CURL_LIBRARY_PATH]) fi fi + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE zstd" else dnl no zstd, revert back to clean variables LDFLAGS=$CLEANLDFLAGS @@ -2142,6 +2146,7 @@ if test X"$OPT_LIBPSL" != Xno; then LIBPSL_ENABLED=1 AC_DEFINE(USE_LIBPSL, 1, [if libpsl is in use]) AC_SUBST(USE_LIBPSL, [1]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libpsl" ) ], dnl not found, revert back to clean variables @@ -2274,6 +2279,7 @@ if test X"$OPT_LIBSSH2" != Xno; then AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH]) fi fi + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libssh2" else dnl no libssh2, revert back to clean variables LDFLAGS=$CLEANLDFLAGS @@ -2347,6 +2353,7 @@ elif test X"$OPT_LIBSSH" != Xno; then AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH]) fi fi + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libssh" else dnl no libssh, revert back to clean variables LDFLAGS=$CLEANLDFLAGS @@ -2441,6 +2448,7 @@ if test X"$OPT_LIBRTMP" != Xno; then LIBRTMP_ENABLED=1 AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use]) AC_SUBST(USE_LIBRTMP, [1]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE librtmp" ) ], dnl not found, revert back to clean variables @@ -2724,6 +2732,7 @@ if test "$want_idn" = "yes"; then export CURL_LIBRARY_PATH AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH]) fi + LIBCURL_PC_REQUIRES_PRIVATE="libidn2 $LIBCURL_PC_REQUIRES_PRIVATE" else AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled]) CPPFLAGS="$clean_CPPFLAGS" @@ -2814,6 +2823,7 @@ if test X"$want_nghttp2" != Xno; then NGHTTP2_ENABLED=1 AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use]) AC_SUBST(USE_NGHTTP2, [1]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libnghttp2" ) CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_H2" @@ -2902,6 +2912,7 @@ if test X"$want_tcp2" != Xno; then CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2" export CURL_LIBRARY_PATH AC_MSG_NOTICE([Added $DIR_TCP2 to CURL_LIBRARY_PATH]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE ngtcp2" ) ], dnl not found, revert back to clean variables @@ -2958,6 +2969,7 @@ if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS" export CURL_LIBRARY_PATH AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE ngtcp2_crypto_quictls" ) ], dnl not found, revert back to clean variables @@ -3013,6 +3025,7 @@ if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_BORINGSSL" export CURL_LIBRARY_PATH AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_BORINGSSL to CURL_LIBRARY_PATH]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE ngtcp2_crypto_boringssl" ) ], dnl not found, revert back to clean variables @@ -3068,6 +3081,7 @@ if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS" export CURL_LIBRARY_PATH AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE ngtcp2_crypto_gnutls" ) ], dnl not found, revert back to clean variables @@ -3123,6 +3137,7 @@ if test "x$NGTCP2_ENABLED" = "x1" -a "x$WOLFSSL_ENABLED" = "x1"; then CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_WOLFSSL" export CURL_LIBRARY_PATH AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_WOLFSSL to CURL_LIBRARY_PATH]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE ngtcp2_crypto_wolfssl" ) ], dnl not found, revert back to clean variables @@ -3251,6 +3266,7 @@ if test X"$want_nghttp3" != Xno; then CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3" export CURL_LIBRARY_PATH AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE nghttp3" ) ], dnl not found, revert back to clean variables @@ -3374,7 +3390,8 @@ if test X"$want_quiche" != Xno; then AC_CHECK_FUNCS([quiche_conn_set_qlog_fd]) CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE" export CURL_LIBRARY_PATH - AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]), + AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE quiche", [], [ AC_INCLUDES_DEFAULT @@ -4647,12 +4664,20 @@ dnl to let curl-config output the static libraries correctly ENABLE_STATIC="$enable_static" AC_SUBST(ENABLE_STATIC) -dnl merge the pkg-config Libs.private field into Libs when static-only +squeeze LIBCURL_PC_REQUIRES_PRIVATE +LIBCURL_PC_REQUIRES_PRIVATE=`echo $LIBCURL_PC_REQUIRES_PRIVATE | tr ' ' ','` + +AC_SUBST(LIBCURL_PC_REQUIRES_PRIVATE) + +dnl Merge pkg-config private fields into public ones when static-only if test "x$enable_shared" = "xno"; then + LIBCURL_PC_REQUIRES=$LIBCURL_PC_REQUIRES_PRIVATE LIBCURL_NO_SHARED=$LIBCURL_LIBS else + LIBCURL_PC_REQUIRES= LIBCURL_NO_SHARED= fi +AC_SUBST(LIBCURL_PC_REQUIRES) AC_SUBST(LIBCURL_NO_SHARED) rm $compilersh diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS index 893eb5e8f4..58b9db13ed 100644 --- a/docs/KNOWN_BUGS +++ b/docs/KNOWN_BUGS @@ -40,7 +40,6 @@ problems may have been fixed or changed somewhat since this was written. 5.3 building for old macOS fails with gcc 5.5 cannot handle Unicode arguments in non-Unicode builds on Windows 5.6 cygwin: make install installs curl-config.1 twice - 5.9 Utilize Requires.private directives in libcurl.pc 5.11 configure --with-gssapi with Heimdal is ignored on macOS 5.12 flaky CI builds 5.13 long paths are not fully supported on Windows @@ -255,10 +254,6 @@ problems may have been fixed or changed somewhat since this was written. https://github.com/curl/curl/issues/8839 -5.9 Utilize Requires.private directives in libcurl.pc - - https://github.com/curl/curl/issues/864 - 5.11 configure --with-gssapi with Heimdal is ignored on macOS ... unless you also pass --with-gssapi-libs diff --git a/libcurl.pc.in b/libcurl.pc.in index 9db6b0f895..0eb1804857 100644 --- a/libcurl.pc.in +++ b/libcurl.pc.in @@ -22,9 +22,6 @@ # ########################################################################### -# This should most probably benefit from getting a "Requires:" field added -# dynamically by configure. -# prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ @@ -36,6 +33,8 @@ Name: libcurl URL: https://curl.se/ Description: Library to transfer files with ftp, http, etc. Version: @CURLVERSION@ +Requires: @LIBCURL_PC_REQUIRES@ +Requires.private: @LIBCURL_PC_REQUIRES_PRIVATE@ Libs: -L${libdir} -lcurl @LIBCURL_NO_SHARED@ Libs.private: @LIBCURL_LIBS@ Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@ diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4 index 5c307fc819..c5a3e027bf 100644 --- a/m4/curl-confopts.m4 +++ b/m4/curl-confopts.m4 @@ -563,6 +563,7 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [ AC_DEFINE(USE_ARES, 1, [Define to enable c-ares support]) AC_DEFINE(CARES_NO_DEPRECATED, 1, [Ignore c-ares deprecation warnings]) AC_SUBST([USE_ARES], [1]) + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE libcares" curl_res_msg="c-ares" fi fi diff --git a/m4/curl-gnutls.m4 b/m4/curl-gnutls.m4 index d4f553d69d..dbe6441b87 100644 --- a/m4/curl-gnutls.m4 +++ b/m4/curl-gnutls.m4 @@ -126,6 +126,7 @@ if test "x$OPT_GNUTLS" != xno; then AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH]) fi fi + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE gnutls" fi fi diff --git a/m4/curl-mbedtls.m4 b/m4/curl-mbedtls.m4 index 64116e758b..8504015dac 100644 --- a/m4/curl-mbedtls.m4 +++ b/m4/curl-mbedtls.m4 @@ -101,6 +101,7 @@ if test "x$OPT_MBEDTLS" != xno; then AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH]) fi fi + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE mbedtls" fi fi dnl mbedTLS not disabled diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4 index 2fb2abecc5..b9a4729c21 100644 --- a/m4/curl-openssl.m4 +++ b/m4/curl-openssl.m4 @@ -351,6 +351,7 @@ if test "x$OPT_OPENSSL" != xno; then fi fi check_for_ca_bundle=1 + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE openssl" fi test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" diff --git a/m4/curl-rustls.m4 b/m4/curl-rustls.m4 index ef8d7dd4b5..c9f9caedd3 100644 --- a/m4/curl-rustls.m4 +++ b/m4/curl-rustls.m4 @@ -172,6 +172,7 @@ if test "x$OPT_RUSTLS" != xno; then AC_MSG_NOTICE([Added $LIB_RUSTLS to CURL_LIBRARY_PATH]) fi fi + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE rustls" fi test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg" diff --git a/m4/curl-wolfssl.m4 b/m4/curl-wolfssl.m4 index 1da47a91ec..cdee597cc1 100644 --- a/m4/curl-wolfssl.m4 +++ b/m4/curl-wolfssl.m4 @@ -164,6 +164,7 @@ if test "x$OPT_WOLFSSL" != xno; then AC_MSG_NOTICE([Added $wolfssllibpath to CURL_LIBRARY_PATH]) fi fi + LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE wolfssl" else AC_MSG_ERROR([--with-wolfssl but wolfSSL was not found or doesn't work]) fi