summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11979b9)
raw | patch | inline | side by side (parent: 11979b9)
author | Nick Hengeveld <nickh@reactrix.com> | |
Sat, 19 Nov 2005 01:08:36 +0000 (17:08 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 20 Nov 2005 04:17:25 +0000 (20:17 -0800) |
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 <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile. This follows Junio's suggestion to determine whether curl
is new enough to support http-push.
Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history | |
http-push.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index 285b3ed16ed41c500890684e8fe4f40741c5a5bf..0efb0b65654de91e2e2308343b4c9d4e58711d88 100644 (file)
--- a/Makefile
+++ b/Makefile
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 f3c92c971e65e9df72fafdab52b4935866a0a794..76c788673e0a02c723d99976d3e605531341c7a9 100644 (file)
--- a/http-push.c
+++ b/http-push.c
#include "blob.h"
#include "http.h"
-#ifdef USE_CURL_MULTI
-
#include <expat.h>
static const char http_push_usage[] =
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