Skip to content

Commit 5fd02fc

Browse files
committed
Merge branch 'jk/build-with-right-curl'
The build procedure did not use the libcurl library and its include files correctly for a custom-built installation. * jk/build-with-right-curl: Makefile: avoid running curl-config unnecessarily Makefile: use curl-config --cflags Makefile: avoid running curl-config multiple times
2 parents d61d20c + 0573831 commit 5fd02fc

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,17 +1355,22 @@ ifdef NO_CURL
13551355
else
13561356
ifdef CURLDIR
13571357
# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
1358-
BASIC_CFLAGS += -I$(CURLDIR)/include
1358+
CURL_CFLAGS = -I$(CURLDIR)/include
13591359
CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib)
13601360
else
1361+
CURL_CFLAGS =
13611362
CURL_LIBCURL =
13621363
endif
13631364

1364-
ifdef CURL_LDFLAGS
1365+
ifndef CURL_LDFLAGS
1366+
CURL_LDFLAGS = $(eval CURL_LDFLAGS := $$(shell $$(CURL_CONFIG) --libs))$(CURL_LDFLAGS)
1367+
endif
13651368
CURL_LIBCURL += $(CURL_LDFLAGS)
1366-
else
1367-
CURL_LIBCURL += $(shell $(CURL_CONFIG) --libs)
1368-
endif
1369+
1370+
ifndef CURL_CFLAGS
1371+
CURL_CFLAGS = $(eval CURL_CFLAGS := $$(shell $$(CURL_CONFIG) --cflags))$(CURL_CFLAGS)
1372+
endif
1373+
BASIC_CFLAGS += $(CURL_CFLAGS)
13691374

13701375
REMOTE_CURL_PRIMARY = git-remote-http$X
13711376
REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X

0 commit comments

Comments
 (0)