git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] Makefile: do not depend on curl-config
@ 2014-04-28 16:29 Erik Faye-Lund
  2014-04-30 13:08 ` Erik Faye-Lund
  2014-04-30 15:27 ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Erik Faye-Lund @ 2014-04-28 16:29 UTC (permalink / raw)
  To: git
  Cc: patthoyts, marat, tuomas.silvola, msysgit, johannes.schindelin,
	Erik Faye-Lund

MinGW builds of cURL does not ship with curl-config unless built
with the autoconf based build system, which is not the practice
recommended by the documentation. MsysGit has had issues with
binaries of that sort, so it has switched away from autoconf-based
cURL-builds.

Unfortunately, broke pushing over WebDAV on Windows, because
http-push.c depends on cURL's multi-threaded API, which we could
not determine the presence of any more.

Since troublesome curl-versions are ancient, and not even present
in RedHat 5, let's just assume cURL is capable instead of doing a
non-robust check.

Instead, add a check for curl_multi_init to our configure-script,
for those on ancient system. They probably already need to do the
configure-dance anyway.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---

OK, here's a proper patch. I've even tested it! ;)


 Makefile     |  8 +++-----
 configure.ac | 11 +++++++++++
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index e90f57e..f6b5847 100644
--- a/Makefile
+++ b/Makefile
@@ -1133,13 +1133,11 @@ else
 	REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
 	PROGRAM_OBJS += http-fetch.o
 	PROGRAMS += $(REMOTE_CURL_NAMES)
-	curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
-	ifeq "$(curl_check)" "070908"
-		ifndef NO_EXPAT
+	ifndef NO_EXPAT
+		ifndef NO_CURL_MULTI
 			PROGRAM_OBJS += http-push.o
 		endif
-	endif
-	ifndef NO_EXPAT
+
 		ifdef EXPATDIR
 			BASIC_CFLAGS += -I$(EXPATDIR)/include
 			EXPAT_LIBEXPAT = -L$(EXPATDIR)/$(lib) $(CC_LD_DYNPATH)$(EXPATDIR)/$(lib) -lexpat
diff --git a/configure.ac b/configure.ac
index 2f43393..e7ef9f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -513,6 +513,17 @@ AC_CHECK_LIB([curl], [curl_global_init],
 [NO_CURL=],
 [NO_CURL=YesPlease])
 
+if test -z "$NO_CURL"; then
+
+AC_CHECK_DECLS([curl_multi_init],
+[NO_CURL_MULTI=],
+[NO_CURL_MULTI=UnfortunatelyYes],
+[[#include <curl/curl.h>]])
+
+GIT_CONF_SUBST([NO_CURL_MULTI])
+
+fi
+
 GIT_UNSTASH_FLAGS($CURLDIR)
 
 GIT_CONF_SUBST([NO_CURL])
-- 
1.9.2.msysgit.2

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-05-06 16:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 16:29 [PATCH/RFC] Makefile: do not depend on curl-config Erik Faye-Lund
2014-04-30 13:08 ` Erik Faye-Lund
2014-04-30 15:27 ` Junio C Hamano
2014-04-30 15:29   ` 'Dave Borowitz' via msysGit
2014-04-30 15:53   ` Erik Faye-Lund
2014-04-30 16:52     ` Johannes Schindelin
2014-04-30 19:46       ` Sebastian Schuberth
2014-05-05 10:53         ` Erik Faye-Lund
2014-05-05 10:56           ` Sebastian Schuberth
2014-05-05 15:03           ` [msysGit] " Thomas Braun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).