aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2022-06-04 22:29:47 +0200
committerMatthias Andree <matthias.andree@gmx.de>2022-07-16 11:46:19 +0200
commit32d3b075363cd3d7fa531cf9476e9d3ec8d3168f (patch)
tree99f7b6627a8ed3c0c2e12d595a2c010a5e9161a1
parentc89909b0d4e3fc914045bc5bacf029699c1d2420 (diff)
downloadfetchmail-32d3b075363cd3d7fa531cf9476e9d3ec8d3168f.tar.gz
fetchmail-32d3b075363cd3d7fa531cf9476e9d3ec8d3168f.tar.bz2
fetchmail-32d3b075363cd3d7fa531cf9476e9d3ec8d3168f.zip
configure.ac: try to fix --with-ssl=/pre/fix build
and pass the -L through LIBS to AC_LIB_LINKFLAGS_FROM_LIBS() instead of through LDCONFIG where it will miss it. To fix build issues reported by Dennis Putnam, when multiple OpenSSL versions are on the system.
-rw-r--r--NEWS2
-rw-r--r--configure.ac5
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 0c49e6e1..3a024d47 100644
--- a/NEWS
+++ b/NEWS
@@ -96,6 +96,8 @@ removed from a 6.5.0 or newer release.)
fetchmail-6.4.31 (not yet release):
# BUG FIXES:
+* Try to fix ./configure --with-ssl=... for systems that have multiple OpenSSL
+ versions installed. Issues reported by Dennis Putnam.
* The netrc parser now reports its errors to syslog or logfile when appropriate,
previously it would always log to stderr.
* Add error checking to .netrc parser.
diff --git a/configure.ac b/configure.ac
index 30530060..fff602fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -817,7 +817,7 @@ else
then
### ssl.h found under openssl. Use openssl configuration preferentially,
AC_MSG_NOTICE(Enabling OpenSSL support in $with_ssl.)
- test "$with_ssl" != "/usr" && CFLAGS="$CFLAGS -I$with_ssl/include" LDFLAGS="$LDFLAGS -L$with_ssl/lib"
+ test "$with_ssl" != "/usr" && CFLAGS="$CFLAGS -I$with_ssl/include" LIBS="-L$with_ssl/lib $LIBS"
### In Red Hat 9, this file includes a reference to <krb5.h>, so we
### force the Kerberos directory onto the include path so it will build.
CFLAGS="$CFLAGS -I/usr/kerberos/include"
@@ -835,6 +835,7 @@ else
found=0
test -n "$PKG_CONFIG" && for i in $modules ; do
AS_MESSAGE([SSL-check: trying pkg-config for $i])
+ AS_MESSAGE([NOTE: libdir=$libdir])
PKG_CHECK_MODULES([SSL],[$i],[
set -- $SSL_LIBS
while test $# -ge 1 ; do
@@ -845,7 +846,7 @@ else
done
CPPFLAGS="$SSL_CFLAGS $CPPFLAGS"
AS_MESSAGE([From pkg-config: $SSL_LIBS])
- AC_LIB_LINKFLAGS_FROM_LIBS([SSL_LDFLAGS],[$SSL_LIBS])
+ AC_LIB_LINKFLAGS_FROM_LIBS([SSL_LDFLAGS],[$LIBS $SSL_LIBS])
AS_MESSAGE([derived LDFLAGS: $SSL_LDFLAGS])
LDFLAGS="$SSL_LDFLAGS $LDFLAGS"
found=1