From 812d9ee5bb5b1592932d8986aa39cc7d0b477603 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 28 Apr 2014 18:29:05 +0200 Subject: [PATCH] Makefile: do not depend on curl-config 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 --- Makefile | 7 ++----- configure.ac | 11 +++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 20058f1de7..4edaaac6d4 100644 --- a/Makefile +++ b/Makefile @@ -1035,14 +1035,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 | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p) - ifeq "$(curl_check)" "070908" + ifndef NO_CURL_MULTI ifndef NO_EXPAT PROGRAM_OBJS += http-push.o endif - endif - curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p) - ifeq "$(curl_check)" "072200" + # Assume that cURL is new enough USE_CURL_FOR_IMAP_SEND = YesPlease endif ifdef USE_CURL_FOR_IMAP_SEND diff --git a/configure.ac b/configure.ac index 55e5a9b3e6..f98b1e20e3 100644 --- a/configure.ac +++ b/configure.ac @@ -521,6 +521,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 ]]) + +GIT_CONF_SUBST([NO_CURL_MULTI]) + +fi + GIT_UNSTASH_FLAGS($CURLDIR) GIT_CONF_SUBST([NO_CURL])