Skip to content

Commit 715e0e1

Browse files
kusmadscho
authored andcommitted
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 <[email protected]>
1 parent 1ead675 commit 715e0e1

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,14 +1052,11 @@ else
10521052
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
10531053
PROGRAM_OBJS += http-fetch.o
10541054
PROGRAMS += $(REMOTE_CURL_NAMES)
1055-
curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
1056-
ifeq "$(curl_check)" "070908"
1055+
ifndef NO_CURL_MULTI
10571056
ifndef NO_EXPAT
10581057
PROGRAM_OBJS += http-push.o
10591058
endif
1060-
endif
1061-
curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
1062-
ifeq "$(curl_check)" "072200"
1059+
# Assume that cURL is new enough
10631060
USE_CURL_FOR_IMAP_SEND = YesPlease
10641061
endif
10651062
ifdef USE_CURL_FOR_IMAP_SEND

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,17 @@ AC_CHECK_LIB([curl], [curl_global_init],
521521
[NO_CURL=],
522522
[NO_CURL=YesPlease])
523523

524+
if test -z "$NO_CURL"; then
525+
526+
AC_CHECK_DECLS([curl_multi_init],
527+
[NO_CURL_MULTI=],
528+
[NO_CURL_MULTI=UnfortunatelyYes],
529+
[[#include <curl/curl.h>]])
530+
531+
GIT_CONF_SUBST([NO_CURL_MULTI])
532+
533+
fi
534+
524535
GIT_UNSTASH_FLAGS($CURLDIR)
525536

526537
GIT_CONF_SUBST([NO_CURL])

0 commit comments

Comments
 (0)