about summary refs log tree commit diff
path: root/configure.ng
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2019-04-11 23:24:36 +0200
committerAlexander Barton <alex@barton.de>2019-04-20 18:50:09 +0200
commitad86a41eeed9f85d74bb50a25fa0bf4515aaf3af (patch)
tree45d9679bd2d1fb1bf03469fde30c2ac928be8980 /configure.ng
parentaec86aa84c7033757d36ad31aa6d87b271fe1e5b (diff)
downloadngircd-ad86a41eeed9f85d74bb50a25fa0bf4515aaf3af.tar.gz
ngircd-ad86a41eeed9f85d74bb50a25fa0bf4515aaf3af.zip
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.
Diffstat (limited to 'configure.ng')
-rw-r--r--configure.ng7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ng b/configure.ng
index 57ae8bb8..899d00f7 100644
--- a/configure.ng
+++ b/configure.ng
@@ -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])
 			)