diff mbox series

[v2,3/3] configure: respect --without-openssl flag

Message ID 9ed6b6cd49bc4cbef8fda3d9a7e08d77d8203740.1584589859.git.congdanhqx@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] configure: respect --without-curl flag | expand

Commit Message

Đoàn Trần Công Danh March 19, 2020, 3:58 a.m. UTC
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 configure.ac | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 896996e177..807bb8bc5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -542,11 +542,18 @@  AC_MSG_NOTICE([CHECKS for libraries])
 
 GIT_STASH_FLAGS($OPENSSLDIR)
 
+if test -z "$NO_OPENSSL"; then
 AC_CHECK_LIB([crypto], [SHA1_Init],
 [NEEDS_SSL_WITH_CRYPTO=],
 [AC_CHECK_LIB([ssl], [SHA1_Init],
  [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],
  [NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])])
+else
+	# Fallback to DC SHA1
+	NEEDS_SSL_WITH_CRYPTO=
+	DC_SHA1=YesPlease
+	GIT_CONF_SUBST([DC_SHA1])
+fi
 
 GIT_UNSTASH_FLAGS($OPENSSLDIR)