From ca372c2c4fd4fa18cf035087203069e412adfa00 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Thu, 27 Aug 2020 18:32:01 +0200 Subject: configure: try AC_LIB_LINKFLAGS for crypto and ssl libs, when pkg-config fails. --- NEWS | 10 ++++++++++ configure.ac | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ceb0f813..d629aef8 100644 --- a/NEWS +++ b/NEWS @@ -63,6 +63,16 @@ removed from a 6.5.0 or newer release.) * Fetchmail does not guarantee compatibility with EOL OpenSSL versions. Support for end-of-life OpenSSL versions may be removed even from patchlevel releases. +--------------------------------------------------------------------------------- +fetchmail-6.4.9: + +## CHANGES: +* configure: try to use AC_LIB_LINKFLAGS to obtain proper link flags for + libcrypto and libssl if pkg-config failed. + This is an attempt to fix borderline issues when users building on systems + with obsolete OpenSSL try to use a local newer OpenSSL from a separate + directory. + --------------------------------------------------------------------------------- fetchmail-6.4.8 (released 2020-06-14, 27596 LoC): diff --git a/configure.ac b/configure.ac index d026a662..fa9505d7 100644 --- a/configure.ac +++ b/configure.ac @@ -775,7 +775,7 @@ then PKG_CHECK_MODULES([SSL],[libssl libcrypto],[LIBS="$LIBS $SSL_LIBS"],[ AS_MESSAGE([SSL-check: pkg-config check failed, using traditional probe]) LDFLAGS="$LDFLAGS -L$with_ssl/lib" - LIBS="$LIBS -lssl -lcrypto" + #LIBS="$LIBS -lssl -lcrypto" # replaced by AC_LIB_LINKFLAGS below dnl check if -ldl is needed AC_MSG_CHECKING([for additional library dependencies of SSL]) found=0 @@ -799,6 +799,12 @@ else AC_MSG_WARN(Consider re-running configure --with-ssl.) fi +AC_LIB_LINKFLAGS([crypto]) +AC_LIB_LINKFLAGS([ssl], [crypto]) + +LIBS="$LIBS $LIBSSL $LIBCRYPTO" +AC_MSG_NOTICE([LIBS:] "$LIBS") + case "$LIBS" in *-lssl*) AC_CHECK_DECLS([TLS1_3_VERSION],, AC_MSG_WARN([Your OpenSSL version is too old and does not support TLS v1.3. Upgrade.]), -- cgit v1.2.3