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

Commit 83227c1

Browse files
committed
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 c132ea9 commit 83227c1

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
@@ -1133,13 +1133,11 @@ else
11331133
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
11341134
PROGRAM_OBJS += http-fetch.o
11351135
PROGRAMS += $(REMOTE_CURL_NAMES)
1136-
curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
1137-
ifeq "$(curl_check)" "070908"
1138-
ifndef NO_EXPAT
1136+
ifndef NO_EXPAT
1137+
ifndef NO_CURL_MULTI
11391138
PROGRAM_OBJS += http-push.o
11401139
endif
1141-
endif
1142-
ifndef NO_EXPAT
1140+
11431141
ifdef EXPATDIR
11441142
BASIC_CFLAGS += -I$(EXPATDIR)/include
11451143
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)