{"thread":{"id":"53016","subject":"[PATCH 0/3] configure: respect --without-<package> flags","startedAt":"2020-03-18T07:36:43Z","lastAt":"2020-03-27T18:29:48Z","messageCount":14,"participants":["Đoàn Trần Công Danh","brian m. carlson","Danh Doan","Eric Sunshine","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"393381","messageId":"cover.1584516715.git.congdanhqx@gmail.com","threadId":"53016","inReplyTo":null,"subject":"[PATCH 0/3] configure: respect --without-<package> flags","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-18T07:36:17Z","receivedAt":"2020-03-18T07:36:43Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Current git's configure script allow --without-<package>,\nit rightfully set NO_<PACKAGE> in the beginning of the configure script,\nbut overwrite them with autodetect later.\n\nRespect them now.\n\nP/S: I'm not sure about the change to NO_OPENSSL\n\nĐoàn Trần Công Danh (3):\n  configure: respect --without-curl flags\n  configure: respect --without-expat\n  configure: respect --without-openssl\n\n configure.ac | 25 ++++++++++++++++++++-----\n 1 file changed, 20 insertions(+), 5 deletions(-)\n\n-- \n2.26.0.rc2.234.g969ad452ca\n\n"},{"id":"393382","messageId":"c1c007190683d7ab49e854a66a4832b5ace72b51.1584516715.git.congdanhqx@gmail.com","threadId":"53016","inReplyTo":"cover.1584516715.git.congdanhqx@gmail.com","subject":"[PATCH 1/3] configure: respect --without-curl flags","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-18T07:38:00Z","receivedAt":"2020-03-18T07:38:15Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n configure.ac | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 66aedb9288..f4742878c0 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -592,6 +592,9 @@ fi\n # git-http-push are not built, and you cannot use http:// and https://\n # transports.\n \n+# Respect --without-curl\n+if test \"x$NO_CURL\" != \"xYesPlease\"; then\n+\n GIT_STASH_FLAGS($CURLDIR)\n \n AC_CHECK_LIB([curl], [curl_global_init],\n@@ -600,8 +603,6 @@ AC_CHECK_LIB([curl], [curl_global_init],\n \n GIT_UNSTASH_FLAGS($CURLDIR)\n \n-GIT_CONF_SUBST([NO_CURL])\n-\n if test -z \"$NO_CURL\"; then\n \n AC_CHECK_PROG([CURL_CONFIG], [curl-config],\n@@ -622,6 +623,9 @@ fi\n \n fi\n \n+fi\n+\n+GIT_CONF_SUBST([NO_CURL])\n \n #\n # Define NO_EXPAT if you do not have expat installed.  git-http-push is\n-- \n2.26.0.rc2.234.g969ad452ca\n\n"},{"id":"393383","messageId":"bd80a1480e5bbed641599be91e54110e00ed1500.1584516715.git.congdanhqx@gmail.com","threadId":"53016","inReplyTo":"cover.1584516715.git.congdanhqx@gmail.com","subject":"[PATCH 2/3] configure: respect --without-expat","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-18T07:38:01Z","receivedAt":"2020-03-18T07:38:19Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n configure.ac | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex f4742878c0..7468eb6bc8 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -631,6 +631,9 @@ GIT_CONF_SUBST([NO_CURL])\n # Define NO_EXPAT if you do not have expat installed.  git-http-push is\n # not built, and you cannot push using http:// and https:// transports.\n \n+# Respect --without-expat\n+if test \"x$NO_EXPAT\" != xYesPlease; then\n+\n GIT_STASH_FLAGS($EXPATDIR)\n \n AC_CHECK_LIB([expat], [XML_ParserCreate],\n@@ -639,6 +642,8 @@ AC_CHECK_LIB([expat], [XML_ParserCreate],\n \n GIT_UNSTASH_FLAGS($EXPATDIR)\n \n+fi\n+\n GIT_CONF_SUBST([NO_EXPAT])\n \n #\n-- \n2.26.0.rc2.234.g969ad452ca\n\n"},{"id":"393384","messageId":"c08bf880c77b7c43256a275e1102308a829d0ee8.1584516715.git.congdanhqx@gmail.com","threadId":"53016","inReplyTo":"cover.1584516715.git.congdanhqx@gmail.com","subject":"[PATCH 3/3] configure: respect --without-openssl","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-18T07:38:02Z","receivedAt":"2020-03-18T07:38:23Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n configure.ac | 12 +++++++++---\n 1 file changed, 9 insertions(+), 3 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 7468eb6bc8..20a11e1f32 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -544,9 +544,15 @@ GIT_STASH_FLAGS($OPENSSLDIR)\n \n AC_CHECK_LIB([crypto], [SHA1_Init],\n [NEEDS_SSL_WITH_CRYPTO=],\n-[AC_CHECK_LIB([ssl], [SHA1_Init],\n- [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n- [NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])])\n+[\n+if \"x$NO_OPENSSL\" = xYesPlease; then\n+\tAC_MSG_ERROR([Disabled OpenSSL is required for SHA1])\n+else\n+\tAC_CHECK_LIB([ssl], [SHA1_Init],\n+\t[NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n+\t[NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])\n+fi\n+])\n \n GIT_UNSTASH_FLAGS($OPENSSLDIR)\n \n-- \n2.26.0.rc2.234.g969ad452ca\n\n"},{"id":"393391","messageId":"20200318112213.GB366567@camp.crustytoothpaste.net","threadId":"53016","inReplyTo":"c08bf880c77b7c43256a275e1102308a829d0ee8.1584516715.git.congdanhqx@gmail.com","subject":"Re: [PATCH 3/3] configure: respect --without-openssl","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-03-18T11:22:13Z","receivedAt":"2020-03-18T11:22:22Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2020-03-18 at 07:38:02, Đoàn Trần Công Danh wrote:\n> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> ---\n>  configure.ac | 12 +++++++++---\n>  1 file changed, 9 insertions(+), 3 deletions(-)\n> \n> diff --git a/configure.ac b/configure.ac\n> index 7468eb6bc8..20a11e1f32 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -544,9 +544,15 @@ GIT_STASH_FLAGS($OPENSSLDIR)\n>  \n>  AC_CHECK_LIB([crypto], [SHA1_Init],\n>  [NEEDS_SSL_WITH_CRYPTO=],\n> -[AC_CHECK_LIB([ssl], [SHA1_Init],\n> - [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n> - [NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])])\n> +[\n> +if \"x$NO_OPENSSL\" = xYesPlease; then\n> +\tAC_MSG_ERROR([Disabled OpenSSL is required for SHA1])\n\nI don't see this in the original.  Wouldn't we want to fall back to the\ndefault in this case, which would be SHA1DC?\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"393392","messageId":"20200318113439.GA29808@danh.dev","threadId":"53016","inReplyTo":"20200318112213.GB366567@camp.crustytoothpaste.net","subject":"Re: [PATCH 3/3] configure: respect --without-openssl","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-18T11:34:39Z","receivedAt":"2020-03-18T11:34:44Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-03-18 11:22:13+0000, \"brian m. carlson\" <sandals@crustytoothpaste.net> wrote:\n> On 2020-03-18 at 07:38:02, Đoàn Trần Công Danh wrote:\n> > Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> > ---\n> >  configure.ac | 12 +++++++++---\n> >  1 file changed, 9 insertions(+), 3 deletions(-)\n> > \n> > diff --git a/configure.ac b/configure.ac\n> > index 7468eb6bc8..20a11e1f32 100644\n> > --- a/configure.ac\n> > +++ b/configure.ac\n> > @@ -544,9 +544,15 @@ GIT_STASH_FLAGS($OPENSSLDIR)\n> >  \n> >  AC_CHECK_LIB([crypto], [SHA1_Init],\n> >  [NEEDS_SSL_WITH_CRYPTO=],\n> > -[AC_CHECK_LIB([ssl], [SHA1_Init],\n> > - [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n> > - [NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])])\n> > +[\n> > +if \"x$NO_OPENSSL\" = xYesPlease; then\n> > +\tAC_MSG_ERROR([Disabled OpenSSL is required for SHA1])\n> \n> I don't see this in the original.  Wouldn't we want to fall back to the\n> default in this case, which would be SHA1DC?\n\nThis block of code will be run into in macOS only.\n\nReally, I wasn't sure what should be done in this case (I mentioned in\nthe cover letter).\n\nShould we set:\n\n\tNEEDS_SSL_WITH_CRYPTO=\n\tNO_OPENSSL=YesPlease\n\nin this case instead?\n\n-- \nDanh\n"},{"id":"393399","messageId":"CAPig+cSqu7-2eTj9S4nMn+MUmXye92idH=XYiDEewpyf4zhpJA@mail.gmail.com","threadId":"53016","inReplyTo":"c1c007190683d7ab49e854a66a4832b5ace72b51.1584516715.git.congdanhqx@gmail.com","subject":"Re: [PATCH 1/3] configure: respect --without-curl flags","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-03-18T15:51:34Z","receivedAt":"2020-03-18T15:51:51Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Mar 18, 2020 at 3:38 AM Đoàn Trần Công Danh\n<congdanhqx@gmail.com> wrote:\n> diff --git a/configure.ac b/configure.ac\n> @@ -592,6 +592,9 @@ fi\n>  # Define NO_CURL if you do not have libcurl installed.  git-http-pull and\n>  # git-http-push are not built, and you cannot use http:// and https://\n>  # transports.\n>\n> +# Respect --without-curl\n> +if test \"x$NO_CURL\" != \"xYesPlease\"; then\n> ...\n>  if test -z \"$NO_CURL\"; then\n\nI realize that GIT_PARSE_WITH() will either clear NO_CURL or set it to\nliteral \"YesPlease\", but the comment(s) in this file describing\nNO_CURL say only to _define_ it to build without curl support. So, I'm\nwondering if it would make more sense to take a looser view about the\nvalue of NO_CURL. The existing check of NO_CURL doesn't bother looking\nfor a specific value, but instead just tests whether it has a value or\nnot. Perhaps the new check can be modeled after that one.\n\nAlso, I think you can reduce the scope of this change quite a bit by\nmerely wrapping the AC_CHECK_LIB() invocation. So, either:\n\n    ...\n    if test -z \"$NO_CURL\"; then\n    GIT_STASH_FLAGS($CURLDIR)\n\n    AC_CHECK_LIB([curl], [curl_global_init],\n    [NO_CURL=],\n    [NO_CURL=YesPlease])\n\n    GIT_UNSTASH_FLAGS($CURLDIR)\n    fi\n\n    GIT_CONF_SUBST([NO_CURL])\n    ...\n\nor even:\n\n    ...\n    if test -z \"$NO_CURL\"; then\n    AC_CHECK_LIB([curl], [curl_global_init],\n    [NO_CURL=],\n    [NO_CURL=YesPlease])\n    fi\n    ...\n\nSame comments applies to the other patches, as well.\n"},{"id":"393433","messageId":"20200319031940.GD29808@danh.dev","threadId":"53016","inReplyTo":"CAPig+cSqu7-2eTj9S4nMn+MUmXye92idH=XYiDEewpyf4zhpJA@mail.gmail.com","subject":"Re: [PATCH 1/3] configure: respect --without-curl flags","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-19T03:19:40Z","receivedAt":"2020-03-19T03:19:49Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-03-18 11:51:34-0400, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> On Wed, Mar 18, 2020 at 3:38 AM Đoàn Trần Công Danh\n> <congdanhqx@gmail.com> wrote:\n> > diff --git a/configure.ac b/configure.ac\n> > @@ -592,6 +592,9 @@ fi\n> >  # Define NO_CURL if you do not have libcurl installed.  git-http-pull and\n> >  # git-http-push are not built, and you cannot use http:// and https://\n> >  # transports.\n> >\n> > +# Respect --without-curl\n> > +if test \"x$NO_CURL\" != \"xYesPlease\"; then\n> > ...\n> >  if test -z \"$NO_CURL\"; then\n> \n> I realize that GIT_PARSE_WITH() will either clear NO_CURL or set it to\n> literal \"YesPlease\", but the comment(s) in this file describing\n> NO_CURL say only to _define_ it to build without curl support. So, I'm\n> wondering if it would make more sense to take a looser view about the\n> value of NO_CURL. The existing check of NO_CURL doesn't bother looking\n> for a specific value, but instead just tests whether it has a value or\n> not. Perhaps the new check can be modeled after that one.\n> \n> Also, I think you can reduce the scope of this change quite a bit by\n> merely wrapping the AC_CHECK_LIB() invocation. So, either:\n> \n>     ...\n>     if test -z \"$NO_CURL\"; then\n>     GIT_STASH_FLAGS($CURLDIR)\n> \n>     AC_CHECK_LIB([curl], [curl_global_init],\n>     [NO_CURL=],\n>     [NO_CURL=YesPlease])\n> \n>     GIT_UNSTASH_FLAGS($CURLDIR)\n>     fi\n> \n>     GIT_CONF_SUBST([NO_CURL])\n>     ...\n> \n> or even:\n> \n>     ...\n>     if test -z \"$NO_CURL\"; then\n>     AC_CHECK_LIB([curl], [curl_global_init],\n>     [NO_CURL=],\n>     [NO_CURL=YesPlease])\n>     fi\n>     ...\n> \n> Same comments applies to the other patches, as well.\n\nI've re-checked the configure.ac code.\n\nWe've already use:\n\n\ttest -z \"$NO_ICONV\"\n\nI think rewrite like your suggestion would be better choice, and\nit'll be consistence with the current code.\n\nI'll send a reroll after checking what should be done with NO_OPENSSL.\n\n-- \nDanh\n"},{"id":"393434","messageId":"cover.1584589859.git.congdanhqx@gmail.com","threadId":"53016","inReplyTo":"cover.1584516715.git.congdanhqx@gmail.com","subject":"[PATCH v2 0/3] configure: respect --without-<package> flags","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-19T03:58:54Z","receivedAt":"2020-03-19T03:59:09Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Current git's configure script allow --without-<package>,\nit rightfully set NO_<PACKAGE> in the beginning of the configure script,\nbut overwrite them with autodetect later.\n\nRespect them now.\n\nChange from v1:\n- Simply check if NO_<PACKAGE> is empty or not instead of explicitly\n  check for YesPlease\n- --without-openssl will ignore libcrypto all-together and fallback\n  into DC_SHA1\n\nĐoàn Trần Công Danh (3):\n  configure: respect --without-curl flag\n  configure: respect --without-expat flag\n  configure: respect --without-openssl flag\n\n configure.ac | 13 +++++++++++++\n 1 file changed, 13 insertions(+)\n\nInterdiff against v1:\ndiff --git a/configure.ac b/configure.ac\nindex 20a11e1f32..807bb8bc5a 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -542,17 +542,18 @@ AC_MSG_NOTICE([CHECKS for libraries])\n \n GIT_STASH_FLAGS($OPENSSLDIR)\n \n+if test -z \"$NO_OPENSSL\"; then\n AC_CHECK_LIB([crypto], [SHA1_Init],\n [NEEDS_SSL_WITH_CRYPTO=],\n-[\n-if \"x$NO_OPENSSL\" = xYesPlease; then\n-\tAC_MSG_ERROR([Disabled OpenSSL is required for SHA1])\n+[AC_CHECK_LIB([ssl], [SHA1_Init],\n+ [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n+ [NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])])\n else\n-\tAC_CHECK_LIB([ssl], [SHA1_Init],\n-\t[NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n-\t[NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])\n+\t# Fallback to DC SHA1\n+\tNEEDS_SSL_WITH_CRYPTO=\n+\tDC_SHA1=YesPlease\n+\tGIT_CONF_SUBST([DC_SHA1])\n fi\n-])\n \n GIT_UNSTASH_FLAGS($OPENSSLDIR)\n \n@@ -598,17 +599,19 @@ fi\n # git-http-push are not built, and you cannot use http:// and https://\n # transports.\n \n-# Respect --without-curl\n-if test \"x$NO_CURL\" != \"xYesPlease\"; then\n-\n GIT_STASH_FLAGS($CURLDIR)\n \n+# Respect --without-curl\n+if test -z \"$NO_CURL\"; then\n AC_CHECK_LIB([curl], [curl_global_init],\n [NO_CURL=],\n [NO_CURL=YesPlease])\n+fi\n \n GIT_UNSTASH_FLAGS($CURLDIR)\n \n+GIT_CONF_SUBST([NO_CURL])\n+\n if test -z \"$NO_CURL\"; then\n \n AC_CHECK_PROG([CURL_CONFIG], [curl-config],\n@@ -629,27 +632,22 @@ fi\n \n fi\n \n-fi\n-\n-GIT_CONF_SUBST([NO_CURL])\n \n #\n # Define NO_EXPAT if you do not have expat installed.  git-http-push is\n # not built, and you cannot push using http:// and https:// transports.\n \n-# Respect --without-expat\n-if test \"x$NO_EXPAT\" != xYesPlease; then\n-\n GIT_STASH_FLAGS($EXPATDIR)\n \n+# Respect --without-expat\n+if test -z \"$NO_EXPAT\"; then\n AC_CHECK_LIB([expat], [XML_ParserCreate],\n [NO_EXPAT=],\n [NO_EXPAT=YesPlease])\n+fi\n \n GIT_UNSTASH_FLAGS($EXPATDIR)\n \n-fi\n-\n GIT_CONF_SUBST([NO_EXPAT])\n \n #\n-- \n2.26.0.rc2.234.g969ad452ca\n\n"},{"id":"393436","messageId":"e55a1258d5b42c9e761116d02e3bf365e5ee9b4a.1584589859.git.congdanhqx@gmail.com","threadId":"53016","inReplyTo":"cover.1584589859.git.congdanhqx@gmail.com","subject":"[PATCH v2 1/3] configure: respect --without-curl flag","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-19T03:58:55Z","receivedAt":"2020-03-19T03:59:09Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n configure.ac | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 66aedb9288..5a73a592e1 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -594,9 +594,12 @@ fi\n \n GIT_STASH_FLAGS($CURLDIR)\n \n+# Respect --without-curl\n+if test -z \"$NO_CURL\"; then\n AC_CHECK_LIB([curl], [curl_global_init],\n [NO_CURL=],\n [NO_CURL=YesPlease])\n+fi\n \n GIT_UNSTASH_FLAGS($CURLDIR)\n \n-- \n2.26.0.rc2.234.g969ad452ca\n\n"},{"id":"393435","messageId":"0dc2f0a7c56eb36479bf8793d7562490dec8ba0d.1584589859.git.congdanhqx@gmail.com","threadId":"53016","inReplyTo":"cover.1584589859.git.congdanhqx@gmail.com","subject":"[PATCH v2 2/3] configure: respect --without-expat flag","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-19T03:58:56Z","receivedAt":"2020-03-19T03:59:11Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n configure.ac | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 5a73a592e1..896996e177 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -632,9 +632,12 @@ fi\n \n GIT_STASH_FLAGS($EXPATDIR)\n \n+# Respect --without-expat\n+if test -z \"$NO_EXPAT\"; then\n AC_CHECK_LIB([expat], [XML_ParserCreate],\n [NO_EXPAT=],\n [NO_EXPAT=YesPlease])\n+fi\n \n GIT_UNSTASH_FLAGS($EXPATDIR)\n \n-- \n2.26.0.rc2.234.g969ad452ca\n\n"},{"id":"393437","messageId":"9ed6b6cd49bc4cbef8fda3d9a7e08d77d8203740.1584589859.git.congdanhqx@gmail.com","threadId":"53016","inReplyTo":"cover.1584589859.git.congdanhqx@gmail.com","subject":"[PATCH v2 3/3] configure: respect --without-openssl flag","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-19T03:58:57Z","receivedAt":"2020-03-19T03:59:13Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n configure.ac | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 896996e177..807bb8bc5a 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -542,11 +542,18 @@ AC_MSG_NOTICE([CHECKS for libraries])\n \n GIT_STASH_FLAGS($OPENSSLDIR)\n \n+if test -z \"$NO_OPENSSL\"; then\n AC_CHECK_LIB([crypto], [SHA1_Init],\n [NEEDS_SSL_WITH_CRYPTO=],\n [AC_CHECK_LIB([ssl], [SHA1_Init],\n  [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n  [NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])])\n+else\n+\t# Fallback to DC SHA1\n+\tNEEDS_SSL_WITH_CRYPTO=\n+\tDC_SHA1=YesPlease\n+\tGIT_CONF_SUBST([DC_SHA1])\n+fi\n \n GIT_UNSTASH_FLAGS($OPENSSLDIR)\n \n-- \n2.26.0.rc2.234.g969ad452ca\n\n"},{"id":"394085","messageId":"20200326122314.GA19102@danh.dev","threadId":"53016","inReplyTo":"cover.1584589859.git.congdanhqx@gmail.com","subject":"Re: [PATCH v2 0/3] configure: respect --without-<package> flags","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T12:23:14Z","receivedAt":"2020-03-26T12:23:21Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-03-19 10:58:54+0700, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n> Current git's configure script allow --without-<package>,\n> it rightfully set NO_<PACKAGE> in the beginning of the configure script,\n> but overwrite them with autodetect later.\n> \n> Respect them now.\n\nHi Junio,\n\nCan I get your opinion on this serie?\n\nI didn't see it in cooking list.\nI guess it was lost because of 2.26.\n\n> \n> Change from v1:\n> - Simply check if NO_<PACKAGE> is empty or not instead of explicitly\n>   check for YesPlease\n> - --without-openssl will ignore libcrypto all-together and fallback\n>   into DC_SHA1\n> \n> Đoàn Trần Công Danh (3):\n>   configure: respect --without-curl flag\n>   configure: respect --without-expat flag\n>   configure: respect --without-openssl flag\n> \n>  configure.ac | 13 +++++++++++++\n>  1 file changed, 13 insertions(+)\n> \n> Interdiff against v1:\n> diff --git a/configure.ac b/configure.ac\n> index 20a11e1f32..807bb8bc5a 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -542,17 +542,18 @@ AC_MSG_NOTICE([CHECKS for libraries])\n>  \n>  GIT_STASH_FLAGS($OPENSSLDIR)\n>  \n> +if test -z \"$NO_OPENSSL\"; then\n>  AC_CHECK_LIB([crypto], [SHA1_Init],\n>  [NEEDS_SSL_WITH_CRYPTO=],\n> -[\n> -if \"x$NO_OPENSSL\" = xYesPlease; then\n> -\tAC_MSG_ERROR([Disabled OpenSSL is required for SHA1])\n> +[AC_CHECK_LIB([ssl], [SHA1_Init],\n> + [NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n> + [NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])])\n>  else\n> -\tAC_CHECK_LIB([ssl], [SHA1_Init],\n> -\t[NEEDS_SSL_WITH_CRYPTO=YesPlease NO_OPENSSL=],\n> -\t[NEEDS_SSL_WITH_CRYPTO=          NO_OPENSSL=YesPlease])\n> +\t# Fallback to DC SHA1\n> +\tNEEDS_SSL_WITH_CRYPTO=\n> +\tDC_SHA1=YesPlease\n> +\tGIT_CONF_SUBST([DC_SHA1])\n>  fi\n> -])\n>  \n>  GIT_UNSTASH_FLAGS($OPENSSLDIR)\n>  \n> @@ -598,17 +599,19 @@ fi\n>  # git-http-push are not built, and you cannot use http:// and https://\n>  # transports.\n>  \n> -# Respect --without-curl\n> -if test \"x$NO_CURL\" != \"xYesPlease\"; then\n> -\n>  GIT_STASH_FLAGS($CURLDIR)\n>  \n> +# Respect --without-curl\n> +if test -z \"$NO_CURL\"; then\n>  AC_CHECK_LIB([curl], [curl_global_init],\n>  [NO_CURL=],\n>  [NO_CURL=YesPlease])\n> +fi\n>  \n>  GIT_UNSTASH_FLAGS($CURLDIR)\n>  \n> +GIT_CONF_SUBST([NO_CURL])\n> +\n>  if test -z \"$NO_CURL\"; then\n>  \n>  AC_CHECK_PROG([CURL_CONFIG], [curl-config],\n> @@ -629,27 +632,22 @@ fi\n>  \n>  fi\n>  \n> -fi\n> -\n> -GIT_CONF_SUBST([NO_CURL])\n>  \n>  #\n>  # Define NO_EXPAT if you do not have expat installed.  git-http-push is\n>  # not built, and you cannot push using http:// and https:// transports.\n>  \n> -# Respect --without-expat\n> -if test \"x$NO_EXPAT\" != xYesPlease; then\n> -\n>  GIT_STASH_FLAGS($EXPATDIR)\n>  \n> +# Respect --without-expat\n> +if test -z \"$NO_EXPAT\"; then\n>  AC_CHECK_LIB([expat], [XML_ParserCreate],\n>  [NO_EXPAT=],\n>  [NO_EXPAT=YesPlease])\n> +fi\n>  \n>  GIT_UNSTASH_FLAGS($EXPATDIR)\n>  \n> -fi\n> -\n>  GIT_CONF_SUBST([NO_EXPAT])\n>  \n>  #\n> -- \n> 2.26.0.rc2.234.g969ad452ca\n> \n\n-- \nDanh\n"},{"id":"394184","messageId":"xmqqa741hcrs.fsf@gitster.c.googlers.com","threadId":"53016","inReplyTo":"20200326122314.GA19102@danh.dev","subject":"Re: [PATCH v2 0/3] configure: respect --without-<package> flags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-27T18:29:43Z","receivedAt":"2020-03-27T18:29:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Danh Doan <congdanhqx@gmail.com> writes:\n\n> On 2020-03-19 10:58:54+0700, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n>> Current git's configure script allow --without-<package>,\n>> it rightfully set NO_<PACKAGE> in the beginning of the configure script,\n>> but overwrite them with autodetect later.\n>> \n>> Respect them now.\n>\n> Hi Junio,\n>\n> Can I get your opinion on this serie?\n\nI do not have opinion on everything ;-)  If you sent it during the\npre-release freeze, it is very possible that I totally ignored it,\nespecially if nobody showed interest in the topic.\n\nNot limited to this topic, but I'd prefer to see leftover topics\nreappear after the tip of 'next' gets rewind.\n\nThanks.\n\n"}]}