Skip to content

Commit

Permalink
curl-openssl.m4: prefer lib64 over lib
Browse files Browse the repository at this point in the history
Prior to this change if the user had two versions of OpenSSL installed
in the same folder (eg /usr/local/ssl) then the possibly older OpenSSL
in lib was preferred over OpenSSL 3 in lib64.

Ref: curl#7606
Ref: curl#7503

Closes #xxxx
  • Loading branch information
jay committed Mar 4, 2022
1 parent c07b95e commit 1beaf84
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions m4/curl-openssl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,17 @@ if test "x$OPT_OPENSSL" != xno; then
dnl Try pkg-config even when cross-compiling. Since we
dnl specify PKG_CONFIG_LIBDIR we're only looking where
dnl the user told us to look
OPENSSL_PCDIR="$OPT_OPENSSL/lib/pkgconfig"
dnl the user told us to look.
dnl OpenSSL 3 may use lib64 instead of lib like older versions
OPENSSL_PCDIR="$OPT_OPENSSL/lib64/pkgconfig"
if test -f "$OPENSSL_PCDIR/openssl.pc"; then
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
PKGTEST="yes"
fi
if test "$PKGTEST" != "yes"; then
# try lib64 instead
OPENSSL_PCDIR="$OPT_OPENSSL/lib64/pkgconfig"
OPENSSL_PCDIR="$OPT_OPENSSL/lib/pkgconfig"
if test -f "$OPENSSL_PCDIR/openssl.pc"; then
AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
PKGTEST="yes"
Expand Down

0 comments on commit 1beaf84

Please sign in to comment.