]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Check OpenSSL using pkg-config which at least redhat uses nowadays.
authorTimo Sirainen <tss@iki.fi>
Sun, 22 Jun 2003 23:08:47 +0000 (02:08 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 22 Jun 2003 23:08:47 +0000 (02:08 +0300)
--HG--
branch : HEAD

configure.in

index 9e3ce7b54398e8035a41626b4ad337767cf6e428..9681332f71b1bbbffeb16bd24f143c4a6b67fc8e 100644 (file)
@@ -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