-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathasio_wolfssl_autoconf.diff
More file actions
62 lines (55 loc) · 1.52 KB
/
asio_wolfssl_autoconf.diff
File metadata and controls
62 lines (55 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From 83e72e0135e7a0cf6b35cfbb53416f21efe8f7da Mon Sep 17 00:00:00 2001
From: David Garske <david@wolfssl.com>
Date: Thu, 16 Sep 2021 15:44:56 -0700
Subject: [PATCH] Fix to add wolfSSL configure support in ASIO (`./configure
--with-wolfssl=DIR`). Fixes #574
---
asio/configure.ac | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/asio/configure.ac b/asio/configure.ac
index 341c277b2..f9380b295 100644
--- a/asio/configure.ac
+++ b/asio/configure.ac
@@ -50,6 +50,25 @@ if test "$STANDALONE" != yes; then
],[])
fi
+# wolfSSL support
+AC_ARG_WITH(wolfssl,
+ AC_HELP_STRING([--with-wolfssl=DIR],[location of wolfssl]),
+[
+ CPPFLAGS="$CPPFLAGS -I${withval}/include/wolfssl -DASIO_USE_WOLFSSL"
+ LIBS="$LIBS -L${withval}/lib"
+],
+[
+ WOLFSSL_USE=no
+])
+
+if test x$WOLFSSL_USE != xno; then
+ AC_CHECK_HEADER([wolfssl/options.h],,
+ [
+ WOLFSSL_FOUND=no
+ ],[])
+fi
+
+# openssl support
AC_ARG_WITH(openssl,
AC_HELP_STRING([--with-openssl=DIR],[location of openssl]),
[
@@ -62,11 +81,15 @@ AC_CHECK_HEADER([openssl/ssl.h],,
OPENSSL_FOUND=no
],[])
-if test x$OPENSSL_FOUND != xno; then
- LIBS="$LIBS -lssl -lcrypto"
+if test x$WOLFSSL_FOUND != xno; then
+ LIBS="$LIBS -lwolfssl"
+else
+ if test x$OPENSSL_FOUND != xno; then
+ LIBS="$LIBS -lssl -lcrypto"
+ fi
fi
-AM_CONDITIONAL(HAVE_OPENSSL,test x$OPENSSL_FOUND != xno)
+AM_CONDITIONAL(HAVE_OPENSSL,test x$OPENSSL_FOUND != xno || x$WOLFSSL_FOUND != xno)
WINDOWS=no
case $host in
--
2.39.5 (Apple Git-154)