1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-27 20:36:18 +00:00

configure.ng: use pkg-config to find PpenSSL dependencies

OpenSSL can depends on lz or latomic so use pkg-config to find those
dependencies and fallback to existing mechanism.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Closes #256.
This commit is contained in:
Fabrice Fontaine 2019-04-11 23:24:36 +02:00 committed by Alexander Barton
parent aec86aa84c
commit ad86a41eee

View File

@ -464,8 +464,11 @@ AC_ARG_WITH(openssl,
CPPFLAGS="-I$withval/include $CPPFLAGS"
LDFLAGS="-L$withval/lib $LDFLAGS"
fi
AC_CHECK_LIB(crypto, BIO_s_mem)
AC_CHECK_LIB(ssl, SSL_new)
PKG_CHECK_MODULES([OPENSSL], [libssl libcrypto],
[LIBS="$LIBS $OPENSSL_LIBS" CFLAGS="$CFLAGS $OPENSSL_CFLAGS"],
[AC_CHECK_LIB(crypto, BIO_s_mem)
AC_CHECK_LIB(ssl, SSL_new)]
)
AC_CHECK_FUNCS(SSL_new, x_ssl_openssl=yes,
AC_MSG_ERROR([Can't enable openssl])
)