summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2021-10-25 19:10:55 +0000
committerViktor Szakats <commit@vsz.me>2021-10-25 19:10:55 +0000
commit13bbf81c59fd2c5c9ba552ced4eec8dbcf7028d9 (patch)
treebaf24f58158957db1bdce351c1c227a273a3a624 /docs
parent16a6b02df29494df05cc4de003c5c94d14c37688 (diff)
downloadcurl-13bbf81c59fd2c5c9ba552ced4eec8dbcf7028d9.tar.gz
Makefile.m32: fix to not require OpenSSL with -libssh2 or -rtmp options
Previously, -libssh2/-rtmp options assumed that OpenSSL is also enabled (and then failed with an error when not finding expected OpenSSL headers), but this isn't necessarly true, e.g. when building both libssh2 and curl against Schannel. This patch makes sure to only enable the OpenSSL backend with -libssh2/-rtmp, when there was no SSL option explicitly selected. - Re-implement the logic as a single block of script. - Also fix an indentation while there. Assisted-by: Jay Satiro Closes #7895
Diffstat (limited to 'docs')
-rw-r--r--docs/examples/Makefile.m3211
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32
index 45ec8679c..c27b35f83 100644
--- a/docs/examples/Makefile.m32
+++ b/docs/examples/Makefile.m32
@@ -178,12 +178,10 @@ ARES = 1
endif
ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
RTMP = 1
-SSL = 1
ZLIB = 1
endif
ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
SSH2 = 1
-SSL = 1
ZLIB = 1
endif
ifeq ($(findstring -ssl,$(CFG)),-ssl)
@@ -230,6 +228,13 @@ ifeq ($(findstring -ngtcp2,$(CFG)),-ngtcp2)
NGTCP2 = 1
endif
+# SSH2 and RTMP require an SSL library; assume OpenSSL if none specified
+ifneq ($(SSH2)$(RTMP),)
+ ifeq ($(SSL)$(WINSSL),)
+ SSL = 1
+ endif
+endif
+
INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
ifdef DYN
@@ -284,7 +289,7 @@ ifdef SSL
endif
endif
ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h"
- $(error Invalid path to OpenSSL package: $(OPENSSL_PATH))
+ $(error Invalid path to OpenSSL package: $(OPENSSL_PATH))
endif
ifndef OPENSSL_LIBPATH
OPENSSL_LIBS = -lssl -lcrypto