|
59 | 59 | # Define CURL_CONFIG to curl's configuration program that prints information |
60 | 60 | # about the library (e.g., its version number). The default is 'curl-config'. |
61 | 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 | +# |
62 | 69 | # Define NO_EXPAT if you do not have expat installed. git-http-push is |
63 | 70 | # not built, and you cannot push using http:// and https:// transports (dumb). |
64 | 71 | # |
@@ -183,10 +190,6 @@ all:: |
183 | 190 | # |
184 | 191 | # Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin). |
185 | 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 | | -# |
190 | 193 | # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin). |
191 | 194 | # |
192 | 195 | # Define NEEDS_LIBINTL_BEFORE_LIBICONV if you need libintl before libiconv. |
@@ -1309,20 +1312,17 @@ else |
1309 | 1312 | ifdef CURLDIR |
1310 | 1313 | # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case. |
1311 | 1314 | BASIC_CFLAGS += -I$(CURLDIR)/include |
1312 | | - CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl |
| 1315 | + CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) |
1313 | 1316 | else |
1314 | | - CURL_LIBCURL = -lcurl |
1315 | | - endif |
1316 | | - ifdef NEEDS_SSL_WITH_CURL |
1317 | | - CURL_LIBCURL += -lssl |
1318 | | - ifdef NEEDS_CRYPTO_WITH_SSL |
1319 | | - CURL_LIBCURL += -lcrypto |
1320 | | - endif |
1321 | | - endif |
1322 | | - ifdef NEEDS_IDN_WITH_CURL |
1323 | | - CURL_LIBCURL += -lidn |
| 1317 | + CURL_LIBCURL = |
1324 | 1318 | endif |
1325 | 1319 |
|
| 1320 | +ifdef CURL_LDFLAGS |
| 1321 | + CURL_LIBCURL += $(CURL_LDFLAGS) |
| 1322 | +else |
| 1323 | + CURL_LIBCURL += $(shell $(CURL_CONFIG) --libs) |
| 1324 | +endif |
| 1325 | + |
1326 | 1326 | REMOTE_CURL_PRIMARY = git-remote-http$X |
1327 | 1327 | REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X |
1328 | 1328 | REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) |
|
0 commit comments