From: Nick Hengeveld Date: Sat, 19 Nov 2005 01:08:36 +0000 (-0800) Subject: Decide whether to build http-push in the Makefile X-Git-Tag: v0.99.9k^2~61 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0890098780f295f2a58658d1f6b6627e40426c72;p=git.git Decide whether to build http-push in the Makefile The decision about whether to build http-push or not belongs in the Makefile. This follows Junio's suggestion to determine whether curl is new enough to support http-push. Signed-off-by: Nick Hengeveld Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index 285b3ed1..0efb0b65 100644 --- a/Makefile +++ b/Makefile @@ -242,9 +242,12 @@ ifndef NO_CURL CURL_LIBCURL = -lcurl endif PROGRAMS += git-http-fetch$X - ifndef NO_EXPAT - EXPAT_LIBEXPAT = -lexpat - PROGRAMS += git-http-push$X + curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p) + ifeq "$(curl_check)" "070908" + ifndef NO_EXPAT + EXPAT_LIBEXPAT = -lexpat + PROGRAMS += git-http-push$X + endif endif endif diff --git a/http-push.c b/http-push.c index f3c92c97..76c78867 100644 --- a/http-push.c +++ b/http-push.c @@ -6,8 +6,6 @@ #include "blob.h" #include "http.h" -#ifdef USE_CURL_MULTI - #include static const char http_push_usage[] = @@ -1426,10 +1424,3 @@ int main(int argc, char **argv) return rc; } -#else /* ifdef USE_CURL_MULTI */ -int main(int argc, char **argv) -{ - fprintf(stderr, "http-push requires curl 7.9.8 or higher.\n"); - return 1; -} -#endif