Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 93671b0

Browse files
kusmakasal
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 ec765f6 commit 93671b0

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,13 +1139,11 @@ else
11391139
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
11401140
PROGRAM_OBJS += http-fetch.o
11411141
PROGRAMS += $(REMOTE_CURL_NAMES)
1142-
curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
1143-
ifeq "$(curl_check)" "070908"
1144-
ifndef NO_EXPAT
1142+
ifndef NO_EXPAT
1143+
ifndef NO_CURL_MULTI
11451144
PROGRAM_OBJS += http-push.o
11461145
endif
1147-
endif
1148-
ifndef NO_EXPAT
1146+
11491147
ifdef EXPATDIR
11501148
BASIC_CFLAGS += -I$(EXPATDIR)/include
11511149
EXPAT_LIBEXPAT = -L$(EXPATDIR)/$(lib) $(CC_LD_DYNPATH)$(EXPATDIR)/$(lib) -lexpat

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,17 @@ AC_CHECK_LIB([curl], [curl_global_init],
513513
[NO_CURL=],
514514
[NO_CURL=YesPlease])
515515

516+
if test -z "$NO_CURL"; then
517+
518+
AC_CHECK_DECLS([curl_multi_init],
519+
[NO_CURL_MULTI=],
520+
[NO_CURL_MULTI=UnfortunatelyYes],
521+
[[#include <curl/curl.h>]])
522+
523+
GIT_CONF_SUBST([NO_CURL_MULTI])
524+
525+
fi
526+
516527
GIT_UNSTASH_FLAGS($CURLDIR)
517528

518529
GIT_CONF_SUBST([NO_CURL])

0 commit comments

Comments
 (0)