Skip to content

Commit 32d0e8b

Browse files
authored
Merge pull request #216 from ffontaine/master
configure.ac: fix ssl static build
2 parents fa01648 + b3b81d2 commit 32d0e8b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

configure.ac

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,13 @@ AM_CONDITIONAL([HAVE_TLS], [test "x$enable_tls" = xyes])
160160

161161
if test "x$enable_tls" = "xyes"; then
162162
AC_DEFINE(HAVE_TLS)
163-
AC_CHECK_LIB([ssl], [SSL_ctrl ], [],
164-
AC_MSG_ERROR([libssl not found; install OpenSSL]))
165-
AC_CHECK_LIB([crypto], [BIO_read], [],
166-
AC_MSG_ERROR([libcrypto not found; install OpenSSL]))
163+
PKG_CHECK_MODULES([SSL], [openssl],
164+
[CFLAGS="$CFLAGS $SSL_CFLAGS" LIBS="$LIBS $SSL_LIBS"], [
165+
AC_CHECK_LIB([ssl], [SSL_ctrl ], [],
166+
AC_MSG_ERROR([libssl not found; install OpenSSL]))
167+
AC_CHECK_LIB([crypto], [BIO_read], [],
168+
AC_MSG_ERROR([libcrypto not found; install OpenSSL]))
169+
])
167170
fi
168171

169172
################################################################################

0 commit comments

Comments
 (0)