2013-10-09 16:19:10 +02:00
|
|
|
Use correct curl-config program
|
|
|
|
|
2014-12-27 17:25:55 +01:00
|
|
|
Instead of calling directly curl-config in src/Makefile (which ends up
|
2013-10-09 16:19:10 +02:00
|
|
|
calling the wrong curl-config: the one in the PATH instead of the one
|
2014-12-27 17:25:55 +01:00
|
|
|
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.
|
2013-10-09 16:19:10 +02:00
|
|
|
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
|
|
|
|
Index: b/src/Makefile
|
|
|
|
===================================================================
|
|
|
|
--- a/src/Makefile
|
|
|
|
+++ b/src/Makefile
|
|
|
|
@@ -56,7 +56,7 @@
|
|
|
|
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)
|
2014-12-27 17:25:55 +01:00
|
|
|
+ TRANSPORT_LIBDEP += $(shell $CURL_CONFIG --libs)
|
2013-10-09 16:19:10 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
|
|
|
|
TRANSPORT_MODS += blddir/lib/libwww_transport/xmlrpc_libwww_transport
|
2014-12-27 17:25:55 +01:00
|
|
|
Index: b/config.mk.in
|
|
|
|
===================================================================
|
|
|
|
--- a/config.mk.in
|
|
|
|
+++ b/config.mk.in
|
|
|
|
@@ -32,6 +32,7 @@
|
|
|
|
LSOCKET = @LSOCKET@
|
|
|
|
WININET_LDADD = @WININET_LDADD@
|
|
|
|
WININET_LIBDIR = @WININET_LIBDIR@
|
|
|
|
+CURL_CONFIG = @CURL_CONFIG@
|
|
|
|
CURL_LDADD = @CURL_LDADD@
|
|
|
|
CURL_LIBDIR = @CURL_LIBDIR@
|
|
|
|
LIBWWW_LDADD = @LIBWWW_LDADD@
|
|
|
|
Index: b/configure.in
|
|
|
|
===================================================================
|
|
|
|
--- a/configure.in
|
|
|
|
+++ b/configure.in
|
|
|
|
@@ -550,6 +550,8 @@
|
|
|
|
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.
|
|
|
|
|
|
|
|
+ AC_SUBST(CURL_CONFIG)
|
|
|
|
+
|
|
|
|
CURL_LDADD=$($CURL_CONFIG --libs)
|
|
|
|
AC_SUBST(CURL_LDADD)
|
|
|
|
|
|
|
|
Index: b/lib/curl_transport/Makefile
|
|
|
|
===================================================================
|
|
|
|
--- a/lib/curl_transport/Makefile
|
|
|
|
+++ b/lib/curl_transport/Makefile
|
|
|
|
@@ -29,7 +29,7 @@
|
|
|
|
|
|
|
|
$(SRCDIR)/common.mk: srcdir blddir
|
|
|
|
|
|
|
|
-CURL_VERSION := $(shell curl-config --vernum)
|
2015-02-27 10:19:19 +01:00
|
|
|
+CURL_VERSION := $(shell $(CURL_CONFIG) --vernum)
|
2014-12-27 17:25:55 +01:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
@@ -43,7 +43,7 @@
|
|
|
|
CFLAGS_LOCAL += -DNEED_CURL_TYPES_H
|
|
|
|
endif
|
|
|
|
|
|
|
|
-CURL_INCLUDES := $(shell curl-config --cflags)
|
2015-02-27 10:19:19 +01:00
|
|
|
+CURL_INCLUDES := $(shell $(CURL_CONFIG) --cflags)
|
2014-12-27 17:25:55 +01:00
|
|
|
# We expect that curl-config --cflags just gives us -I options, because
|
|
|
|
# we need just the -I options for 'make dep'. Plus, it's scary to think
|
|
|
|
# of what any other compiler flag would do to our compile.
|
|
|
|
Index: b/src/cpp/test/Makefile
|
|
|
|
===================================================================
|
|
|
|
--- a/src/cpp/test/Makefile
|
|
|
|
+++ b/src/cpp/test/Makefile
|
|
|
|
@@ -20,7 +20,7 @@
|
|
|
|
LIBS := $(shell $(XMLRPC_C_CONFIG) client --ldadd)
|
|
|
|
|
|
|
|
ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
|
|
|
|
- LIBS += $(shell curl-config --libs)
|
2015-02-27 10:19:19 +01:00
|
|
|
+ LIBS += $(shell $(CURL_CONFIG) --libs)
|
2014-12-27 17:25:55 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
|
|
|
|
LIBS += $(shell libwww-config --libs)
|
|
|
|
Index: b/tools/common.mk
|
|
|
|
===================================================================
|
|
|
|
--- a/tools/common.mk
|
|
|
|
+++ b/tools/common.mk
|
|
|
|
@@ -15,7 +15,7 @@
|
|
|
|
CLIENT_LDLIBS += $(shell libwww-config --libs)
|
|
|
|
endif
|
|
|
|
ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
|
|
|
|
- CLIENT_LDLIBS += $(shell curl-config --libs)
|
2015-02-27 10:19:19 +01:00
|
|
|
+ CLIENT_LDLIBS += $(shell $(CURL_CONFIG) --libs)
|
2014-12-27 17:25:55 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
|
|
|
|
CLIENT_LDLIBS += $(shell wininet-config --libs)
|