summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-03-26 08:08:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-27 22:11:54 (GMT)
commit897d68e7af82824e0c9e15d3c4af1a8a71afc791 (patch)
tree043ce7413d1713c3f50f0535e8057520c491e1dc /setup.c
parent94a88e2524a7243fe77d42faa5649e1c38d1b292 (diff)
downloadgit-897d68e7af82824e0c9e15d3c4af1a8a71afc791.zip
git-897d68e7af82824e0c9e15d3c4af1a8a71afc791.tar.gz
git-897d68e7af82824e0c9e15d3c4af1a8a71afc791.tar.bz2
Makefile: use curl-config --cflags
We add the result of "curl-config --libs" when linking curl programs, but we never bother calling "curl-config --cflags". Presumably nobody noticed because: - a system libcurl installed into /usr/include/curl wouldn't need any flags ("/usr/include" is already in the search path, and the #include lines all look <curl/curl.h>, etc). - using CURLDIR sets up both the includes and the library path However, if you prefer CURL_CONFIG to CURLDIR, something simple like: make CURL_CONFIG=/path/to/curl-config doesn't work. We'd link against the libcurl specified by that program, but not find its header files when compiling. Let's invoke "curl-config --cflags" similar to the way we do for "--libs". Note that we'll feed the result into BASIC_CFLAGS. The rest of the Makefile doesn't distinguish which files need curl support during compilation and which do not. That should be OK, though. At most this should be adding a "-I" directive, and this is how CURLDIR already behaves. And since we follow the immediate-variable pattern from CURL_LDFLAGS, we won't accidentally invoke curl-config once per compilation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
0 files changed, 0 insertions, 0 deletions