59
# Define CURL_CONFIG to curl's configuration program that prints information
60
# about the library (e.g., its version number). The default is 'curl-config'.
61
#
62
+# Define CURL_LDFLAGS to specify flags that you need to link when using libcurl,
63
+# if you do not want to rely on the libraries provided by CURL_CONFIG. The
64
+# default value is a result of `curl-config --libs`. An example value for
65
+# CURL_LDFLAGS is as follows:
66
+#
67
+# CURL_LDFLAGS=-lcurl
68
+#
69
# Define NO_EXPAT if you do not have expat installed. git-http-push is
70
# not built, and you cannot push using http:// and https:// transports (dumb).
71
#
190
#
191
# Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin).
192
#
186
-# Define NEEDS_SSL_WITH_CURL if you need -lssl with -lcurl (Minix).
187
-#
188
-# Define NEEDS_IDN_WITH_CURL if you need -lidn when using -lcurl (Minix).
189
-#
193
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
194
#
195
# Define NEEDS_LIBINTL_BEFORE_LIBICONV if you need libintl before libiconv.
1310
ifdef CURLDIR
1311
# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
1312
BASIC_CFLAGS += -I$(CURLDIR)/include
1310
- CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl
1313
+ CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib)
1314
else
1312
- CURL_LIBCURL = -lcurl
1313
- endif
1314
- ifdef NEEDS_SSL_WITH_CURL
1315
- CURL_LIBCURL += -lssl
1316
- ifdef NEEDS_CRYPTO_WITH_SSL
1317
- CURL_LIBCURL += -lcrypto
1318
- endif
1319
- endif
1320
- ifdef NEEDS_IDN_WITH_CURL
1321
- CURL_LIBCURL += -lidn
1315
+ CURL_LIBCURL =
1316
endif
1317
1318
+ifdef CURL_LDFLAGS
1319
+ CURL_LIBCURL += $(CURL_LDFLAGS)
1320
+else
1321
+ CURL_LIBCURL += $(shell $(CURL_CONFIG) --libs)
1322
+endif
1323
+
1324
REMOTE_CURL_PRIMARY = git-remote-http$X
1325
REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
1326
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)