From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: git@vger.kernel.org
Cc: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
sandals@crustytoothpaste.net, sunshine@sunshineco.com
Subject: [PATCH v2 0/3] configure: respect --without-<package> flags
Date: Thu, 19 Mar 2020 10:58:54 +0700 [thread overview]
Message-ID: <cover.1584589859.git.congdanhqx@gmail.com> (raw)
In-Reply-To: <cover.1584516715.git.congdanhqx@gmail.com>
Current git's configure script allow --without-<package>,
it rightfully set NO_<PACKAGE> in the beginning of the configure script,
but overwrite them with autodetect later.
Respect them now.
Change from v1:
- Simply check if NO_<PACKAGE> is empty or not instead of explicitly
check for YesPlease
- --without-openssl will ignore libcrypto all-together and fallback
into DC_SHA1
Đoàn Trần Công Danh (3):
configure: respect --without-curl flag
configure: respect --without-expat flag
configure: respect --without-openssl flag
configure.ac | 13 +++++++++++++
1 file changed, 13 insertions(+)
Interdiff against v1:
diff --git a/configure.ac b/configure.ac
index 20a11e1f32..807bb8bc5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -542,17 +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=],
-[
-if "x$NO_OPENSSL" = xYesPlease; then
- AC_MSG_ERROR([Disabled OpenSSL is required for SHA1])
+[AC_CHECK_LIB([ssl], [SHA1_Init],
+ [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],
+ [NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL=YesPlease])])
else
- AC_CHECK_LIB([ssl], [SHA1_Init],
- [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],
- [NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL=YesPlease])
+ # Fallback to DC SHA1
+ NEEDS_SSL_WITH_CRYPTO=
+ DC_SHA1=YesPlease
+ GIT_CONF_SUBST([DC_SHA1])
fi
-])
GIT_UNSTASH_FLAGS($OPENSSLDIR)
@@ -598,17 +599,19 @@ fi
# git-http-push are not built, and you cannot use http:// and https://
# transports.
-# Respect --without-curl
-if test "x$NO_CURL" != "xYesPlease"; then
-
GIT_STASH_FLAGS($CURLDIR)
+# Respect --without-curl
+if test -z "$NO_CURL"; then
AC_CHECK_LIB([curl], [curl_global_init],
[NO_CURL=],
[NO_CURL=YesPlease])
+fi
GIT_UNSTASH_FLAGS($CURLDIR)
+GIT_CONF_SUBST([NO_CURL])
+
if test -z "$NO_CURL"; then
AC_CHECK_PROG([CURL_CONFIG], [curl-config],
@@ -629,27 +632,22 @@ fi
fi
-fi
-
-GIT_CONF_SUBST([NO_CURL])
#
# Define NO_EXPAT if you do not have expat installed. git-http-push is
# not built, and you cannot push using http:// and https:// transports.
-# Respect --without-expat
-if test "x$NO_EXPAT" != xYesPlease; then
-
GIT_STASH_FLAGS($EXPATDIR)
+# Respect --without-expat
+if test -z "$NO_EXPAT"; then
AC_CHECK_LIB([expat], [XML_ParserCreate],
[NO_EXPAT=],
[NO_EXPAT=YesPlease])
+fi
GIT_UNSTASH_FLAGS($EXPATDIR)
-fi
-
GIT_CONF_SUBST([NO_EXPAT])
#
--
2.26.0.rc2.234.g969ad452ca
next prev parent reply other threads:[~2020-03-19 3:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 7:36 [PATCH 0/3] configure: respect --without-<package> flags Đoàn Trần Công Danh
2020-03-18 7:38 ` [PATCH 1/3] configure: respect --without-curl flags Đoàn Trần Công Danh
2020-03-18 15:51 ` Eric Sunshine
2020-03-19 3:19 ` Danh Doan
2020-03-18 7:38 ` [PATCH 2/3] configure: respect --without-expat Đoàn Trần Công Danh
2020-03-18 7:38 ` [PATCH 3/3] configure: respect --without-openssl Đoàn Trần Công Danh
2020-03-18 11:22 ` brian m. carlson
2020-03-18 11:34 ` Danh Doan
2020-03-19 3:58 ` Đoàn Trần Công Danh [this message]
2020-03-19 3:58 ` [PATCH v2 1/3] configure: respect --without-curl flag Đoàn Trần Công Danh
2020-03-19 3:58 ` [PATCH v2 2/3] configure: respect --without-expat flag Đoàn Trần Công Danh
2020-03-19 3:58 ` [PATCH v2 3/3] configure: respect --without-openssl flag Đoàn Trần Công Danh
2020-03-26 12:23 ` [PATCH v2 0/3] configure: respect --without-<package> flags Danh Doan
2020-03-27 18:29 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1584589859.git.congdanhqx@gmail.com \
--to=congdanhqx@gmail.com \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.