From patchwork Sat Dec 27 13:47:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 424204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 0A9631400B7 for ; Sun, 28 Dec 2014 00:47:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 72A4685791; Sat, 27 Dec 2014 13:47:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dFRt1OdlzLfm; Sat, 27 Dec 2014 13:47:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 64FEE859B3; Sat, 27 Dec 2014 13:47:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 520011C1083 for ; Sat, 27 Dec 2014 13:47:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4E8EC88494 for ; Sat, 27 Dec 2014 13:47:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C88hpZURv5QU for ; Sat, 27 Dec 2014 13:47:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by hemlock.osuosl.org (Postfix) with ESMTP id 5745588735 for ; Sat, 27 Dec 2014 13:47:41 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 7254F800; Sat, 27 Dec 2014 14:47:57 +0100 (CET) Received: from localhost (AToulouse-657-1-1002-244.w90-55.abo.wanadoo.fr [90.55.204.244]) by mail.free-electrons.com (Postfix) with ESMTPSA id BCB217F9; Sat, 27 Dec 2014 14:47:38 +0100 (CET) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Sat, 27 Dec 2014 14:47:16 +0100 Message-Id: <1419688038-15640-4-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1419688038-15640-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1419688038-15640-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 3/5] libxmlrpc: improve curl-config patch X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The curl-config patch that makes sure to not use curl-config from the PATH but the curl-config program specified at configure time was forgetting a number of other places. So we change the strategy, and make the configure.in script define a $CURL_CONFIG variable that can be used in Makefiles where appropriate. This means we need to run autoconf (but not AUTORECONF = YES since the package uses autoconf but not automake). This fixes build failures in cases where a curl-config program is in the PATH. Fixes: http://autobuild.buildroot.org/results/06b/06b7eada721483eb57adde147768a1f306b7d0d7/ (and many similar ones) Signed-off-by: Thomas Petazzoni Tested-by: "Yann E. MORIN" Acked-by: "Yann E. MORIN" --- .../libxmlrpc/0004-use-correct-curl-config.patch | 82 ++++++++++++++++++++-- package/libxmlrpc/libxmlrpc.mk | 9 ++- 2 files changed, 86 insertions(+), 5 deletions(-) diff --git a/package/libxmlrpc/0004-use-correct-curl-config.patch b/package/libxmlrpc/0004-use-correct-curl-config.patch index ada0bd2..c0646d3 100644 --- a/package/libxmlrpc/0004-use-correct-curl-config.patch +++ b/package/libxmlrpc/0004-use-correct-curl-config.patch @@ -1,9 +1,10 @@ Use correct curl-config program -Instead of calling again curl-config in src/Makefile (which ends up +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 use -the CURL_LDADD variable which was computed at configure time. +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 @@ -16,7 +17,80 @@ Index: b/src/Makefile TRANSPORT_MODS += blddir/lib/curl_transport/curlmulti TRANSPORT_MODS += blddir/lib/curl_transport/lock_pthread - TRANSPORT_LIBDEP += $(shell curl-config --libs) -+ TRANSPORT_LIBDEP += $(CURL_LDADD) ++ TRANSPORT_LIBDEP += $(shell $CURL_CONFIG --libs) endif ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes) TRANSPORT_MODS += blddir/lib/libwww_transport/xmlrpc_libwww_transport +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) ++CURL_VERSION := $(shell $CURL_CONFIG --vernum) + + # Some time at or before Curl 7.12, became an empty file + # (no-op). Some time after Curl 7.18, ceased to exist. +@@ -43,7 +43,7 @@ + CFLAGS_LOCAL += -DNEED_CURL_TYPES_H + endif + +-CURL_INCLUDES := $(shell curl-config --cflags) ++CURL_INCLUDES := $(shell $CURL_CONFIG --cflags) + # 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) ++ LIBS += $(shell $CURL_CONFIG --libs) + 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) ++ CLIENT_LDLIBS += $(shell $CURL_CONFIG --libs) + endif + ifeq ($(MUST_BUILD_WININET_CLIENT),yes) + CLIENT_LDLIBS += $(shell wininet-config --libs) diff --git a/package/libxmlrpc/libxmlrpc.mk b/package/libxmlrpc/libxmlrpc.mk index 1b771e2..c3788d6 100644 --- a/package/libxmlrpc/libxmlrpc.mk +++ b/package/libxmlrpc/libxmlrpc.mk @@ -10,10 +10,17 @@ LIBXMLRPC_SITE = http://downloads.sourceforge.net/project/xmlrpc-c/Xmlrpc-c%20Su LIBXMLRPC_LICENSE = BSD-3c (xml-rpc main code and abyss web server), BSD like (lib/expat), Python 1.5.2 license (parts of xmlrpc_base64.c) LIBXMLRPC_LICENSE_FILES = doc/COPYING LIBXMLRPC_INSTALL_STAGING = YES -LIBXMLRPC_DEPENDENCIES = libcurl +LIBXMLRPC_DEPENDENCIES = libcurl host-autoconf LIBXMLRPC_CONFIG_SCRIPTS = xmlrpc-c-config LIBXMLRPC_MAKE = $(MAKE1) +# Using autoconf, not automake, so we cannot use AUTORECONF = YES. +define LIBXMLRPC_RUN_AUTOCONF + cd $(@D); $(HOST_DIR)/usr/bin/autoconf +endef + +LIBXMLRPC_PRE_CONFIGURE_HOOKS += LIBXMLRPC_RUN_AUTOCONF + LIBXMLRPC_CONF_OPTS = \ $(if $(BR2_USE_WCHAR),,ac_cv_header_wchar_h=no) \ $(if $(BR2_INSTALL_LIBSTDCPP),,--disable-cplusplus) \