diff --git a/Makefile b/Makefile index 8d5df7ea1e..0286bb58b8 100644 --- a/Makefile +++ b/Makefile @@ -1063,14 +1063,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 14012fad72..8bc0677159 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])