The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libxmlrpc / 0004-use-correct-curl-config.patch
1 Use correct curl-config program
2
3 Instead of calling directly curl-config in src/Makefile (which ends up
4 calling the wrong curl-config: the one in the PATH instead of the one
5 pointed at by the environment variables at configure time), let's
6 define a CURL_CONFIG variable that contains the path to the proper
7 curl-config program, and use it where appropriate.
8
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10
11 Index: b/src/Makefile
12 ===================================================================
13 --- a/src/Makefile
14 +++ b/src/Makefile
15 @@ -56,7 +56,7 @@
16    TRANSPORT_MODS += blddir/lib/curl_transport/curltransaction
17    TRANSPORT_MODS += blddir/lib/curl_transport/curlmulti
18    TRANSPORT_MODS += blddir/lib/curl_transport/lock_pthread
19 -  TRANSPORT_LIBDEP += $(shell curl-config --libs)
20 +  TRANSPORT_LIBDEP += $(shell $CURL_CONFIG --libs)
21  endif
22  ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
23    TRANSPORT_MODS += blddir/lib/libwww_transport/xmlrpc_libwww_transport
24 Index: b/config.mk.in
25 ===================================================================
26 --- a/config.mk.in
27 +++ b/config.mk.in
28 @@ -32,6 +32,7 @@
29  LSOCKET = @LSOCKET@
30  WININET_LDADD = @WININET_LDADD@
31  WININET_LIBDIR = @WININET_LIBDIR@
32 +CURL_CONFIG = @CURL_CONFIG@
33  CURL_LDADD = @CURL_LDADD@
34  CURL_LIBDIR = @CURL_LIBDIR@
35  LIBWWW_LDADD = @LIBWWW_LDADD@
36 Index: b/configure.in
37 ===================================================================
38 --- a/configure.in
39 +++ b/configure.in
40 @@ -550,6 +550,8 @@
41      dnl So we don't do any check now.  If we find out there's a problem with
42      dnl older Curls, we will revisit that.
43  
44 +    AC_SUBST(CURL_CONFIG)
45 +
46      CURL_LDADD=$($CURL_CONFIG --libs)
47      AC_SUBST(CURL_LDADD)
48  
49 Index: b/lib/curl_transport/Makefile
50 ===================================================================
51 --- a/lib/curl_transport/Makefile
52 +++ b/lib/curl_transport/Makefile
53 @@ -29,7 +29,7 @@
54  
55  $(SRCDIR)/common.mk: srcdir blddir
56  
57 -CURL_VERSION := $(shell curl-config --vernum)
58 +CURL_VERSION := $(shell $(CURL_CONFIG) --vernum)
59  
60  # Some time at or before Curl 7.12, <curl/types.h> became an empty file
61  # (no-op).  Some time after Curl 7.18, <curl/types.h> ceased to exist.
62 @@ -43,7 +43,7 @@
63    CFLAGS_LOCAL += -DNEED_CURL_TYPES_H
64  endif
65  
66 -CURL_INCLUDES := $(shell curl-config --cflags)
67 +CURL_INCLUDES := $(shell $(CURL_CONFIG) --cflags)
68  # We expect that curl-config --cflags just gives us -I options, because
69  # we need just the -I options for 'make dep'.  Plus, it's scary to think
70  # of what any other compiler flag would do to our compile.
71 Index: b/src/cpp/test/Makefile
72 ===================================================================
73 --- a/src/cpp/test/Makefile
74 +++ b/src/cpp/test/Makefile
75 @@ -20,7 +20,7 @@
76  LIBS := $(shell $(XMLRPC_C_CONFIG) client --ldadd)
77  
78  ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
79 -  LIBS += $(shell curl-config --libs)
80 +  LIBS += $(shell $(CURL_CONFIG) --libs)
81  endif
82  ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
83    LIBS += $(shell libwww-config --libs)
84 Index: b/tools/common.mk
85 ===================================================================
86 --- a/tools/common.mk
87 +++ b/tools/common.mk
88 @@ -15,7 +15,7 @@
89    CLIENT_LDLIBS += $(shell libwww-config --libs)
90  endif
91  ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
92 -  CLIENT_LDLIBS += $(shell curl-config --libs)
93 +  CLIENT_LDLIBS += $(shell $(CURL_CONFIG) --libs)
94  endif
95  ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
96    CLIENT_LDLIBS += $(shell wininet-config --libs)