From 611a809dbbdf5c77c43f7c5dbe5e845d2e7fec8e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 23 Jun 2003 02:08:47 +0300 Subject: [PATCH] Check OpenSSL using pkg-config which at least redhat uses nowadays. --HG-- branch : HEAD --- configure.in | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/configure.in b/configure.in index 9e3ce7b543..9681332f71 100644 --- a/configure.in +++ b/configure.in @@ -729,15 +729,22 @@ if test $want_gnutls = yes; then fi if test "$want_openssl" = "yes" -a "$have_ssl" = "no"; then - AC_CHECK_LIB(ssl, SSL_read, [ - AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [ - AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support) - SSL_LIBS="-lssl -lcrypto" - AC_SUBST(SSL_LIBS) - have_ssl="yes (OpenSSL)" - have_openssl=yes - ]) - ],, -lcrypto) + if pkg-config --exists openssl; then + PKG_CHECK_MODULES(SSL, openssl) + CFLAGS="$CFLAGS $SSL_CFLAGS" + have_ssl="yes (OpenSSL)" + have_openssl=yes + else + AC_CHECK_LIB(ssl, SSL_read, [ + AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [ + AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support) + SSL_LIBS="-lssl -lcrypto" + AC_SUBST(SSL_LIBS) + have_ssl="yes (OpenSSL)" + have_openssl=yes + ]) + ],, -lcrypto) + fi fi if test "$have_ssl" != "no"; then -- 2.47.3