Skip to content

Commit

Permalink
check also for libcrypto11, as this is commonly used as a lib alias f…
Browse files Browse the repository at this point in the history
…or openssl1.1.1 on Centos/RHEL/OEL 7
  • Loading branch information
keldonin committed Dec 22, 2020
1 parent 2df9f04 commit f7a8016
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,27 @@ AS_IF([test "x$host_os" == "xmingw32"],[mingw32=1],[mingw32=0])
AM_CONDITIONAL([TARGET_OS_MINGW32], [test "$mingw32" = "1"])

PKG_PROG_PKG_CONFIG
dnl for libcrypto, we are first detecting libcrypo11,
dnl as older distros may still run on top of openssl 1.0,
dnl but have v1.1.x accessible through libcrypto11.pc file
PKG_CHECK_MODULES([LIBCRYPTO],
[libcrypto >= 1.1.1],
[libcrypto11 >= 1.1.1],
[ ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="${CPPFLAGS} ${LIBCRYPTO_CFLAGS}"
AC_CHECK_DECLS([OPENSSL_NO_RSA, OPENSSL_NO_DSA, OPENSSL_NO_DH, OPENSSL_NO_EC],
[AC_MSG_FAILURE([The OpenSSL crypto library is missing features/algorithm to allow compilation])],
[],
[[#include <openssl/opensslconf.h>]])
CPPFLAGS=${ac_save_CPPFLAGS} ])
[[ #include <openssl/opensslconf.h> ]])
CPPFLAGS=${ac_save_CPPFLAGS} ],
[ PKG_CHECK_MODULES([LIBCRYPTO],
[libcrypto >= 1.1.1],
[ ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="${CPPFLAGS} ${LIBCRYPTO_CFLAGS}"
AC_CHECK_DECLS([OPENSSL_NO_RSA, OPENSSL_NO_DSA, OPENSSL_NO_DH, OPENSSL_NO_EC],
[AC_MSG_FAILURE([The OpenSSL crypto library is missing features/algorithm to allow compilation])],
[],
[[ #include <openssl/opensslconf.h> ]])
CPPFLAGS=${ac_save_CPPFLAGS} ])])

dnl on UNIX platforms, check for dynamic loader lib
AM_COND_IF( [TARGET_OS_MINGW32],
Expand Down

0 comments on commit f7a8016

Please sign in to comment.