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

Commit 1f948db

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 9469666 commit 1f948db

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
@@ -1130,13 +1130,11 @@ else
11301130
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
11311131
PROGRAM_OBJS += http-fetch.o
11321132
PROGRAMS += $(REMOTE_CURL_NAMES)
1133-
curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
1134-
ifeq "$(curl_check)" "070908"
1135-
ifndef NO_EXPAT
1133+
ifndef NO_EXPAT
1134+
ifndef NO_CURL_MULTI
11361135
PROGRAM_OBJS += http-push.o
11371136
endif
1138-
endif
1139-
ifndef NO_EXPAT
1137+
11401138
ifdef EXPATDIR
11411139
BASIC_CFLAGS += -I$(EXPATDIR)/include
11421140
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)