0004-use-correct-curl-config.patch 3.3 KB

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