Use correct curl-config program
Instead of calling directly curl-config in src/Makefile (which ends up
calling the wrong curl-config: the one in the PATH instead of the one
pointed at by the environment variables at configure time), let's
define a CURL_CONFIG variable that contains the path to the proper
curl-config program, and use it where appropriate.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
===================================================================
TRANSPORT_MODS += blddir/lib/curl_transport/curltransaction
TRANSPORT_MODS += blddir/lib/curl_transport/curlmulti
TRANSPORT_MODS += blddir/lib/curl_transport/lock_pthread
- TRANSPORT_LIBDEP += $(shell curl-config --libs)
+ TRANSPORT_LIBDEP += $(shell $CURL_CONFIG --libs)
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
TRANSPORT_MODS += blddir/lib/libwww_transport/xmlrpc_libwww_transport
===================================================================
WININET_LDADD = @WININET_LDADD@
WININET_LIBDIR = @WININET_LIBDIR@
+CURL_CONFIG = @CURL_CONFIG@
CURL_LDADD = @CURL_LDADD@
CURL_LIBDIR = @CURL_LIBDIR@
LIBWWW_LDADD = @LIBWWW_LDADD@
===================================================================
dnl So we don't do any check now. If we find out there's a problem with
dnl older Curls, we will revisit that.
CURL_LDADD=$($CURL_CONFIG --libs)
Index: b/lib/curl_transport/Makefile
===================================================================
--- a/lib/curl_transport/Makefile
+++ b/lib/curl_transport/Makefile
$(SRCDIR)/common.mk: srcdir blddir
-CURL_VERSION := $(shell curl-config --vernum)
+CURL_VERSION := $(shell $CURL_CONFIG --vernum)
# Some time at or before Curl 7.12, <curl/types.h> became an empty file
# (no-op). Some time after Curl 7.18, <curl/types.h> ceased to exist.
CFLAGS_LOCAL += -DNEED_CURL_TYPES_H