freebsd-ports/security/xmlsec1/files/patch-configure.ac
Bernard Spil bf18cc7b48 security/xmlsec1: Fix build with LibreSSL 2.7
- LibreSSL 2.7 implements most of OpenSSL 1.1 API

PR:		D14851
Submitted by:	Charlie Li <ml+freebsd vishwin info>
Approved by:	maintainer time-out
Obtained from:	https://github.com/lsh123/xmlsec/pull/167
Differential Revision:	https://reviews.freebsd.org/D14851
2018-04-23 18:24:25 +00:00

33 lines
1,006 B
Text

--- configure.ac.orig 2017-09-12 13:21:09 UTC
+++ configure.ac
@@ -493,7 +493,7 @@ if test "z$OPENSSL_FOUND" = "zyes" -a "z
yes
#endif
],[
- OPENSSL_VERSION="1.0.0 (libressl)"
+ OPENSSL_VERSION="1.0.0 (libressl < 2.7)"
],[
OPENSSL_VERSION=""
])
@@ -502,7 +502,20 @@ if test "z$OPENSSL_FOUND" = "zyes" -a "z
if test "z$OPENSSL_VERSION" = "z" ; then
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
- #if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ #if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
+ yes
+ #endif
+ ],[
+ OPENSSL_VERSION="1.1.0 (libressl >= 2.7)"
+ ],[
+ OPENSSL_VERSION=""
+ ])
+ fi
+
+ if test "z$OPENSSL_VERSION" = "z" ; then
+ AC_EGREP_CPP(yes,[
+ #include <openssl/opensslv.h>
+ #if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
yes
#endif
],[