Browse code

autoconf: Fix engine checks for openssl 1.1

In openssl 1.1, ENGINE_cleanup became a #define instead of a function
(because it's no longer needed as engines are self cleaning). Update
the autoconf.ac script to check for ENGINE_cleanup as a declaration to
avoid falsely undefinig HAVE_OPENSSL_ENGINE in openssl 1.1+

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <1509291288.3116.14.camel@HansenPartnership.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15676.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

James Bottomley authored on 2017/10/30 00:34:48
Showing 1 changed files
... ...
@@ -899,6 +899,13 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then
899 899
 		,
900 900
 		[have_openssl_engine="no"; break]
901 901
 	)
902
+	if test "${have_openssl_engine}" = "no"; then
903
+		AC_CHECK_DECL( [ENGINE_cleanup], [have_openssl_engine="yes"],,
904
+			[[
905
+				#include <openssl/engine.h>
906
+			]]
907
+		)
908
+	fi
902 909
 	if test "${have_openssl_engine}" = "yes"; then
903 910
 		AC_DEFINE([HAVE_OPENSSL_ENGINE], [1], [OpenSSL engine support available])
904 911
 	fi